diff --git a/toolchain/check/impl.cpp b/toolchain/check/impl.cpp index 6393d654fe72..db7854887abf 100644 --- a/toolchain/check/impl.cpp +++ b/toolchain/check/impl.cpp @@ -198,9 +198,10 @@ static auto BuildInterfaceWitness( } auto table_id = context.inst_blocks().Add(table); - return context.AddInst(SemIR::LocIdAndInst::NoLoc( + return context.AddInstReusingLoc( + context.insts().GetLocId(impl.definition_id), {.type_id = context.GetBuiltinType(SemIR::BuiltinInstKind::WitnessType), - .elements_id = table_id})); + .elements_id = table_id}); } auto BuildImplWitness(Context& context, SemIR::ImplId impl_id) diff --git a/toolchain/check/member_access.cpp b/toolchain/check/member_access.cpp index 5f90056aff54..d65a59f01b57 100644 --- a/toolchain/check/member_access.cpp +++ b/toolchain/check/member_access.cpp @@ -196,11 +196,10 @@ static auto PerformImplLookup(Context& context, Parse::NodeId node_id, auto subst_type_id = SemIR::GetTypeInSpecific( context.sem_ir(), interface_type.specific_id, assoc_type.entity_type_id); - return context.AddInst( - SemIR::LocIdAndInst::NoLoc( - {.type_id = subst_type_id, - .witness_id = witness_id, - .index = assoc_entity->index})); + return context.AddInstReusingLoc( + node_id, {.type_id = subst_type_id, + .witness_id = witness_id, + .index = assoc_entity->index}); } // Performs a member name lookup into the specified scope, including performing diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index c3f8f1da32fb..7154329e135e 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -73,10 +73,10 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.6] // CHECK:STDOUT: %I.ref.loc19: type = name_ref I, %I.decl [template = constants.%.1] // CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc12_40 [template = constants.%.4] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc19_17: = bound_method %.loc19_16, %.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access @impl.%.loc15, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.7] // CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.8] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17(%.loc19_16, %.loc19_24) [template = constants.%.9] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.9] // CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32.loc19 [template = i32] // CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32.loc19, %.loc19_11.1 [template = i32] // CHECK:STDOUT: %.loc19_26: type = array_type %int.sadd, i32 [template = constants.%.10] @@ -127,11 +127,11 @@ var arr: [i32; 1.(I.F)(2)]; // CHECK:STDOUT: %.loc16_34.2: type = converted %int.make_type_32.loc16_34, %.loc16_34.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %.1) { 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 631efa53fc92..f8732017f652 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 @@ -152,9 +152,9 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %int.make_type_32.loc10: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.4] // CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.5] -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc10_18: = bound_method %.loc10_16, %.1 [template = constants.%.8] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18(%.loc10_16, %.loc10_20) [template = constants.%.9] +// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access @impl.%.loc6, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc10_18.2: = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.8] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_18.2(%.loc10_16, %.loc10_20) [template = constants.%.9] // CHECK:STDOUT: %.loc10_11.1: type = value_of_initializer %int.make_type_32.loc10 [template = i32] // CHECK:STDOUT: %.loc10_11.2: type = converted %int.make_type_32.loc10, %.loc10_11.1 [template = i32] // CHECK:STDOUT: %.loc10_21: type = array_type %int.sadd, i32 [template = constants.%.10] @@ -180,11 +180,11 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, i32 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; @@ -203,9 +203,9 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4); // CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.12] // CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.9] // CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.12] -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc10_34: = bound_method %.loc10_32, %.1 [template = constants.%.13] -// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34(%.loc10_32, %.loc10_36) [template = constants.%.14] +// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access @impl.%.loc6, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.13] +// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.14] // CHECK:STDOUT: %.loc10_37.1: %.15 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd) // CHECK:STDOUT: %.loc10_37.2: i32 = int_literal 0 [template = constants.%.16] // CHECK:STDOUT: %.loc10_37.3: ref i32 = array_index file.%arr.var, %.loc10_37.2 diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 5b44bc32961d..297885338b5b 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -158,12 +158,12 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.loc18_8.1: i32 = param self // CHECK:STDOUT: %self.loc18_8.2: i32 = bind_name self, %self.loc18_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl, %G.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl, %G.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { @@ -188,8 +188,8 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] // CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Simple.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.2 = call %.1() +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access @impl.%.loc16, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.2 = call %.loc22() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,9 +198,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] // CHECK:STDOUT: %G.ref: %.5 = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] -// CHECK:STDOUT: %.1: %G.type.1 = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] -// CHECK:STDOUT: %.loc26: = bound_method %n.ref, %.1 -// CHECK:STDOUT: %G.call: init %.2 = call %.loc26(%n.ref) +// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access @impl.%.loc16, element1 [template = constants.%G.2] +// CHECK:STDOUT: %.loc26_4.2: = bound_method %n.ref, %.loc26_4.1 +// CHECK:STDOUT: %G.call: init %.2 = call %.loc26_4.2(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -209,9 +209,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %p.ref: %.8 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] // CHECK:STDOUT: %F.ref: %.3 = name_ref F, @Simple.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.loc30: ref i32 = deref %p.ref -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.2 = call %.1() +// CHECK:STDOUT: %.loc30_4.1: ref i32 = deref %p.ref +// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access @impl.%.loc16, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.2 = call %.loc30_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -221,10 +221,10 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] // CHECK:STDOUT: %G.ref: %.5 = name_ref G, @Simple.%.loc13_21 [template = constants.%.6] // CHECK:STDOUT: %.loc34_4.1: ref i32 = deref %p.ref -// CHECK:STDOUT: %.1: %G.type.1 = interface_witness_access @impl.%.1, element1 [template = constants.%G.2] -// CHECK:STDOUT: %.loc34_4.2: = bound_method %.loc34_4.1, %.1 -// CHECK:STDOUT: %.loc34_4.3: i32 = bind_value %.loc34_4.1 -// CHECK:STDOUT: %G.call: init %.2 = call %.loc34_4.2(%.loc34_4.3) +// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access @impl.%.loc16, 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 %.2 = call %.loc34_4.3(%.loc34_4.4) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/empty.carbon b/toolchain/check/testdata/impl/empty.carbon index ee82e9ce6161..1dccf7ed4d6e 100644 --- a/toolchain/check/testdata/impl/empty.carbon +++ b/toolchain/check/testdata/impl/empty.carbon @@ -63,10 +63,10 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index 5934a6c68f16..270d930c53f4 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -85,11 +85,11 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -116,12 +116,12 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %F.ref.loc22: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc22: init %.2 = call %.1() +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access @impl.%.loc16, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc22: init %.2 = call %.loc22() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref.loc23: %.3 = name_ref F, @HasF.%.loc12 [template = constants.%.4] -// CHECK:STDOUT: %.2: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc23: init %.2 = call %.2() +// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access @impl.%.loc16, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc23: init %.2 = call %.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index b9e3e8e8e6cd..8bf5f199795f 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -101,11 +101,11 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %self.loc19_8.1: = param self // CHECK:STDOUT: %self.loc19_8.2: = bind_name self, %self.loc19_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc15: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %.1) { @@ -123,8 +123,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %n.ref: i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%.1] // CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc12_21 [template = constants.%.4] -// CHECK:STDOUT: %.1: %G.type.1 = interface_witness_access @impl.%.1, element0 [template = ] -// CHECK:STDOUT: %.loc23: = bound_method %n.ref, %.1 +// CHECK:STDOUT: %.loc23_4.1: %G.type.1 = interface_witness_access @impl.%.loc15, element0 [template = ] +// CHECK:STDOUT: %.loc23_4.2: = bound_method %n.ref, %.loc23_4.1 // CHECK:STDOUT: return // 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 00dd7bdbd2d8..862eece9c988 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -100,11 +100,11 @@ class C { // CHECK:STDOUT: %x.loc20_10.1: @F.2.%T (%T) = param x // CHECK:STDOUT: %x.loc20_10.2: @F.2.%T (%T) = bind_name x, %x.loc20_10.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index c1824f324f8d..65cc2d583c7d 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -64,10 +64,10 @@ extend impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; 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 c602ecf2872b..d6d0f2aef00c 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -92,19 +92,19 @@ class E { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: i32 as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc18: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D as %.1; // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %E as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc39: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc39 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index a7bad951c49b..bf3cdde26367 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -71,11 +71,11 @@ impl as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { 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 1208e0d61434..3225f3857720 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -432,29 +432,29 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %NoF as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc21: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %FNotFunction as %.1 { // CHECK:STDOUT: %F.decl: type = class_decl @F.16 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc25: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc25 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %FAlias as %.1 { // CHECK:STDOUT: %PossiblyF.ref: %PossiblyF.type = name_ref PossiblyF, file.%PossiblyF.decl [template = constants.%PossiblyF] // CHECK:STDOUT: %F: %PossiblyF.type = bind_alias F, file.%PossiblyF.decl [template = constants.%PossiblyF] -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc41: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %FExtraParam as %.1 { @@ -465,11 +465,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.loc62_10.1: bool = param b // CHECK:STDOUT: %b.loc62_10.2: bool = bind_name b, %b.loc62_10.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc54: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc54 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5: %FExtraImplicitParam as %.1 { @@ -478,11 +478,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %self.loc75_10.1: %FExtraImplicitParam = param self // CHECK:STDOUT: %self.loc75_10.2: %FExtraImplicitParam = bind_name self, %self.loc75_10.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc67: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc67 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.6: %FExtraReturnType as %.1 { @@ -492,11 +492,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc89_15.2: type = converted %bool.make_type, %.loc89_15.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc81: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc81 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.7: %FMissingParam as %.6 { @@ -511,11 +511,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc104_27.2: type = converted %bool.make_type.loc104_27, %.loc104_27.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc96: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc96 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.8: %FMissingImplicitParam as %.6 { @@ -530,11 +530,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc117_22.2: type = converted %bool.make_type.loc117_22, %.loc117_22.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc109: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc109 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.9: %FMissingReturnType as %.6 { @@ -550,11 +550,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.loc130_22.1: bool = param b // CHECK:STDOUT: %b.loc130_22.2: bool = bind_name b, %b.loc130_22.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc122: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc122 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.10: %FDifferentParamType as %.6 { @@ -572,11 +572,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc143_34.2: type = converted %bool.make_type.loc143_34, %.loc143_34.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc135: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc135 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.11: %FDifferentImplicitParamType as %.6 { @@ -594,11 +594,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc156_34.2: type = converted %bool.make_type.loc156_34, %.loc156_34.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc148: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc148 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.12: %FDifferentReturnType as %.6 { @@ -616,11 +616,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] // CHECK:STDOUT: %return.var: ref %FDifferentReturnType = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc161: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc161 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.13: %FDifferentParamName as %.6 { @@ -640,11 +640,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc183_38.2: type = converted %bool.make_type.loc183_38, %.loc183_38.1 [template = bool] // CHECK:STDOUT: %return.var: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc175: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc175 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.14: %SelfNestedBadParam as %.9 { @@ -667,11 +667,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.21] // CHECK:STDOUT: %return.var: ref %.21 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc192: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc192 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.15: %SelfNestedBadReturnType as %.9 { @@ -692,11 +692,11 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.21] // CHECK:STDOUT: %return.var: ref %.21 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness () [template = ] +// CHECK:STDOUT: %.loc205: = interface_witness () [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc205 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NoF { diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 91ddbee26111..0badf34f8bb2 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -76,7 +76,7 @@ impl i32 as I {} // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as %.1 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = .inst+18 +// CHECK:STDOUT: witness = .inst+18.loc13_15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 05e1276a8895..d8fb643d388d 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -76,11 +76,11 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 216f023f189f..4ff834c2e6e8 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -72,11 +72,11 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %T as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@Simple.%Self: %.1) { diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index 4d6a0097561d..589432b50164 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -91,11 +91,11 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -122,12 +122,12 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %G.ref.loc24: %.3 = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc24: init %.2 = call %.1() +// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access @impl.%.loc19, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc24: init %.2 = call %.loc24() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %G.ref.loc25: %.3 = name_ref G, @C.%G [template = constants.%.4] -// CHECK:STDOUT: %.2: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call.loc25: init %.2 = call %.2() +// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access @impl.%.loc19, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call.loc25: init %.2 = call %.loc25() // 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 d886359da3ac..a05f039ac324 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -99,11 +99,11 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc27 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/lookup/import.carbon b/toolchain/check/testdata/impl/lookup/import.carbon index 6c4fc8f8249d..69d8470c1198 100644 --- a/toolchain/check/testdata/impl/lookup/import.carbon +++ b/toolchain/check/testdata/impl/lookup/import.carbon @@ -87,11 +87,11 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -197,8 +197,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, imports.%Impl [template = imports.%Impl] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.7 [template = constants.%.2] // CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.3 [template = constants.%.6] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access imports.%import_ref.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.3 = call %.1() +// CHECK:STDOUT: %.loc5: %F.type.1 = interface_witness_access imports.%import_ref.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.3 = call %.loc5() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 6a7f3135a526..cd486826f966 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -113,11 +113,11 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %.loc19_27.2: type = converted %int.make_type_32, %.loc19_27.1 [template = i32] // CHECK:STDOUT: %return.var: ref i32 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -144,9 +144,9 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14_28 [template = constants.%.4] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc24_11: = bound_method %c.ref, %.1 -// CHECK:STDOUT: %F.call: init i32 = call %.loc24_11(%c.ref) +// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access @impl.%.loc18, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc24_11.2: = bound_method %c.ref, %.loc24_11.1 +// CHECK:STDOUT: %F.call: init i32 = call %.loc24_11.2(%c.ref) // CHECK:STDOUT: %.loc24_15.1: i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc24_15.2: i32 = converted %F.call, %.loc24_15.1 // CHECK:STDOUT: return %.loc24_15.2 diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index 96e82df6bb90..65c17f3ce5a2 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -73,11 +73,11 @@ fn G(c: Impl.C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc10: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -172,8 +172,8 @@ fn G(c: Impl.C) { // CHECK:STDOUT: %Impl.ref: = name_ref Impl, imports.%Impl [template = imports.%Impl] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, imports.%import_ref.7 [template = constants.%.2] // CHECK:STDOUT: %F.ref: %.5 = name_ref F, imports.%import_ref.3 [template = constants.%.6] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access imports.%import_ref.5, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.3 = call %.1() +// CHECK:STDOUT: %.loc5: %F.type.1 = interface_witness_access imports.%import_ref.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.3 = call %.loc5() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index 76b552190f2a..716e20c3cb6b 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -61,11 +61,11 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { 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 c1fb472103d7..92f0c4543ba9 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 @@ -45,9 +45,9 @@ impl true as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // 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 8cc5771d5929..aaa75463106d 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -155,11 +155,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %return.var: ref %.1 = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[@impl.%self.loc7_9.2: %.1](@impl.%other.loc7_21.2: %.1) -> %.1 { @@ -181,10 +181,10 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %x.ref: %.1 = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%.2] // CHECK:STDOUT: %Op.ref: %.4 = name_ref Op, imports.%import_ref.3 [template = constants.%.5] -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc11_11: = bound_method %x.ref, %.1 +// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access @impl.%.loc6, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc11_11.2: = bound_method %x.ref, %.loc11_11.1 // CHECK:STDOUT: %y.ref: %.1 = name_ref y, %y -// CHECK:STDOUT: %Op.call: init %.1 = call %.loc11_11(%x.ref, %y.ref) +// CHECK:STDOUT: %Op.call: init %.1 = call %.loc11_11.2(%x.ref, %y.ref) // CHECK:STDOUT: %.loc11_20.1: ref %.1 = temporary_storage // CHECK:STDOUT: %.loc11_20.2: ref %.1 = temporary %.loc11_20.1, %Op.call // CHECK:STDOUT: %tuple: %.1 = tuple_value () [template = constants.%tuple] diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index d87e09dbe31b..8136db43cff8 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -163,11 +163,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %A as %.6 { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -203,8 +203,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.loc16_23: init type = call %Action.ref(%B.ref) [template = constants.%.6] // CHECK:STDOUT: %.loc16_26: %.7 = specific_constant @Action.%.loc5, @Action(constants.%B) [template = constants.%.8] // CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, %.loc16_26 [template = constants.%.8] -// CHECK:STDOUT: %.1: %Op.type.3 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %Op.call: init %.1 = call %.1() +// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access @impl.%.loc12, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %Op.call: init %.1 = call %.loc16_15() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -345,8 +345,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.loc4_23: init type = call %Action.ref(%B.ref) [template = constants.%.4] // CHECK:STDOUT: %.loc4_26: %.7 = specific_constant imports.%import_ref.9, @Action(constants.%B) [template = constants.%.8] // CHECK:STDOUT: %Op.ref: %.7 = name_ref Op, %.loc4_26 [template = constants.%.8] -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access imports.%import_ref.13, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %Op.call: init %.2 = call %.1() +// CHECK:STDOUT: %.loc4_15: %Op.type.2 = interface_witness_access imports.%import_ref.13, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %Op.call: init %.2 = call %.loc4_15() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -612,11 +612,11 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %return.var: ref %B = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Make.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -777,9 +777,9 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.loc5_20: init type = call %Factory.ref(%B.ref) [template = constants.%.4] // CHECK:STDOUT: %.loc5_23: %.7 = specific_constant imports.%import_ref.7, @Factory(constants.%B) [template = constants.%.8] // CHECK:STDOUT: %Make.ref: %.7 = name_ref Make, %.loc5_23 [template = constants.%.8] -// CHECK:STDOUT: %.1: %Make.type.2 = interface_witness_access imports.%import_ref.11, element0 [template = constants.%Make.3] +// CHECK:STDOUT: %.loc5_11: %Make.type.2 = interface_witness_access imports.%import_ref.11, element0 [template = constants.%Make.3] // CHECK:STDOUT: %.loc4: ref %B = splice_block %return {} -// CHECK:STDOUT: %Make.call: init %B = call %.1() to %.loc4 +// CHECK:STDOUT: %Make.call: init %B = call %.loc5_11() to %.loc4 // CHECK:STDOUT: return %Make.call to %return // 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 997a48e12708..ffe2e09b8b35 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 @@ -148,10 +148,10 @@ impl () as D; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.1 as %.2 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = interface_witness () [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc6 // 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 02df8aa1edd8..a461abbbdd40 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -74,11 +74,11 @@ class A { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Make.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { 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 5e27aad06c9d..6d9d7f106e58 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -174,11 +174,11 @@ impl D as SelfNested { // CHECK:STDOUT: %C.ref.loc20_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D as %.1 { @@ -192,11 +192,11 @@ impl D as SelfNested { // CHECK:STDOUT: %Self.ref.loc24_32: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %return.var: ref %D = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %C as %.9 { @@ -212,11 +212,11 @@ impl D as SelfNested { // CHECK:STDOUT: %x.loc32_8.1: %.18 = param x // CHECK:STDOUT: %x.loc32_8.2: %.18 = bind_name x, %x.loc32_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.19] +// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.19] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %D as %.9 { @@ -232,11 +232,11 @@ impl D as SelfNested { // CHECK:STDOUT: %x.loc36_8.1: %.22 = param x // CHECK:STDOUT: %x.loc36_8.2: %.22 = bind_name x, %x.loc36_8.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.23] +// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.23] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/impl/redeclaration.carbon b/toolchain/check/testdata/impl/redeclaration.carbon index dd48c35c3c2e..ac9b1db78a76 100644 --- a/toolchain/check/testdata/impl/redeclaration.carbon +++ b/toolchain/check/testdata/impl/redeclaration.carbon @@ -77,10 +77,10 @@ impl i32 as I {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: i32 as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.4] +// CHECK:STDOUT: %.loc19: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index 8a0237651b45..37af99c98238 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -62,11 +62,11 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.1 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -96,8 +96,8 @@ class C { // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%.1] // CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14 [template = constants.%.4] -// CHECK:STDOUT: %.1: %F.type.1 = interface_witness_access @impl.%.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.call: init %.2 = call %.1() +// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access @impl.%.loc21, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.call: init %.2 = call %.loc17() // CHECK:STDOUT: return // 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 2f39413b559d..7523927de6e8 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -197,10 +197,10 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C as %.7 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.8] +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.9 { @@ -208,11 +208,11 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %return.var: ref %X = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.12] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index 5c5139a5d979..6f3454a9fad6 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -162,11 +162,11 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %.6 { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} -// CHECK:STDOUT: %.1: = interface_witness (%F.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index e850f99ca2ba..48b8de914e92 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -206,38 +206,38 @@ interface A(T: type) {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %X as %.1 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.9] +// CHECK:STDOUT: %.loc14: = interface_witness () [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %X as %.3 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.9] +// CHECK:STDOUT: %.loc15: = interface_witness () [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %X as %.10 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.9] +// CHECK:STDOUT: %.loc16: = interface_witness () [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.4: %X as %.5 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.9] +// CHECK:STDOUT: %.loc17: = interface_witness () [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.5: %X as %.12 { -// CHECK:STDOUT: %.1: = interface_witness () [template = constants.%.9] +// CHECK:STDOUT: %.loc18: = interface_witness () [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic class @C(file.%T.loc8_9.2: type) { diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index ac5ba53a0719..fcbc275ec5ec 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 25c214eb1eb6..d5bf31dce7b7 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index 4d3d60bc1425..0f32dddeaeb9 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -100,11 +100,11 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -129,10 +129,10 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc24: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access @impl.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc24(%a.ref) to %.loc23 +// CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index c087104f72ee..0c77b6d7e5ed 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index a93d9dd935b5..aed75065e854 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 333bb490e5b3..27cbc0bf2103 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -95,11 +95,11 @@ fn TestOp() { // CHECK:STDOUT: %self.loc18_14.3: %.3 = bind_name self, %self.loc18_14.1 // CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self.loc18_14.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -126,10 +126,10 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc23_3: = bound_method %c.ref, %.1 +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access @impl.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 // CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3(%.loc23_5) +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3.2(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index 9804b5ef27af..a1e49aa3c14d 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 64d37cdc2718..3843b5e9e018 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -205,12 +205,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.loc8_37.2: type = converted %bool.make_type.loc8, %.loc8_37.1 [template = bool] // CHECK:STDOUT: %return.var.loc8: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -240,9 +240,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: %.1: %Equal.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] -// CHECK:STDOUT: %.loc12_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12(%a.ref, %b.ref) +// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access @impl.%.loc6, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %.loc12_12.2: = bound_method %a.ref, %.loc12_12.1 +// CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call // CHECK:STDOUT: %.loc12_16.2: bool = converted %Equal.call, %.loc12_16.1 // CHECK:STDOUT: return %.loc12_16.2 @@ -252,9 +252,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: %.1: %NotEqual.type.2 = interface_witness_access @impl.%.1, element1 [template = constants.%NotEqual.1] -// CHECK:STDOUT: %.loc16_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12(%a.ref, %b.ref) +// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access @impl.%.loc6, element1 [template = constants.%NotEqual.1] +// CHECK:STDOUT: %.loc16_12.2: = bound_method %a.ref, %.loc16_12.1 +// CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call // CHECK:STDOUT: %.loc16_16.2: bool = converted %NotEqual.call, %.loc16_16.1 // CHECK:STDOUT: return %.loc16_16.2 @@ -537,12 +537,12 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %.loc9_37.2: type = converted %bool.make_type.loc9, %.loc9_37.1 [template = bool] // CHECK:STDOUT: %return.var.loc9: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl // CHECK:STDOUT: .NotEqual = %NotEqual.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -577,9 +577,9 @@ 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: %.1: %Equal.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Equal.1] -// CHECK:STDOUT: %.loc20_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Equal.call: init bool = call %.loc20_12() [template = ] +// CHECK:STDOUT: %.loc20_12.1: %Equal.type.2 = interface_witness_access @impl.%.loc7, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %.loc20_12.2: = bound_method %a.ref, %.loc20_12.1 +// CHECK:STDOUT: %Equal.call: init bool = call %.loc20_12.2() [template = ] // CHECK:STDOUT: %.loc20_16.1: bool = value_of_initializer %Equal.call [template = ] // CHECK:STDOUT: %.loc20_16.2: bool = converted %Equal.call, %.loc20_16.1 [template = ] // CHECK:STDOUT: return %.loc20_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 d1d87a0c20a3..ae6abd7909f1 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -154,11 +154,11 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %self.loc16_14.3: %.3 = bind_name self, %self.loc16_14.1 // CHECK:STDOUT: %.loc16_9: %.3 = addr_pattern %self.loc16_14.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.7 { @@ -172,11 +172,11 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %other.loc19_24.1: %C = param other // CHECK:STDOUT: %other.loc19_24.2: %C = bind_name other, %other.loc19_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -205,9 +205,9 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: fn @TestIncNonRef(%a: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc30: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc30() [template = ] +// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access @impl.1.%.loc15, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc30_3.2: = bound_method %a.ref, %.loc30_3.1 +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc30_3.2() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -215,9 +215,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: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc40: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc40() [template = ] +// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access @impl.2.%.loc18, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc40_5.2: = bound_method %a.ref, %.loc40_5.1 +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc40_5.2() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 98639511b49f..2ce85687340f 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 @@ -164,11 +164,11 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %C.ref.loc17_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.5 { @@ -182,11 +182,11 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %other.loc20_24.1: %C = param other // CHECK:STDOUT: %other.loc20_24.2: %C = bind_name other, %other.loc20_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -220,10 +220,10 @@ fn TestAssign(b: D) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc31_12.1: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %.loc31_12.2: ref %C = temporary_storage -// CHECK:STDOUT: %Op.call: init %C = call %.loc31_12.1() [template = ] +// CHECK:STDOUT: %.loc31_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc16, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc31_12.2: = bound_method %a.ref, %.loc31_12.1 +// CHECK:STDOUT: %.loc31_12.3: ref %C = temporary_storage +// CHECK:STDOUT: %Op.call: init %C = call %.loc31_12.2() [template = ] // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -238,10 +238,10 @@ fn TestAssign(b: D) { // CHECK:STDOUT: assign %a.var, %.loc35_16 // CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc42_5: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc42_5.1: %Op.type.4 = interface_witness_access @impl.2.%.loc19, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc42_5.2: = bound_method %a.ref, %.loc42_5.1 // CHECK:STDOUT: %.loc42_3: %.6 = addr_of %a.ref -// CHECK:STDOUT: %Op.call: init %.3 = call %.loc42_5() [template = ] +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc42_5.2() [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index ba75207ede6a..17c79e622b6a 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -95,11 +95,11 @@ fn TestOp() { // CHECK:STDOUT: %self.loc18_14.3: %.3 = bind_name self, %self.loc18_14.1 // CHECK:STDOUT: %.loc18_9: %.3 = addr_pattern %self.loc18_14.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -126,10 +126,10 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc23_3: = bound_method %c.ref, %.1 +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access @impl.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 // CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref -// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3(%.loc23_5) +// CHECK:STDOUT: %Op.call: init %.4 = call %.loc23_3.2(%.loc23_5) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index b61f2fa7ad0d..5cdae1089bf2 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index 144664dc827d..271554915051 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index 0d4be385fff0..d77f9e3b862f 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index d490f46eafb9..e0558cd5af7f 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -100,11 +100,11 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -129,10 +129,10 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.1: %Op.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc24: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access @impl.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc24(%a.ref) to %.loc23 +// CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index a8b19aa306ad..6c4938e0eb44 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -274,14 +274,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %.loc10_48.2: type = converted %bool.make_type.loc10, %.loc10_48.1 [template = bool] // CHECK:STDOUT: %return.var.loc10: ref bool = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.4] // 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 = %.1 +// CHECK:STDOUT: witness = %.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -327,9 +327,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: %.1: %Less.type.2 = interface_witness_access @impl.%.1, element0 [template = constants.%Less.1] -// CHECK:STDOUT: %.loc14_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Less.call: init bool = call %.loc14_12(%a.ref, %b.ref) +// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access @impl.%.loc6, element0 [template = constants.%Less.1] +// CHECK:STDOUT: %.loc14_12.2: = bound_method %a.ref, %.loc14_12.1 +// CHECK:STDOUT: %Less.call: init bool = call %.loc14_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call // CHECK:STDOUT: %.loc14_15.2: bool = converted %Less.call, %.loc14_15.1 // CHECK:STDOUT: return %.loc14_15.2 @@ -339,9 +339,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: %.1: %LessOrEquivalent.type.2 = interface_witness_access @impl.%.1, element1 [template = constants.%LessOrEquivalent.1] -// CHECK:STDOUT: %.loc18_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12(%a.ref, %b.ref) +// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access @impl.%.loc6, element1 [template = constants.%LessOrEquivalent.1] +// CHECK:STDOUT: %.loc18_12.2: = bound_method %a.ref, %.loc18_12.1 +// CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call // CHECK:STDOUT: %.loc18_16.2: bool = converted %LessOrEquivalent.call, %.loc18_16.1 // CHECK:STDOUT: return %.loc18_16.2 @@ -351,9 +351,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: %.1: %Greater.type.2 = interface_witness_access @impl.%.1, element2 [template = constants.%Greater.1] -// CHECK:STDOUT: %.loc22_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12(%a.ref, %b.ref) +// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access @impl.%.loc6, element2 [template = constants.%Greater.1] +// CHECK:STDOUT: %.loc22_12.2: = bound_method %a.ref, %.loc22_12.1 +// CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call // CHECK:STDOUT: %.loc22_15.2: bool = converted %Greater.call, %.loc22_15.1 // CHECK:STDOUT: return %.loc22_15.2 @@ -363,9 +363,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: %.1: %GreaterOrEquivalent.type.2 = interface_witness_access @impl.%.1, element3 [template = constants.%GreaterOrEquivalent.1] -// CHECK:STDOUT: %.loc26_12: = bound_method %a.ref, %.1 -// CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12(%a.ref, %b.ref) +// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access @impl.%.loc6, element3 [template = constants.%GreaterOrEquivalent.1] +// CHECK:STDOUT: %.loc26_12.2: = bound_method %a.ref, %.loc26_12.1 +// CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call // CHECK:STDOUT: %.loc26_16.2: bool = converted %GreaterOrEquivalent.call, %.loc26_16.1 // CHECK:STDOUT: return %.loc26_16.2 diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index dfa846a3c4c4..2b12c3d124f6 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 2f29d4185734..47f51936b8ed 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -154,11 +154,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.var: ref %C = var // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C as %.6 { @@ -172,11 +172,11 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %other.loc23_24.1: %C = param other // CHECK:STDOUT: %other.loc23_24.2: %C = bind_name other, %other.loc23_24.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %.1: = interface_witness (%Op.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl -// CHECK:STDOUT: witness = %.1 +// CHECK:STDOUT: witness = %.loc22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { @@ -214,10 +214,10 @@ 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: %.1: %Op.type.2 = interface_witness_access @impl.1.%.1, element0 [template = constants.%Op.1] -// CHECK:STDOUT: %.loc27: = bound_method %a.ref, %.1 +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access @impl.1.%.loc17, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26: ref %C = splice_block %return {} -// CHECK:STDOUT: %Op.call: init %C = call %.loc27(%a.ref, %b.ref) to %.loc26 +// CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -226,10 +226,10 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.1: %Op.type.4 = interface_witness_access @impl.2.%.1, element0 [template = constants.%Op.3] -// CHECK:STDOUT: %.loc31_6: = bound_method %.loc31_3.1, %.1 +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access @impl.2.%.loc22, 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 %.3 = call %.loc31_6(%.loc31_3.2, %b.ref) +// CHECK:STDOUT: %Op.call: init %.3 = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/overloaded_operator.carbon b/toolchain/lower/testdata/builtins/overloaded_operator.carbon index 6aef3a0d517a..ff5b82a41599 100644 --- a/toolchain/lower/testdata/builtins/overloaded_operator.carbon +++ b/toolchain/lower/testdata/builtins/overloaded_operator.carbon @@ -24,10 +24,10 @@ fn AddThreeIntegers(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDOUT: define i32 @AddThreeIntegers(i32 %a, i32 %b, i32 %c) !dbg !4 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %int.sadd.loc18_12 = add i32 %a, %b, !dbg !7 -// CHECK:STDOUT: %.loc18_12.2.temp = alloca i32, align 4, !dbg !7 -// CHECK:STDOUT: store i32 %int.sadd.loc18_12, ptr %.loc18_12.2.temp, align 4, !dbg !7 -// CHECK:STDOUT: %.loc18_12.4 = load i32, ptr %.loc18_12.2.temp, align 4, !dbg !7 -// CHECK:STDOUT: %int.sadd.loc18_16 = add i32 %.loc18_12.4, %c, !dbg !7 +// CHECK:STDOUT: %.loc18_12.3.temp = alloca i32, align 4, !dbg !7 +// CHECK:STDOUT: store i32 %int.sadd.loc18_12, ptr %.loc18_12.3.temp, align 4, !dbg !7 +// CHECK:STDOUT: %.loc18_12.5 = load i32, ptr %.loc18_12.3.temp, align 4, !dbg !7 +// CHECK:STDOUT: %int.sadd.loc18_16 = add i32 %.loc18_12.5, %c, !dbg !7 // CHECK:STDOUT: ret i32 %int.sadd.loc18_16, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/operators/overloaded.carbon b/toolchain/lower/testdata/operators/overloaded.carbon index daf3c39bca25..9f31913a829e 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 @Calculate(ptr sret({ i1 }) %return, ptr %a, ptr %b) !dbg !21 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc28_10.2.temp = alloca { i1 }, align 8, !dbg !22 -// CHECK:STDOUT: call void @Op(ptr %.loc28_10.2.temp, ptr %a), !dbg !22 -// CHECK:STDOUT: call void @Op.1(ptr %return, ptr %.loc28_10.2.temp, ptr %b), !dbg !22 +// CHECK:STDOUT: %.loc28_10.3.temp = alloca { i1 }, align 8, !dbg !22 +// CHECK:STDOUT: call void @Op(ptr %.loc28_10.3.temp, ptr %a), !dbg !22 +// CHECK:STDOUT: call void @Op.1(ptr %return, ptr %.loc28_10.3.temp, ptr %b), !dbg !22 // CHECK:STDOUT: ret void, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index 002deb09d4e2..99ad99399a9d 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -710,11 +710,10 @@ struct InterfaceType { // A witness that a type implements an interface. struct InterfaceWitness { - static constexpr auto Kind = - InstKind::InterfaceWitness.Define( - {.ir_name = "interface_witness", - .constant_kind = InstConstantKind::Conditional, - .is_lowered = false}); + static constexpr auto Kind = InstKind::InterfaceWitness.Define( + {.ir_name = "interface_witness", + .constant_kind = InstConstantKind::Conditional, + .is_lowered = false}); TypeId type_id; InstBlockId elements_id; @@ -723,7 +722,7 @@ struct InterfaceWitness { // Accesses an element of an interface witness by index. struct InterfaceWitnessAccess { static constexpr auto Kind = - InstKind::InterfaceWitnessAccess.Define( + InstKind::InterfaceWitnessAccess.Define( {.ir_name = "interface_witness_access", .is_type = InstIsType::Maybe, .constant_kind = InstConstantKind::SymbolicOnly,