From a0d1e4b80959b7347f4e8d0ef5fe0c73a1c35bec Mon Sep 17 00:00:00 2001 From: Geoff Romer Date: Wed, 10 Dec 2025 17:06:16 -0800 Subject: [PATCH] Handle SpecificImplFunction in GetCallee (#6487) I need this in a forthcoming PR, to reliably get the `Function` that was originally used to build a `Call` inst, but even as a stand-alone change, it seems to nicely improve the textual SemIR. --- .../check/testdata/class/generic/basic.carbon | 22 +++---- .../check/testdata/class/generic/field.carbon | 20 +++--- .../check/testdata/class/generic/init.carbon | 26 ++++---- .../class/generic/member_access.carbon | 28 ++++---- .../class/generic/member_inline.carbon | 20 +++--- .../class/generic/member_lookup.carbon | 20 +++--- .../class/generic/member_out_of_line.carbon | 20 +++--- .../testdata/class/generic/member_type.carbon | 16 ++--- toolchain/check/testdata/facet/access.carbon | 28 ++++---- .../facet/call_combined_impl_witness.carbon | 44 ++++++------- ..._value_to_generic_facet_value_value.carbon | 2 +- toolchain/check/testdata/for/actual.carbon | 56 ++++++++-------- .../testdata/function/generic/call.carbon | 32 ++++----- .../call_method_on_generic_facet.carbon | 2 +- .../generic/indirect_generic_type.carbon | 12 ++-- .../function/generic/type_param_scope.carbon | 12 ++-- .../testdata/generic/dependent_param.carbon | 12 ++-- .../generic/template/unimplemented.carbon | 14 ++-- .../generic/template_dependence.carbon | 12 ++-- .../check/testdata/impl/impl_thunk.carbon | 24 +++---- .../testdata/impl/import_builtin_call.carbon | 4 +- .../impl/lookup/canonical_query_self.carbon | 2 +- .../check/testdata/impl/lookup/generic.carbon | 16 ++--- .../testdata/impl/lookup/impl_forall.carbon | 20 +++--- ...pecialization_with_symbolic_rewrite.carbon | 36 +++++----- .../testdata/impl/use_assoc_entity.carbon | 66 +++++++++---------- .../interface/compound_member_access.carbon | 42 ++++++------ .../interface/fail_assoc_const_alias.carbon | 14 ++-- ..._todo_define_default_fn_out_of_line.carbon | 12 ++-- .../check/testdata/interface/final.carbon | 2 +- .../testdata/interface/generic_method.carbon | 56 ++++++++-------- .../testdata/interface/member_lookup.carbon | 12 ++-- .../call_different_impls_with_const.carbon | 16 ++--- .../generic/call_impl_function.carbon | 4 +- .../generic/type_representation.carbon | 8 +-- toolchain/sem_ir/function.cpp | 4 ++ 36 files changed, 370 insertions(+), 366 deletions(-) diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index 0cb22f779032..86016788d845 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -186,11 +186,11 @@ class Declaration(T:! type); // CHECK:STDOUT: %require_complete.loc6_36: = require_complete_type %ptr.loc6_36.1 [symbolic = %require_complete.loc6_36 (constants.%require_complete.c97)] // CHECK:STDOUT: %require_complete.loc6_22: = require_complete_type %Class [symbolic = %require_complete.loc6_22 (constants.%require_complete.3be)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] -// CHECK:STDOUT: %.loc7_12.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc7_12.2 (constants.%.892)] +// CHECK:STDOUT: %.loc7_12.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc7_12.1 (constants.%.892)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc6_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.29a)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc6_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc7_12.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_12.3 (constants.%.057)] -// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.GetAddr.%.loc7_12.3 (%.057) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.120)] +// CHECK:STDOUT: %.loc7_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_12.2 (constants.%.057)] +// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.GetAddr.%.loc7_12.2 (%.057) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.120)] // CHECK:STDOUT: %specific_impl_fn.loc7_12.2: = specific_impl_function %impl.elem0.loc7_12.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.5a3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.GetAddr.%Class (%Class)) -> @Class.GetAddr.%ptr.loc6_36.1 (%ptr.2e1) { @@ -199,12 +199,12 @@ class Declaration(T:! type); // CHECK:STDOUT: %k.ref: @Class.GetAddr.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc14_8 [concrete = @Class.%.loc14_8] // CHECK:STDOUT: %.loc7_17: ref @Class.GetAddr.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %addr: @Class.GetAddr.%ptr.loc6_36.1 (%ptr.2e1) = addr_of %.loc7_17 -// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.GetAddr.%.loc7_12.3 (%.057) = impl_witness_access constants.%Copy.lookup_impl_witness.29a, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.120)] +// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.GetAddr.%.loc7_12.2 (%.057) = impl_witness_access constants.%Copy.lookup_impl_witness.29a, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.120)] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %addr, %impl.elem0.loc7_12.1 // CHECK:STDOUT: %specific_impl_fn.loc7_12.1: = specific_impl_function %impl.elem0.loc7_12.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.5a3)] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %addr, %specific_impl_fn.loc7_12.1 -// CHECK:STDOUT: %.loc7_12.1: init @Class.GetAddr.%ptr.loc6_36.1 (%ptr.2e1) = call %bound_method.loc7_12.2(%addr) -// CHECK:STDOUT: return %.loc7_12.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Class.GetAddr.%ptr.loc6_36.1 (%ptr.2e1) = call %bound_method.loc7_12.2(%addr) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -220,8 +220,8 @@ class Declaration(T:! type); // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %require_complete.loc11: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc11 (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc11_16.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc11_16.4 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.GetValue.%.loc11_16.4 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc11_16.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc11_16.3 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.GetValue.%.loc11_16.3 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc11_16.2: = specific_impl_function %impl.elem0.loc11_16.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.GetValue.%Class (%Class)) -> %return.param: @Class.GetValue.%T.binding.as_type (%T.binding.as_type) { @@ -230,13 +230,13 @@ class Declaration(T:! type); // CHECK:STDOUT: %k.ref: @Class.GetValue.%Class.elem (%Class.elem) = name_ref k, @Class.%.loc14_8 [concrete = @Class.%.loc14_8] // CHECK:STDOUT: %.loc11_16.1: ref @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc11_16.2: @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc11_16.1 -// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.GetValue.%.loc11_16.4 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.GetValue.%.loc11_16.3 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc11_16.1: = bound_method %.loc11_16.2, %impl.elem0.loc11_16.1 // CHECK:STDOUT: %specific_impl_fn.loc11_16.1: = specific_impl_function %impl.elem0.loc11_16.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc11_16.2: = bound_method %.loc11_16.2, %specific_impl_fn.loc11_16.1 // CHECK:STDOUT: %.loc10_29: ref @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc11_16.3: init @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc11_16.2(%.loc11_16.2) to %.loc10_29 -// CHECK:STDOUT: return %.loc11_16.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Class.GetValue.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc11_16.2(%.loc11_16.2) to %.loc10_29 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 860dbc580145..7eede7e489ae 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -250,8 +250,8 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %require_complete.loc13_22: = require_complete_type %Class.loc13_31.1 [symbolic = %require_complete.loc13_22 (constants.%require_complete.a2422b.1)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc13_31.1, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.814ce2.1)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_6.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd34c.1)] -// CHECK:STDOUT: %.loc14_11.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc13_6.1 [symbolic = %.loc14_11.4 (constants.%.232382.1)] -// CHECK:STDOUT: %impl.elem0.loc14_11.2: @G.%.loc14_11.4 (%.232382.1) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.8df274.1)] +// CHECK:STDOUT: %.loc14_11.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc13_6.1 [symbolic = %.loc14_11.3 (constants.%.232382.1)] +// CHECK:STDOUT: %impl.elem0.loc14_11.2: @G.%.loc14_11.3 (%.232382.1) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.8df274.1)] // CHECK:STDOUT: %specific_impl_fn.loc14_11.2: = specific_impl_function %impl.elem0.loc14_11.2, @Copy.Op(%T.loc13_6.1) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.5c479b.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%c.param: @G.%Class.loc13_31.1 (%Class.9fad56.1)) -> %return.param: @G.%T.binding.as_type (%T.binding.as_type) { @@ -260,13 +260,13 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %x.ref: @G.%Class.elem (%Class.elem.814ce2.1) = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] // CHECK:STDOUT: %.loc14_11.1: ref @G.%T.binding.as_type (%T.binding.as_type) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc14_11.2: @G.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc14_11.1 -// CHECK:STDOUT: %impl.elem0.loc14_11.1: @G.%.loc14_11.4 (%.232382.1) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.1, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.8df274.1)] +// CHECK:STDOUT: %impl.elem0.loc14_11.1: @G.%.loc14_11.3 (%.232382.1) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.1, element0 [symbolic = %impl.elem0.loc14_11.2 (constants.%impl.elem0.8df274.1)] // CHECK:STDOUT: %bound_method.loc14_11.1: = bound_method %.loc14_11.2, %impl.elem0.loc14_11.1 // CHECK:STDOUT: %specific_impl_fn.loc14_11.1: = specific_impl_function %impl.elem0.loc14_11.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc14_11.2 (constants.%specific_impl_fn.5c479b.1)] // CHECK:STDOUT: %bound_method.loc14_11.2: = bound_method %.loc14_11.2, %specific_impl_fn.loc14_11.1 // CHECK:STDOUT: %.loc13_34: ref @G.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc14_11.3: init @G.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc14_11.2(%.loc14_11.2) to %.loc13_34 -// CHECK:STDOUT: return %.loc14_11.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @G.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc14_11.2(%.loc14_11.2) to %.loc13_34 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -282,8 +282,8 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %require_complete.loc17_22: = require_complete_type %Class.loc17_31.1 [symbolic = %require_complete.loc17_22 (constants.%require_complete.a2422b.2)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc17_31.1, %U.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.814ce2.2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc17_6.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd34c.2)] -// CHECK:STDOUT: %.loc18_11.4: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc17_6.1 [symbolic = %.loc18_11.4 (constants.%.232382.2)] -// CHECK:STDOUT: %impl.elem0.loc18_11.2: @H.%.loc18_11.4 (%.232382.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.8df274.2)] +// CHECK:STDOUT: %.loc18_11.3: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc17_6.1 [symbolic = %.loc18_11.3 (constants.%.232382.2)] +// CHECK:STDOUT: %impl.elem0.loc18_11.2: @H.%.loc18_11.3 (%.232382.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.8df274.2)] // CHECK:STDOUT: %specific_impl_fn.loc18_11.2: = specific_impl_function %impl.elem0.loc18_11.2, @Copy.Op(%U.loc17_6.1) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.5c479b.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%c.param: @H.%Class.loc17_31.1 (%Class.9fad56.2)) -> %return.param: @H.%U.binding.as_type (%U.binding.as_type.e5b) { @@ -292,13 +292,13 @@ fn H(U:! Core.Copy, c: Class(U)) -> U { // CHECK:STDOUT: %x.ref: @H.%Class.elem (%Class.elem.814ce2.2) = name_ref x, @Class.%.loc6 [concrete = @Class.%.loc6] // CHECK:STDOUT: %.loc18_11.1: ref @H.%U.binding.as_type (%U.binding.as_type.e5b) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc18_11.2: @H.%U.binding.as_type (%U.binding.as_type.e5b) = acquire_value %.loc18_11.1 -// CHECK:STDOUT: %impl.elem0.loc18_11.1: @H.%.loc18_11.4 (%.232382.2) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.2, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.8df274.2)] +// CHECK:STDOUT: %impl.elem0.loc18_11.1: @H.%.loc18_11.3 (%.232382.2) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.2, element0 [symbolic = %impl.elem0.loc18_11.2 (constants.%impl.elem0.8df274.2)] // CHECK:STDOUT: %bound_method.loc18_11.1: = bound_method %.loc18_11.2, %impl.elem0.loc18_11.1 // CHECK:STDOUT: %specific_impl_fn.loc18_11.1: = specific_impl_function %impl.elem0.loc18_11.1, @Copy.Op(constants.%U.f92) [symbolic = %specific_impl_fn.loc18_11.2 (constants.%specific_impl_fn.5c479b.2)] // CHECK:STDOUT: %bound_method.loc18_11.2: = bound_method %.loc18_11.2, %specific_impl_fn.loc18_11.1 // CHECK:STDOUT: %.loc17_34: ref @H.%U.binding.as_type (%U.binding.as_type.e5b) = splice_block %return {} -// CHECK:STDOUT: %.loc18_11.3: init @H.%U.binding.as_type (%U.binding.as_type.e5b) = call %bound_method.loc18_11.2(%.loc18_11.2) to %.loc17_34 -// CHECK:STDOUT: return %.loc18_11.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @H.%U.binding.as_type (%U.binding.as_type.e5b) = call %bound_method.loc18_11.2(%.loc18_11.2) to %.loc17_34 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index 59ff0a238ae7..c1148caacca4 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -186,8 +186,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %pattern_type.loc10: type = pattern_type %Class.loc10_17.2 [symbolic = %pattern_type.loc10 (constants.%pattern_type.0d0)] // CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.k (constants.%struct_type.k.35c)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_26.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc10_27.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc9_26.1 [symbolic = %.loc10_27.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc10_27: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc9_26.1 [symbolic = %.loc10_27 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc10_27.2: @InitFromStructGeneric.%.loc10_27 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc10_27.2: = specific_impl_function %impl.elem0.loc10_27.2, @Copy.Op(%T.loc9_26.1) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class.loc10_17.2, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.814)] // CHECK:STDOUT: %facet_value: %type_where = facet_value %Class.loc10_17.2, () [symbolic = %facet_value (constants.%facet_value.80f)] @@ -208,13 +208,13 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc10_17.2 (%Class.9fa) = var %v.var_patt // CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %.loc10_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.35c) = struct_literal (%x.ref) -// CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc10_27.1: @InitFromStructGeneric.%.loc10_27 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc10_27.1: = bound_method %x.ref, %impl.elem0.loc10_27.1 // CHECK:STDOUT: %specific_impl_fn.loc10_27.1: = specific_impl_function %impl.elem0.loc10_27.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc10_27.2: = bound_method %x.ref, %specific_impl_fn.loc10_27.1 // CHECK:STDOUT: %.loc10_28.2: ref @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = class_element_access %v.var, element0 -// CHECK:STDOUT: %.loc10_27.1: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_27.2(%x.ref) to %.loc10_28.2 -// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = initialize_from %.loc10_27.1 to %.loc10_28.2 +// CHECK:STDOUT: %Copy.Op.call.loc10: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_27.2(%x.ref) to %.loc10_28.2 +// CHECK:STDOUT: %.loc10_28.3: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = initialize_from %Copy.Op.call.loc10 to %.loc10_28.2 // CHECK:STDOUT: %.loc10_28.4: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.9fa) = class_init (%.loc10_28.3), %v.var // CHECK:STDOUT: %.loc10_3.1: init @InitFromStructGeneric.%Class.loc10_17.2 (%Class.9fa) = converted %.loc10_28.1, %.loc10_28.4 // CHECK:STDOUT: assign %v.var, %.loc10_3.1 @@ -230,18 +230,18 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.814) = name_ref k, @Class.%.loc5 [concrete = @Class.%.loc5] // CHECK:STDOUT: %.loc11_11.1: ref @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc11_11.2: @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc11_11.1 -// CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc11: @InitFromStructGeneric.%.loc10_27 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc10_27.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc11_11.1: = bound_method %.loc11_11.2, %impl.elem0.loc11 // CHECK:STDOUT: %specific_impl_fn.loc11: = specific_impl_function %impl.elem0.loc11, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc10_27.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc11_11.2: = bound_method %.loc11_11.2, %specific_impl_fn.loc11 // CHECK:STDOUT: %.loc9_47: ref @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc11_11.3: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc11_11.2(%.loc11_11.2) to %.loc9_47 +// CHECK:STDOUT: %Copy.Op.call.loc11: init @InitFromStructGeneric.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc11_11.2(%.loc11_11.2) to %.loc9_47 // CHECK:STDOUT: %impl.elem0.loc10_3: @InitFromStructGeneric.%.loc10_3.3 (%.98c) = impl_witness_access constants.%Destroy.impl_witness.b7d, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.40d)] // CHECK:STDOUT: %bound_method.loc10_3.1: = bound_method %v.var, %impl.elem0.loc10_3 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc10_3, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.80f) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.6c9)] // CHECK:STDOUT: %bound_method.loc10_3.2: = bound_method %v.var, %specific_fn // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10_3.2(%v.var) -// CHECK:STDOUT: return %.loc11_11.3 to %return +// CHECK:STDOUT: return %Copy.Op.call.loc11 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -401,8 +401,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Adapt.loc10_23.2: type = class_type @Adapt, @Adapt(%T.binding.as_type) [symbolic = %Adapt.loc10_23.2 (constants.%Adapt.027)] // CHECK:STDOUT: %require_complete.loc10: = require_complete_type %Adapt.loc10_23.2 [symbolic = %require_complete.loc10 (constants.%require_complete.2f2)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc9_27.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc10_26.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc9_27.1 [symbolic = %.loc10_26.4 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc10_26.2: @InitFromAdaptedGeneric.%.loc10_26.4 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc10_26.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc9_27.1 [symbolic = %.loc10_26.3 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc10_26.2: @InitFromAdaptedGeneric.%.loc10_26.3 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc10_26.2: = specific_impl_function %impl.elem0.loc10_26.2, @Copy.Op(%T.loc9_27.1) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) { @@ -420,13 +420,13 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %.loc10_29: type = converted %T.ref.loc10_29, %T.as_type.loc10_29 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc10_26.1: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = as_compatible %.loc10_13.2 // CHECK:STDOUT: %.loc10_26.2: @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = converted %.loc10_13.2, %.loc10_26.1 -// CHECK:STDOUT: %impl.elem0.loc10_26.1: @InitFromAdaptedGeneric.%.loc10_26.4 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc10_26.1: @InitFromAdaptedGeneric.%.loc10_26.3 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc10_26.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc10_26.1: = bound_method %.loc10_26.2, %impl.elem0.loc10_26.1 // CHECK:STDOUT: %specific_impl_fn.loc10_26.1: = specific_impl_function %impl.elem0.loc10_26.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc10_26.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc10_26.2: = bound_method %.loc10_26.2, %specific_impl_fn.loc10_26.1 // CHECK:STDOUT: %.loc9_48: ref @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc10_26.3: init @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_26.2(%.loc10_26.2) to %.loc9_48 -// CHECK:STDOUT: return %.loc10_26.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @InitFromAdaptedGeneric.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_26.2(%.loc10_26.2) to %.loc9_48 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index c329191ea2a2..80539a3ff670 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -167,8 +167,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.b81)] // CHECK:STDOUT: %require_complete.loc9: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9 (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc9_16.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc9_16.4 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc9_16.2: @Class.Get.%.loc9_16.4 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc9_16.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc9_16.3 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc9_16.2: @Class.Get.%.loc9_16.3 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc9_16.2: = specific_impl_function %impl.elem0.loc9_16.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc9_16.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.Get.%Class (%Class.e74)) -> %return.param: @Class.Get.%T.binding.as_type (%T.binding.as_type) { @@ -177,13 +177,13 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %x.ref: @Class.Get.%Class.elem (%Class.elem.b81) = name_ref x, @Class.%.loc5_8 [concrete = @Class.%.loc5_8] // CHECK:STDOUT: %.loc9_16.1: ref @Class.Get.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc9_16.2: @Class.Get.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc9_16.1 -// CHECK:STDOUT: %impl.elem0.loc9_16.1: @Class.Get.%.loc9_16.4 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc9_16.1: @Class.Get.%.loc9_16.3 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc9_16.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc9_16.1: = bound_method %.loc9_16.2, %impl.elem0.loc9_16.1 // CHECK:STDOUT: %specific_impl_fn.loc9_16.1: = specific_impl_function %impl.elem0.loc9_16.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc9_16.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc9_16.2: = bound_method %.loc9_16.2, %specific_impl_fn.loc9_16.1 // CHECK:STDOUT: -// CHECK:STDOUT: %.loc9_16.3: init @Class.Get.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc9_16.2(%.loc9_16.2) to %.loc7_24 -// CHECK:STDOUT: return %.loc9_16.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Class.Get.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc9_16.2(%.loc9_16.2) to %.loc7_24 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -193,11 +193,11 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem.b81)] -// CHECK:STDOUT: %.loc15_12.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc15_12.2 (constants.%.892)] +// CHECK:STDOUT: %.loc15_12.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc15_12.1 (constants.%.892)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc13_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.29a)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc13_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.6b4)] -// CHECK:STDOUT: %.loc15_12.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc15_12.3 (constants.%.057)] -// CHECK:STDOUT: %impl.elem0.loc15_12.2: @Class.GetAddr.%.loc15_12.3 (%.057) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.120)] +// CHECK:STDOUT: %.loc15_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc15_12.2 (constants.%.057)] +// CHECK:STDOUT: %impl.elem0.loc15_12.2: @Class.GetAddr.%.loc15_12.2 (%.057) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.120)] // CHECK:STDOUT: %specific_impl_fn.loc15_12.2: = specific_impl_function %impl.elem0.loc15_12.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc15_12.2 (constants.%specific_impl_fn.5a3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.GetAddr.%Class (%Class.e74)) -> @Class.GetAddr.%ptr.loc13_36.1 (%ptr.2e1) { @@ -206,12 +206,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %x.ref: @Class.GetAddr.%Class.elem (%Class.elem.b81) = name_ref x, @Class.%.loc5_8 [concrete = @Class.%.loc5_8] // CHECK:STDOUT: %.loc15_17: ref @Class.GetAddr.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %addr: @Class.GetAddr.%ptr.loc13_36.1 (%ptr.2e1) = addr_of %.loc15_17 -// CHECK:STDOUT: %impl.elem0.loc15_12.1: @Class.GetAddr.%.loc15_12.3 (%.057) = impl_witness_access constants.%Copy.lookup_impl_witness.29a, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.120)] +// CHECK:STDOUT: %impl.elem0.loc15_12.1: @Class.GetAddr.%.loc15_12.2 (%.057) = impl_witness_access constants.%Copy.lookup_impl_witness.29a, element0 [symbolic = %impl.elem0.loc15_12.2 (constants.%impl.elem0.120)] // CHECK:STDOUT: %bound_method.loc15_12.1: = bound_method %addr, %impl.elem0.loc15_12.1 // CHECK:STDOUT: %specific_impl_fn.loc15_12.1: = specific_impl_function %impl.elem0.loc15_12.1, @Copy.Op(constants.%Copy.facet.6b4) [symbolic = %specific_impl_fn.loc15_12.2 (constants.%specific_impl_fn.5a3)] // CHECK:STDOUT: %bound_method.loc15_12.2: = bound_method %addr, %specific_impl_fn.loc15_12.1 -// CHECK:STDOUT: %.loc15_12.1: init @Class.GetAddr.%ptr.loc13_36.1 (%ptr.2e1) = call %bound_method.loc15_12.2(%addr) -// CHECK:STDOUT: return %.loc15_12.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Class.GetAddr.%ptr.loc13_36.1 (%ptr.2e1) = call %bound_method.loc15_12.2(%addr) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -324,7 +324,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.elem => constants.%Class.elem.9ac // CHECK:STDOUT: %require_complete.loc9 => constants.%complete_type.f8a // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.09c -// CHECK:STDOUT: %.loc9_16.4 => constants.%.fe5 +// CHECK:STDOUT: %.loc9_16.3 => constants.%.fe5 // CHECK:STDOUT: %impl.elem0.loc9_16.2 => constants.%Int.as.Copy.impl.Op.c85 // CHECK:STDOUT: %specific_impl_fn.loc9_16.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -341,10 +341,10 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %require_complete.loc13_36 => constants.%complete_type.3d0 // CHECK:STDOUT: %require_complete.loc13_22 => constants.%complete_type.1ec // CHECK:STDOUT: %Class.elem => constants.%Class.elem.9ac -// CHECK:STDOUT: %.loc15_12.2 => constants.%.ff7 +// CHECK:STDOUT: %.loc15_12.1 => constants.%.ff7 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.281 // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.0cf -// CHECK:STDOUT: %.loc15_12.3 => constants.%.023 +// CHECK:STDOUT: %.loc15_12.2 => constants.%.023 // CHECK:STDOUT: %impl.elem0.loc15_12.2 => constants.%ptr.as.Copy.impl.Op.624 // CHECK:STDOUT: %specific_impl_fn.loc15_12.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index 1279fcba3b8b..274666d86581 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -172,20 +172,20 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc7_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc7_12.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.F.%.loc7_12.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc7: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc7 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc7_12.2: @Class.F.%.loc7 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc7_12.2: = specific_impl_function %impl.elem0.loc7_12.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param: @Class.F.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Class.F.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: @Class.F.%T.binding.as_type (%T.binding.as_type) = name_ref n, %n -// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.F.%.loc7_12.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc7_12.1: @Class.F.%.loc7 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc7_12.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc7_12.1: = bound_method %n.ref, %impl.elem0.loc7_12.1 // CHECK:STDOUT: %specific_impl_fn.loc7_12.1: = specific_impl_function %impl.elem0.loc7_12.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc7_12.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc7_12.2: = bound_method %n.ref, %specific_impl_fn.loc7_12.1 // CHECK:STDOUT: %.loc6_14: ref @Class.F.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc7_12.1: init @Class.F.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc7_12.2(%n.ref) to %.loc6_14 -// CHECK:STDOUT: return %.loc7_12.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Class.F.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc7_12.2(%n.ref) to %.loc6_14 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -201,8 +201,8 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %require_complete.loc11: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc11 (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc11_16.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc11_16.4 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.G.%.loc11_16.4 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc11_16.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc11_16.3 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc11_16.2: @Class.G.%.loc11_16.3 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc11_16.2: = specific_impl_function %impl.elem0.loc11_16.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @Class.G.%Class (%Class)) -> %return.param: @Class.G.%T.binding.as_type (%T.binding.as_type) { @@ -211,13 +211,13 @@ class C(T:! Core.Copy) { // CHECK:STDOUT: %n.ref: @Class.G.%Class.elem (%Class.elem) = name_ref n, @Class.%.loc14_8 [concrete = @Class.%.loc14_8] // CHECK:STDOUT: %.loc11_16.1: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc11_16.2: @Class.G.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc11_16.1 -// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.G.%.loc11_16.4 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc11_16.1: @Class.G.%.loc11_16.3 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc11_16.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc11_16.1: = bound_method %.loc11_16.2, %impl.elem0.loc11_16.1 // CHECK:STDOUT: %specific_impl_fn.loc11_16.1: = specific_impl_function %impl.elem0.loc11_16.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc11_16.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc11_16.2: = bound_method %.loc11_16.2, %specific_impl_fn.loc11_16.1 // CHECK:STDOUT: %.loc10_22: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc11_16.3: init @Class.G.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc11_16.2(%.loc11_16.2) to %.loc10_22 -// CHECK:STDOUT: return %.loc11_16.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Class.G.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc11_16.2(%.loc11_16.2) to %.loc10_22 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index 8fe9053cb889..4d55af5224bc 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -107,8 +107,8 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived.loc13_45.1, %T.binding.as_type [symbolic = %Derived.elem (constants.%Derived.elem.7b5)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc13_18.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc15_11.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc13_18.1 [symbolic = %.loc15_11.4 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc15_11.2: @AccessDerived.%.loc15_11.4 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc15_11.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc13_18.1 [symbolic = %.loc15_11.3 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc15_11.2: @AccessDerived.%.loc15_11.3 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc15_11.2: = specific_impl_function %impl.elem0.loc15_11.2, @Copy.Op(%T.loc13_18.1) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @AccessDerived.%Derived.loc13_45.1 (%Derived.f74)) -> %return.param: @AccessDerived.%T.binding.as_type (%T.binding.as_type) { @@ -117,13 +117,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %d.ref: @AccessDerived.%Derived.elem (%Derived.elem.7b5) = name_ref d, @Derived.%.loc10 [concrete = @Derived.%.loc10] // CHECK:STDOUT: %.loc15_11.1: ref @AccessDerived.%T.binding.as_type (%T.binding.as_type) = class_element_access %x.ref, element1 // CHECK:STDOUT: %.loc15_11.2: @AccessDerived.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc15_11.1 -// CHECK:STDOUT: %impl.elem0.loc15_11.1: @AccessDerived.%.loc15_11.4 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc15_11.1: @AccessDerived.%.loc15_11.3 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc15_11.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc15_11.1: = bound_method %.loc15_11.2, %impl.elem0.loc15_11.1 // CHECK:STDOUT: %specific_impl_fn.loc15_11.1: = specific_impl_function %impl.elem0.loc15_11.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc15_11.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc15_11.2: = bound_method %.loc15_11.2, %specific_impl_fn.loc15_11.1 // CHECK:STDOUT: -// CHECK:STDOUT: %.loc15_11.3: init @AccessDerived.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc15_11.2(%.loc15_11.2) to %.loc13_48 -// CHECK:STDOUT: return %.loc15_11.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @AccessDerived.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc15_11.2(%.loc15_11.2) to %.loc13_48 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -137,8 +137,8 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %T.binding.as_type [symbolic = %Base.elem (constants.%Base.elem.12a)] // CHECK:STDOUT: %require_complete.loc21_13: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc21_13 (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc19_15.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc21_11.6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc19_15.1 [symbolic = %.loc21_11.6 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc21_11.2: @AccessBase.%.loc21_11.6 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc21_11.5: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc19_15.1 [symbolic = %.loc21_11.5 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc21_11.2: @AccessBase.%.loc21_11.5 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc21_11.2: = specific_impl_function %impl.elem0.loc21_11.2, @Copy.Op(%T.loc19_15.1) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @AccessBase.%Derived.loc19_42.1 (%Derived.f74)) -> %return.param: @AccessBase.%T.binding.as_type (%T.binding.as_type) { @@ -149,13 +149,13 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %.loc21_11.2: ref @AccessBase.%Base (%Base.edb) = converted %x.ref, %.loc21_11.1 // CHECK:STDOUT: %.loc21_11.3: ref @AccessBase.%T.binding.as_type (%T.binding.as_type) = class_element_access %.loc21_11.2, element0 // CHECK:STDOUT: %.loc21_11.4: @AccessBase.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc21_11.3 -// CHECK:STDOUT: %impl.elem0.loc21_11.1: @AccessBase.%.loc21_11.6 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc21_11.1: @AccessBase.%.loc21_11.5 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc21_11.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc21_11.1: = bound_method %.loc21_11.4, %impl.elem0.loc21_11.1 // CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc21_11.2: = bound_method %.loc21_11.4, %specific_impl_fn.loc21_11.1 // CHECK:STDOUT: -// CHECK:STDOUT: %.loc21_11.5: init @AccessBase.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc21_11.2(%.loc21_11.4) to %.loc19_45 -// CHECK:STDOUT: return %.loc21_11.5 to %return +// CHECK:STDOUT: %Copy.Op.call: init @AccessBase.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc21_11.2(%.loc21_11.4) to %.loc19_45 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index ad7d8e581b2f..7f8168be859e 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -288,20 +288,20 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc6, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc12_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc6 [symbolic = %.loc12_10.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc12_10.2: @Class.F.%.loc12_10.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc12: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc6 [symbolic = %.loc12 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc12_10.2: @Class.F.%.loc12 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc12_10.2: = specific_impl_function %impl.elem0.loc12_10.2, @Copy.Op(%T.loc6) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param.loc11: @Class.F.%T.binding.as_type (%T.binding.as_type)) -> %return.param.loc11: @Class.F.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: @Class.F.%T.binding.as_type (%T.binding.as_type) = name_ref n, %n.loc11 -// CHECK:STDOUT: %impl.elem0.loc12_10.1: @Class.F.%.loc12_10.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc12_10.1: @Class.F.%.loc12 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc12_10.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc12_10.1: = bound_method %n.ref, %impl.elem0.loc12_10.1 // CHECK:STDOUT: %specific_impl_fn.loc12_10.1: = specific_impl_function %impl.elem0.loc12_10.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc12_10.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc12_10.2: = bound_method %n.ref, %specific_impl_fn.loc12_10.1 // CHECK:STDOUT: %.loc11_33: ref @Class.F.%T.binding.as_type (%T.binding.as_type) = splice_block %return.loc11 {} -// CHECK:STDOUT: %.loc12_10.1: init @Class.F.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc12_10.2(%n.ref) to %.loc11_33 -// CHECK:STDOUT: return %.loc12_10.1 to %return.loc11 +// CHECK:STDOUT: %Copy.Op.call: init @Class.F.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc12_10.2(%n.ref) to %.loc11_33 +// CHECK:STDOUT: return %Copy.Op.call to %return.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -317,8 +317,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T.binding.as_type [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %require_complete.loc16: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc16 (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc7, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc16_14.4: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc7 [symbolic = %.loc16_14.4 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc16_14.2: @Class.G.%.loc16_14.4 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc16_14.3: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc7 [symbolic = %.loc16_14.3 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc16_14.2: @Class.G.%.loc16_14.3 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc16_14.2: = specific_impl_function %impl.elem0.loc16_14.2, @Copy.Op(%T.loc7) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param.loc15: @Class.G.%Class (%Class)) -> %return.param.loc15: @Class.G.%T.binding.as_type (%T.binding.as_type) { @@ -327,13 +327,13 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %n.ref: @Class.G.%Class.elem (%Class.elem) = name_ref n, @Class.%.loc8_8 [concrete = @Class.%.loc8_8] // CHECK:STDOUT: %.loc16_14.1: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc16_14.2: @Class.G.%T.binding.as_type (%T.binding.as_type) = acquire_value %.loc16_14.1 -// CHECK:STDOUT: %impl.elem0.loc16_14.1: @Class.G.%.loc16_14.4 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc16_14.1: @Class.G.%.loc16_14.3 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc16_14.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc16_14.1: = bound_method %.loc16_14.2, %impl.elem0.loc16_14.1 // CHECK:STDOUT: %specific_impl_fn.loc16_14.1: = specific_impl_function %impl.elem0.loc16_14.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc16_14.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc16_14.2: = bound_method %.loc16_14.2, %specific_impl_fn.loc16_14.1 // CHECK:STDOUT: %.loc15_41: ref @Class.G.%T.binding.as_type (%T.binding.as_type) = splice_block %return.loc15 {} -// CHECK:STDOUT: %.loc16_14.3: init @Class.G.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc16_14.2(%.loc16_14.2) to %.loc15_41 -// CHECK:STDOUT: return %.loc16_14.3 to %return.loc15 +// CHECK:STDOUT: %Copy.Op.call: init @Class.G.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc16_14.2(%.loc16_14.2) to %.loc15_41 +// CHECK:STDOUT: return %Copy.Op.call to %return.loc15 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_type.carbon b/toolchain/check/testdata/class/generic/member_type.carbon index ac2071930bf9..7975732b5bf9 100644 --- a/toolchain/check/testdata/class/generic/member_type.carbon +++ b/toolchain/check/testdata/class/generic/member_type.carbon @@ -265,21 +265,21 @@ fn Test() -> i32 { // CHECK:STDOUT: %require_complete.loc9_9: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_9 (constants.%require_complete.91e)] // CHECK:STDOUT: %struct_type.n: type = struct_type {.n: @Outer.F.%T.binding.as_type (%T.binding.as_type)} [symbolic = %struct_type.n (constants.%struct_type.n.8b0)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc9_38.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc9_38.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc9_38.2: @Outer.F.%.loc9_38.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc9_38: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc9_38 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc9_38.2: @Outer.F.%.loc9_38 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc9_38.2: = specific_impl_function %impl.elem0.loc9_38.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param: @Outer.F.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Outer.F.%Inner (%Inner.c00) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: @Outer.F.%T.binding.as_type (%T.binding.as_type) = name_ref n, %n // CHECK:STDOUT: %.loc9_39.1: @Outer.F.%struct_type.n (%struct_type.n.8b0) = struct_literal (%n.ref) -// CHECK:STDOUT: %impl.elem0.loc9_38.1: @Outer.F.%.loc9_38.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc9_38.1: @Outer.F.%.loc9_38 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc9_38.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc9_38.1: = bound_method %n.ref, %impl.elem0.loc9_38.1 // CHECK:STDOUT: %specific_impl_fn.loc9_38.1: = specific_impl_function %impl.elem0.loc9_38.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc9_38.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc9_38.2: = bound_method %n.ref, %specific_impl_fn.loc9_38.1 // CHECK:STDOUT: %.loc9_39.2: ref @Outer.F.%T.binding.as_type (%T.binding.as_type) = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_38.1: init @Outer.F.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc9_38.2(%n.ref) to %.loc9_39.2 -// CHECK:STDOUT: %.loc9_39.3: init @Outer.F.%T.binding.as_type (%T.binding.as_type) = initialize_from %.loc9_38.1 to %.loc9_39.2 +// CHECK:STDOUT: %Copy.Op.call: init @Outer.F.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc9_38.2(%n.ref) to %.loc9_39.2 +// CHECK:STDOUT: %.loc9_39.3: init @Outer.F.%T.binding.as_type (%T.binding.as_type) = initialize_from %Copy.Op.call to %.loc9_39.2 // CHECK:STDOUT: %.loc9_39.4: init @Outer.F.%Inner (%Inner.c00) = class_init (%.loc9_39.3), %return // CHECK:STDOUT: %.loc9_40: init @Outer.F.%Inner (%Inner.c00) = converted %.loc9_39.1, %.loc9_39.4 // CHECK:STDOUT: return %.loc9_40 to %return @@ -404,7 +404,7 @@ fn Test() -> i32 { // CHECK:STDOUT: %require_complete.loc9_9 => constants.%complete_type.f8a // CHECK:STDOUT: %struct_type.n => constants.%struct_type.n.033 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.09c -// CHECK:STDOUT: %.loc9_38.2 => constants.%.fe5 +// CHECK:STDOUT: %.loc9_38 => constants.%.fe5 // CHECK:STDOUT: %impl.elem0.loc9_38.2 => constants.%Int.as.Copy.impl.Op.c85 // CHECK:STDOUT: %specific_impl_fn.loc9_38.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -735,8 +735,8 @@ fn Test() -> i32 { // CHECK:STDOUT: %specific_impl_fn.loc11_41.1: = specific_impl_function %impl.elem0.loc11_41.1, @Inner.F(constants.%T, constants.%Inner.facet.cf5) [symbolic = %specific_impl_fn.loc11_41.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc11_52: = bound_method %self.ref, %specific_impl_fn.loc11_41.1 // CHECK:STDOUT: %.loc11_23: ref @C.as.Inner.impl.F.%T (%T) = splice_block %return {} -// CHECK:STDOUT: %.loc11_52: init @C.as.Inner.impl.F.%T (%T) = call %bound_method.loc11_52(%self.ref) to %.loc11_23 -// CHECK:STDOUT: return %.loc11_52 to %return +// CHECK:STDOUT: %Inner.F.call: init @C.as.Inner.impl.F.%T (%T) = call %bound_method.loc11_52(%self.ref) to %.loc11_23 +// CHECK:STDOUT: return %Inner.F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/access.carbon b/toolchain/check/testdata/facet/access.carbon index 0048e18104d8..df072855a01e 100644 --- a/toolchain/check/testdata/facet/access.carbon +++ b/toolchain/check/testdata/facet/access.carbon @@ -447,7 +447,7 @@ fn F2(U:! Z) { // CHECK:STDOUT: %.loc10_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10_4.2 (%.bea) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.DoIt(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc10_10: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() +// CHECK:STDOUT: %I.DoIt.call: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -494,8 +494,8 @@ fn F2(U:! Z) { // CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10_11.2 (%.d7e) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.Make(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_17: init @Use.%T.binding.as_type (%T.binding.as_type) = call %specific_impl_fn.loc10_11.1() to %.loc8_15 -// CHECK:STDOUT: return %.loc10_17 to %return +// CHECK:STDOUT: %I.Make.call: init @Use.%T.binding.as_type (%T.binding.as_type) = call %specific_impl_fn.loc10_11.1() to %.loc8_15 +// CHECK:STDOUT: return %I.Make.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -564,21 +564,21 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc9_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10_11: type = fn_type_with_self_type constants.%I.Copy.type, %T.loc9_8.1 [symbolic = %.loc10_11 (constants.%.8ac)] -// CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10_11 (%.8ac) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type constants.%I.Copy.type, %T.loc9_8.1 [symbolic = %.loc10 (constants.%.8ac)] +// CHECK:STDOUT: %impl.elem0.loc10_11.2: @Use.%.loc10 (%.8ac) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_11.2: = specific_impl_function %impl.elem0.loc10_11.2, @I.Copy(%T.loc9_8.1) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Use.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Use.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Use.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %Copy.ref: %I.assoc_type = name_ref Copy, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10_11 (%.8ac) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc10_11.1: @Use.%.loc10 (%.8ac) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_11.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_11: = bound_method %x.ref, %impl.elem0.loc10_11.1 // CHECK:STDOUT: %specific_impl_fn.loc10_11.1: = specific_impl_function %impl.elem0.loc10_11.1, @I.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_17: = bound_method %x.ref, %specific_impl_fn.loc10_11.1 // CHECK:STDOUT: %.loc9_21: ref @Use.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc10_17: init @Use.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_17(%x.ref) to %.loc9_21 -// CHECK:STDOUT: return %.loc10_17 to %return +// CHECK:STDOUT: %I.Copy.call: init @Use.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_17(%x.ref) to %.loc9_21 +// CHECK:STDOUT: return %I.Copy.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -614,17 +614,17 @@ fn F2(U:! Z) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: %I.lookup_impl_witness: = lookup_impl_witness %T.loc8_8.1, @I [symbolic = %I.lookup_impl_witness (constants.%I.lookup_impl_witness)] -// CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type constants.%I.Hello.type, %T.loc8_8.1 [symbolic = %.loc10_4 (constants.%.fe3)] -// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10_4 (%.fe3) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type constants.%I.Hello.type, %T.loc8_8.1 [symbolic = %.loc10 (constants.%.fe3)] +// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Use.%.loc10 (%.fe3) = impl_witness_access %I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @I.Hello(%T.loc8_8.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Use.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Use.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %Hello.ref: %I.assoc_type = name_ref Hello, @I.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10_4 (%.fe3) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Use.%.loc10 (%.fe3) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @I.Hello(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc10_11: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() +// CHECK:STDOUT: %I.Hello.call: init %empty_tuple.type = call %specific_impl_fn.loc10_4.1() // CHECK:STDOUT: // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -676,8 +676,8 @@ fn F2(U:! Z) { // CHECK:STDOUT: %specific_impl_fn.loc10_14.1: = specific_impl_function %impl.elem0.loc10_14.1, @I.Copy(constants.%T) [symbolic = %specific_impl_fn.loc10_14.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_21: = bound_method %x.ref, %specific_impl_fn.loc10_14.1 // CHECK:STDOUT: -// CHECK:STDOUT: %.loc10_21: init @UseIndirect.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_21(%x.ref) to %.loc8_29 -// CHECK:STDOUT: return %.loc10_21 to %return +// CHECK:STDOUT: %I.Copy.call: init @UseIndirect.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc10_21(%x.ref) to %.loc8_29 +// CHECK:STDOUT: return %I.Copy.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon index 72f3489a62e4..77ec4d44b0d4 100644 --- a/toolchain/check/testdata/facet/call_combined_impl_witness.carbon +++ b/toolchain/check/testdata/facet/call_combined_impl_witness.carbon @@ -299,59 +299,59 @@ fn F() { // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.23e)] // CHECK:STDOUT: %A.lookup_impl_witness: = lookup_impl_witness %T.loc33_6.1, @A [symbolic = %A.lookup_impl_witness (constants.%A.lookup_impl_witness)] // CHECK:STDOUT: %A.facet.loc34: %A.type = facet_value %T.binding.as_type, (%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.9e1)] -// CHECK:STDOUT: %.loc34_4: type = fn_type_with_self_type constants.%A.AA.type, %A.facet.loc34 [symbolic = %.loc34_4 (constants.%.20d)] -// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34_4 (%.20d) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] +// CHECK:STDOUT: %.loc34: type = fn_type_with_self_type constants.%A.AA.type, %A.facet.loc34 [symbolic = %.loc34 (constants.%.20d)] +// CHECK:STDOUT: %impl.elem0.loc34_4.2: @G.%.loc34 (%.20d) = impl_witness_access %A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.2: = specific_impl_function %impl.elem0.loc34_4.2, @A.AA(%A.facet.loc34) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.0f2)] // CHECK:STDOUT: %B.lookup_impl_witness: = lookup_impl_witness %T.loc33_6.1, @B [symbolic = %B.lookup_impl_witness (constants.%B.lookup_impl_witness)] // CHECK:STDOUT: %B.facet.loc35: %B.type = facet_value %T.binding.as_type, (%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.6d0)] -// CHECK:STDOUT: %.loc35_4: type = fn_type_with_self_type constants.%B.BB.type, %B.facet.loc35 [symbolic = %.loc35_4 (constants.%.841)] -// CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35_4 (%.841) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] +// CHECK:STDOUT: %.loc35: type = fn_type_with_self_type constants.%B.BB.type, %B.facet.loc35 [symbolic = %.loc35 (constants.%.841)] +// CHECK:STDOUT: %impl.elem0.loc35_4.2: @G.%.loc35 (%.841) = impl_witness_access %B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.2: = specific_impl_function %impl.elem0.loc35_4.2, @B.BB(%B.facet.loc35) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.a0f)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @G.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref.loc34: @G.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %AA.ref.loc34: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] -// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34_4 (%.20d) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] +// CHECK:STDOUT: %impl.elem0.loc34_4.1: @G.%.loc34 (%.20d) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @A.AA(constants.%A.facet.9e1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.0f2)] -// CHECK:STDOUT: %.loc34_8: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() +// CHECK:STDOUT: %A.AA.call.loc34: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() // CHECK:STDOUT: %t.ref.loc35: @G.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %BB.ref.loc35: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] -// CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35_4 (%.841) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] +// CHECK:STDOUT: %impl.elem0.loc35_4.1: @G.%.loc35 (%.841) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] // CHECK:STDOUT: %specific_impl_fn.loc35_4.1: = specific_impl_function %impl.elem0.loc35_4.1, @B.BB(constants.%B.facet.6d0) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.a0f)] -// CHECK:STDOUT: %.loc35_8: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() +// CHECK:STDOUT: %B.BB.call.loc35: init %empty_tuple.type = call %specific_impl_fn.loc35_4.1() // CHECK:STDOUT: %T.ref.loc37: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %AA.ref.loc37: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] // CHECK:STDOUT: %T.as_type.loc37: type = facet_access_type %T.ref.loc37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc37_4: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34_4 (%.20d) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] +// CHECK:STDOUT: %.loc37: type = converted %T.ref.loc37, %T.as_type.loc37 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] +// CHECK:STDOUT: %impl.elem0.loc37: @G.%.loc34 (%.20d) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] // CHECK:STDOUT: %specific_impl_fn.loc37: = specific_impl_function %impl.elem0.loc37, @A.AA(constants.%A.facet.9e1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.0f2)] -// CHECK:STDOUT: %.loc37_8: init %empty_tuple.type = call %specific_impl_fn.loc37() +// CHECK:STDOUT: %A.AA.call.loc37: init %empty_tuple.type = call %specific_impl_fn.loc37() // CHECK:STDOUT: %T.ref.loc38: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %BB.ref.loc38: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] // CHECK:STDOUT: %T.as_type.loc38: type = facet_access_type %T.ref.loc38 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %.loc38_4: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] -// CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35_4 (%.841) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] +// CHECK:STDOUT: %.loc38: type = converted %T.ref.loc38, %T.as_type.loc38 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] +// CHECK:STDOUT: %impl.elem0.loc38: @G.%.loc35 (%.841) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] // CHECK:STDOUT: %specific_impl_fn.loc38: = specific_impl_function %impl.elem0.loc38, @B.BB(constants.%B.facet.6d0) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.a0f)] -// CHECK:STDOUT: %.loc38_8: init %empty_tuple.type = call %specific_impl_fn.loc38() +// CHECK:STDOUT: %B.BB.call.loc38: init %empty_tuple.type = call %specific_impl_fn.loc38() // CHECK:STDOUT: %T.ref.loc40: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %A.ref.loc40: type = name_ref A, file.%A.decl [concrete = constants.%A.type] // CHECK:STDOUT: %AA.ref.loc40: %A.assoc_type = name_ref AA, @A.%assoc0 [concrete = constants.%assoc0.6e7] // CHECK:STDOUT: %T.as_type.loc40: type = facet_access_type %T.ref.loc40 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %A.facet.loc40: %A.type = facet_value %T.as_type.loc40, (constants.%A.lookup_impl_witness) [symbolic = %A.facet.loc34 (constants.%A.facet.9e1)] -// CHECK:STDOUT: %.loc40_4: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.9e1)] -// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34_4 (%.20d) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] +// CHECK:STDOUT: %.loc40: %A.type = converted %T.ref.loc40, %A.facet.loc40 [symbolic = %A.facet.loc34 (constants.%A.facet.9e1)] +// CHECK:STDOUT: %impl.elem0.loc40: @G.%.loc34 (%.20d) = impl_witness_access constants.%A.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0.888)] // CHECK:STDOUT: %specific_impl_fn.loc40: = specific_impl_function %impl.elem0.loc40, @A.AA(constants.%A.facet.9e1) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn.0f2)] -// CHECK:STDOUT: %.loc40_12: init %empty_tuple.type = call %specific_impl_fn.loc40() +// CHECK:STDOUT: %A.AA.call.loc40: init %empty_tuple.type = call %specific_impl_fn.loc40() // CHECK:STDOUT: %T.ref.loc41: %facet_type.b5f = name_ref T, %T.loc33_6.2 [symbolic = %T.loc33_6.1 (constants.%T)] // CHECK:STDOUT: %B.ref.loc41: type = name_ref B, file.%B.decl [concrete = constants.%B.type] // CHECK:STDOUT: %BB.ref.loc41: %B.assoc_type = name_ref BB, @B.%assoc0 [concrete = constants.%assoc0.a29] // CHECK:STDOUT: %T.as_type.loc41: type = facet_access_type %T.ref.loc41 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %B.facet.loc41: %B.type = facet_value %T.as_type.loc41, (constants.%B.lookup_impl_witness) [symbolic = %B.facet.loc35 (constants.%B.facet.6d0)] -// CHECK:STDOUT: %.loc41_4: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.6d0)] -// CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35_4 (%.841) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] +// CHECK:STDOUT: %.loc41: %B.type = converted %T.ref.loc41, %B.facet.loc41 [symbolic = %B.facet.loc35 (constants.%B.facet.6d0)] +// CHECK:STDOUT: %impl.elem0.loc41: @G.%.loc35 (%.841) = impl_witness_access constants.%B.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc35_4.2 (constants.%impl.elem0.6b8)] // CHECK:STDOUT: %specific_impl_fn.loc41: = specific_impl_function %impl.elem0.loc41, @B.BB(constants.%B.facet.6d0) [symbolic = %specific_impl_fn.loc35_4.2 (constants.%specific_impl_fn.a0f)] -// CHECK:STDOUT: %.loc41_12: init %empty_tuple.type = call %specific_impl_fn.loc41() +// CHECK:STDOUT: %B.BB.call.loc41: init %empty_tuple.type = call %specific_impl_fn.loc41() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -406,12 +406,12 @@ fn F() { // CHECK:STDOUT: %require_complete => constants.%complete_type // CHECK:STDOUT: %A.lookup_impl_witness => constants.%A.impl_witness // CHECK:STDOUT: %A.facet.loc34 => constants.%A.facet.d7e -// CHECK:STDOUT: %.loc34_4 => constants.%.1ee +// CHECK:STDOUT: %.loc34 => constants.%.1ee // CHECK:STDOUT: %impl.elem0.loc34_4.2 => constants.%C.as.A.impl.AA // CHECK:STDOUT: %specific_impl_fn.loc34_4.2 => constants.%C.as.A.impl.AA // CHECK:STDOUT: %B.lookup_impl_witness => constants.%B.impl_witness // CHECK:STDOUT: %B.facet.loc35 => constants.%B.facet.c0b -// CHECK:STDOUT: %.loc35_4 => constants.%.d72 +// CHECK:STDOUT: %.loc35 => constants.%.d72 // CHECK:STDOUT: %impl.elem0.loc35_4.2 => constants.%C.as.B.impl.BB // CHECK:STDOUT: %specific_impl_fn.loc35_4.2 => constants.%C.as.B.impl.BB // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon index 044445a0024f..42fe240b6699 100644 --- a/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon +++ b/toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon @@ -322,7 +322,7 @@ fn B() { // CHECK:STDOUT: %.loc16_4.2: type = converted %U.ref.loc16, %U.as_type.loc16 [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] // CHECK:STDOUT: %impl.elem0.loc16_4.1: @CallGenericMethod.%.loc16_4.3 (%.096) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @Generic.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc16_7: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() +// CHECK:STDOUT: %Generic.F.call: init %empty_tuple.type = call %specific_impl_fn.loc16_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/for/actual.carbon b/toolchain/check/testdata/for/actual.carbon index c9f69faac529..937e1c5c5a7a 100644 --- a/toolchain/check/testdata/for/actual.carbon +++ b/toolchain/check/testdata/for/actual.carbon @@ -489,11 +489,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %require_complete.loc5_52: = require_complete_type %IntRange [symbolic = %require_complete.loc5_52 (constants.%require_complete.852)] // CHECK:STDOUT: %require_complete.loc5_16: = require_complete_type %Int.loc5_28.1 [symbolic = %require_complete.loc5_16 (constants.%require_complete.9019d7.1)] // CHECK:STDOUT: %struct_type.start.end: type = struct_type {.start: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1), .end: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1)} [symbolic = %struct_type.start.end (constants.%struct_type.start.end.ff1)] -// CHECK:STDOUT: %.loc6_22.2: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc6_22.2 (constants.%.2e8)] +// CHECK:STDOUT: %.loc6_22.1: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc6_22.1 (constants.%.2e8)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc5_28.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.7a8)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc5_28.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.118)] -// CHECK:STDOUT: %.loc6_22.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_22.3 (constants.%.6b8)] -// CHECK:STDOUT: %impl.elem0.loc6_22.2: @IntRange.Make.%.loc6_22.3 (%.6b8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %.loc6_22.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_22.2 (constants.%.6b8)] +// CHECK:STDOUT: %impl.elem0.loc6_22.2: @IntRange.Make.%.loc6_22.2 (%.6b8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %specific_impl_fn.loc6_22.2: = specific_impl_function %impl.elem0.loc6_22.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%start.param: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1), %end.param: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1)) -> %return.param: @IntRange.Make.%IntRange (%IntRange.91c) { @@ -501,20 +501,20 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %start.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = name_ref start, %start // CHECK:STDOUT: %end.ref: @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = name_ref end, %end // CHECK:STDOUT: %.loc6_39.1: @IntRange.Make.%struct_type.start.end (%struct_type.start.end.ff1) = struct_literal (%start.ref, %end.ref) -// CHECK:STDOUT: %impl.elem0.loc6_22.1: @IntRange.Make.%.loc6_22.3 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %impl.elem0.loc6_22.1: @IntRange.Make.%.loc6_22.2 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %bound_method.loc6_22.1: = bound_method %start.ref, %impl.elem0.loc6_22.1 // CHECK:STDOUT: %specific_impl_fn.loc6_22.1: = specific_impl_function %impl.elem0.loc6_22.1, @Copy.Op(constants.%Copy.facet.118) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: %bound_method.loc6_22.2: = bound_method %start.ref, %specific_impl_fn.loc6_22.1 -// CHECK:STDOUT: %.loc6_22.1: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_22.2(%start.ref) +// CHECK:STDOUT: %Copy.Op.call.loc6_22: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_22.2(%start.ref) // CHECK:STDOUT: %.loc6_39.2: ref @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = class_element_access %return, element0 -// CHECK:STDOUT: %.loc6_39.3: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = initialize_from %.loc6_22.1 to %.loc6_39.2 -// CHECK:STDOUT: %impl.elem0.loc6_36: @IntRange.Make.%.loc6_22.3 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %.loc6_39.3: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = initialize_from %Copy.Op.call.loc6_22 to %.loc6_39.2 +// CHECK:STDOUT: %impl.elem0.loc6_36: @IntRange.Make.%.loc6_22.2 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc6_22.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %bound_method.loc6_36.1: = bound_method %end.ref, %impl.elem0.loc6_36 // CHECK:STDOUT: %specific_impl_fn.loc6_36: = specific_impl_function %impl.elem0.loc6_36, @Copy.Op(constants.%Copy.facet.118) [symbolic = %specific_impl_fn.loc6_22.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: %bound_method.loc6_36.2: = bound_method %end.ref, %specific_impl_fn.loc6_36 -// CHECK:STDOUT: %.loc6_36: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_36.2(%end.ref) +// CHECK:STDOUT: %Copy.Op.call.loc6_36: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = call %bound_method.loc6_36.2(%end.ref) // CHECK:STDOUT: %.loc6_39.4: ref @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = class_element_access %return, element1 -// CHECK:STDOUT: %.loc6_39.5: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = initialize_from %.loc6_36 to %.loc6_39.4 +// CHECK:STDOUT: %.loc6_39.5: init @IntRange.Make.%Int.loc5_28.1 (%Int.fc6021.1) = initialize_from %Copy.Op.call.loc6_36 to %.loc6_39.4 // CHECK:STDOUT: %.loc6_39.6: init @IntRange.Make.%IntRange (%IntRange.91c) = class_init (%.loc6_39.3, %.loc6_39.5), %return // CHECK:STDOUT: %.loc6_40: init @IntRange.Make.%IntRange (%IntRange.91c) = converted %.loc6_39.1, %.loc6_39.6 // CHECK:STDOUT: return %.loc6_40 to %return @@ -532,11 +532,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %require_complete.loc10_22: = require_complete_type %IntRange [symbolic = %require_complete.loc10_22 (constants.%require_complete.852)] // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc10_45.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.560)] // CHECK:STDOUT: %require_complete.loc10_60: = require_complete_type %Int.loc10_45.1 [symbolic = %require_complete.loc10_60 (constants.%require_complete.9019d7.1)] -// CHECK:STDOUT: %.loc10_60.4: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc10_60.4 (constants.%.2e8)] +// CHECK:STDOUT: %.loc10_60.3: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc10_60.3 (constants.%.2e8)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %Int.loc10_45.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.7a8)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Int.loc10_45.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.118)] -// CHECK:STDOUT: %.loc10_60.5: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_60.5 (constants.%.6b8)] -// CHECK:STDOUT: %impl.elem0.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.5 (%.6b8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %.loc10_60.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_60.4 (constants.%.6b8)] +// CHECK:STDOUT: %impl.elem0.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.6b8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %specific_impl_fn.loc10_60.2: = specific_impl_function %impl.elem0.loc10_60.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @IntRange.as.Iterate.impl.NewCursor.%IntRange (%IntRange.91c)) -> @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) { @@ -545,12 +545,12 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %start.ref: @IntRange.as.Iterate.impl.NewCursor.%IntRange.elem (%IntRange.elem.560) = name_ref start, @IntRange.%.loc22 [concrete = @IntRange.%.loc22] // CHECK:STDOUT: %.loc10_60.1: ref @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc10_60.2: @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = acquire_value %.loc10_60.1 -// CHECK:STDOUT: %impl.elem0.loc10_60.1: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.5 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %impl.elem0.loc10_60.1: @IntRange.as.Iterate.impl.NewCursor.%.loc10_60.4 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc10_60.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %bound_method.loc10_60.1: = bound_method %.loc10_60.2, %impl.elem0.loc10_60.1 // CHECK:STDOUT: %specific_impl_fn.loc10_60.1: = specific_impl_function %impl.elem0.loc10_60.1, @Copy.Op(constants.%Copy.facet.118) [symbolic = %specific_impl_fn.loc10_60.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: %bound_method.loc10_60.2: = bound_method %.loc10_60.2, %specific_impl_fn.loc10_60.1 -// CHECK:STDOUT: %.loc10_60.3: init @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = call %bound_method.loc10_60.2(%.loc10_60.2) -// CHECK:STDOUT: return %.loc10_60.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @IntRange.as.Iterate.impl.NewCursor.%Int.loc10_45.1 (%Int.fc6021.1) = call %bound_method.loc10_60.2(%.loc10_60.2) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -575,9 +575,9 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %require_complete.loc11_31: = require_complete_type %ptr.loc11_44.1 [symbolic = %require_complete.loc11_31 (constants.%require_complete.45c)] // CHECK:STDOUT: %require_complete.loc12: = require_complete_type %Int.loc11_43.1 [symbolic = %require_complete.loc12 (constants.%require_complete.9019d7.1)] // CHECK:STDOUT: %pattern_type.loc12: type = pattern_type %Int.loc11_43.1 [symbolic = %pattern_type.loc12 (constants.%pattern_type.764eab.1)] -// CHECK:STDOUT: %.loc12_32.4: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc12_32.4 (constants.%.2e8)] -// CHECK:STDOUT: %.loc12_32.5: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc12_32.5 (constants.%.6b8)] -// CHECK:STDOUT: %impl.elem0.loc12_32.2: @IntRange.as.Iterate.impl.Next.%.loc12_32.5 (%.6b8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %.loc12_32.3: require_specific_def_type = require_specific_def @Int.as.Copy.impl(%N) [symbolic = %.loc12_32.3 (constants.%.2e8)] +// CHECK:STDOUT: %.loc12_32.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc12_32.4 (constants.%.6b8)] +// CHECK:STDOUT: %impl.elem0.loc12_32.2: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.6b8) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %specific_impl_fn.loc12_32.2: = specific_impl_function %impl.elem0.loc12_32.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: %IntRange.elem: type = unbound_element_type %IntRange, %Int.loc11_43.1 [symbolic = %IntRange.elem (constants.%IntRange.elem.560)] // CHECK:STDOUT: %OrderedWith.type.loc13_17.2: type = facet_type <@OrderedWith, @OrderedWith(%Int.loc11_43.1)> [symbolic = %OrderedWith.type.loc13_17.2 (constants.%OrderedWith.type.053)] @@ -592,11 +592,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.type: type = fn_type @Int.as.OrderedWith.impl.Less.1, @Int.as.OrderedWith.impl.5aa(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.type (constants.%Int.as.OrderedWith.impl.Less.type.075)] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less: @IntRange.as.Iterate.impl.Next.%Int.as.OrderedWith.impl.Less.type (%Int.as.OrderedWith.impl.Less.type.075) = struct_value () [symbolic = %Int.as.OrderedWith.impl.Less (constants.%Int.as.OrderedWith.impl.Less.bdd)] // CHECK:STDOUT: %Int.as.OrderedWith.impl.Less.specific_fn: = specific_function %Int.as.OrderedWith.impl.Less, @Int.as.OrderedWith.impl.Less.1(%N, %N) [symbolic = %Int.as.OrderedWith.impl.Less.specific_fn (constants.%Int.as.OrderedWith.impl.Less.specific_fn.f93)] -// CHECK:STDOUT: %.loc14_9.2: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N) [symbolic = %.loc14_9.2 (constants.%.704)] +// CHECK:STDOUT: %.loc14_9.1: require_specific_def_type = require_specific_def @Int.as.Inc.impl(%N) [symbolic = %.loc14_9.1 (constants.%.704)] // CHECK:STDOUT: %Inc.lookup_impl_witness: = lookup_impl_witness %Int.loc11_43.1, @Inc [symbolic = %Inc.lookup_impl_witness (constants.%Inc.lookup_impl_witness)] // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Int.loc11_43.1, (%Inc.lookup_impl_witness) [symbolic = %Inc.facet (constants.%Inc.facet)] -// CHECK:STDOUT: %.loc14_9.3: type = fn_type_with_self_type constants.%Inc.Op.type, %Inc.facet [symbolic = %.loc14_9.3 (constants.%.192)] -// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.3 (%.192) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.163)] +// CHECK:STDOUT: %.loc14_9.2: type = fn_type_with_self_type constants.%Inc.Op.type, %Inc.facet [symbolic = %.loc14_9.2 (constants.%.192)] +// CHECK:STDOUT: %impl.elem0.loc14_9.2: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.192) = impl_witness_access %Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.163)] // CHECK:STDOUT: %specific_impl_fn.loc14_9.2: = specific_impl_function %impl.elem0.loc14_9.2, @Inc.Op(%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.a8c)] // CHECK:STDOUT: %Optional.Some.type: type = fn_type @Optional.Some, @Optional(%OptionalStorage.facet.loc11_75.1) [symbolic = %Optional.Some.type (constants.%Optional.Some.type.af7)] // CHECK:STDOUT: %Optional.Some: @IntRange.as.Iterate.impl.Next.%Optional.Some.type (%Optional.Some.type.af7) = struct_value () [symbolic = %Optional.Some (constants.%Optional.Some.a3b)] @@ -623,12 +623,12 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %cursor.ref.loc12: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.c9c) = name_ref cursor, %cursor // CHECK:STDOUT: %.loc12_32.1: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = deref %cursor.ref.loc12 // CHECK:STDOUT: %.loc12_32.2: @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = acquire_value %.loc12_32.1 -// CHECK:STDOUT: %impl.elem0.loc12_32.1: @IntRange.as.Iterate.impl.Next.%.loc12_32.5 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.f77)] +// CHECK:STDOUT: %impl.elem0.loc12_32.1: @IntRange.as.Iterate.impl.Next.%.loc12_32.4 (%.6b8) = impl_witness_access constants.%Copy.lookup_impl_witness.7a8, element0 [symbolic = %impl.elem0.loc12_32.2 (constants.%impl.elem0.f77)] // CHECK:STDOUT: %bound_method.loc12_32.1: = bound_method %.loc12_32.2, %impl.elem0.loc12_32.1 // CHECK:STDOUT: %specific_impl_fn.loc12_32.1: = specific_impl_function %impl.elem0.loc12_32.1, @Copy.Op(constants.%Copy.facet.118) [symbolic = %specific_impl_fn.loc12_32.2 (constants.%specific_impl_fn.757)] // CHECK:STDOUT: %bound_method.loc12_32.2: = bound_method %.loc12_32.2, %specific_impl_fn.loc12_32.1 -// CHECK:STDOUT: %.loc12_32.3: init @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = call %bound_method.loc12_32.2(%.loc12_32.2) -// CHECK:STDOUT: assign %value.var, %.loc12_32.3 +// CHECK:STDOUT: %Copy.Op.call: init @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = call %bound_method.loc12_32.2(%.loc12_32.2) +// CHECK:STDOUT: assign %value.var, %Copy.Op.call // CHECK:STDOUT: %.loc12_28: type = splice_block %Int.loc12 [symbolic = %Int.loc11_43.1 (constants.%Int.fc6021.1)] { // CHECK:STDOUT: %Core.ref.loc12: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Int.ref.loc12: %Int.type = name_ref Int, imports.%Core.Int [concrete = constants.%Int.generic] @@ -657,11 +657,11 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %cursor.ref.loc14: @IntRange.as.Iterate.impl.Next.%ptr.loc11_44.1 (%ptr.c9c) = name_ref cursor, %cursor // CHECK:STDOUT: %.loc14_11: ref @IntRange.as.Iterate.impl.Next.%Int.loc11_43.1 (%Int.fc6021.1) = deref %cursor.ref.loc14 -// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.3 (%.192) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.163)] +// CHECK:STDOUT: %impl.elem0.loc14_9.1: @IntRange.as.Iterate.impl.Next.%.loc14_9.2 (%.192) = impl_witness_access constants.%Inc.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_9.2 (constants.%impl.elem0.163)] // CHECK:STDOUT: %bound_method.loc14_9.1: = bound_method %.loc14_11, %impl.elem0.loc14_9.1 // CHECK:STDOUT: %specific_impl_fn.loc14_9.1: = specific_impl_function %impl.elem0.loc14_9.1, @Inc.Op(constants.%Inc.facet) [symbolic = %specific_impl_fn.loc14_9.2 (constants.%specific_impl_fn.a8c)] // CHECK:STDOUT: %bound_method.loc14_9.2: = bound_method %.loc14_11, %specific_impl_fn.loc14_9.1 -// CHECK:STDOUT: %.loc14_9.1: init %empty_tuple.type = call %bound_method.loc14_9.2(%.loc14_11) +// CHECK:STDOUT: %Inc.Op.call: init %empty_tuple.type = call %bound_method.loc14_9.2(%.loc14_11) // CHECK:STDOUT: %Core.ref.loc15_16: = name_ref Core, imports.%Core [concrete = imports.%Core] // CHECK:STDOUT: %Optional.ref.loc15: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic] // CHECK:STDOUT: %Core.ref.loc15_30: = name_ref Core, imports.%Core [concrete = imports.%Core] @@ -827,10 +827,10 @@ fn Read(y:! Core.IntLiteral()) { // CHECK:STDOUT: %require_complete.loc5_52 => constants.%complete_type.c45 // CHECK:STDOUT: %require_complete.loc5_16 => constants.%complete_type.f8a // CHECK:STDOUT: %struct_type.start.end => constants.%struct_type.start.end.d0a -// CHECK:STDOUT: %.loc6_22.2 => constants.%.0d3 +// CHECK:STDOUT: %.loc6_22.1 => constants.%.0d3 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.09c // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.6df -// CHECK:STDOUT: %.loc6_22.3 => constants.%.fe5 +// CHECK:STDOUT: %.loc6_22.2 => constants.%.fe5 // CHECK:STDOUT: %impl.elem0.loc6_22.2 => constants.%Int.as.Copy.impl.Op.c85 // CHECK:STDOUT: %specific_impl_fn.loc6_22.2 => constants.%Int.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/call.carbon b/toolchain/check/testdata/function/generic/call.carbon index 969be5ca226d..ad6751a9a6e3 100644 --- a/toolchain/check/testdata/function/generic/call.carbon +++ b/toolchain/check/testdata/function/generic/call.carbon @@ -161,20 +161,20 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_13.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc6_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6_10.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6_10.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Function.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6_10.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %x.ref, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %x.ref, %specific_impl_fn.loc6_10.1 // CHECK:STDOUT: %.loc5_34: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc6_10.1: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34 -// CHECK:STDOUT: return %.loc6_10.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -252,7 +252,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.91e // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.edd -// CHECK:STDOUT: %.loc6_10.2 => constants.%.232 +// CHECK:STDOUT: %.loc6 => constants.%.232 // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.8df // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.5c4 // CHECK:STDOUT: } @@ -277,7 +277,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc6_10.2 => constants.%.cb5 +// CHECK:STDOUT: %.loc6 => constants.%.cb5 // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.771 // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.b85 // CHECK:STDOUT: } @@ -290,7 +290,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.d05 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.bbd -// CHECK:STDOUT: %.loc6_10.2 => constants.%.99d +// CHECK:STDOUT: %.loc6 => constants.%.99d // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.24b // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -386,20 +386,20 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T.loc5_13.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc6_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6_10.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6_10.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc6: type = fn_type_with_self_type constants.%Copy.Op.type, %T.loc5_13.1 [symbolic = %.loc6 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @Function.%.loc6 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%T.loc5_13.1) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Function.%T.binding.as_type (%T.binding.as_type)) -> %return.param: @Function.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Function.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6_10.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @Function.%.loc6 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %x.ref, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %x.ref, %specific_impl_fn.loc6_10.1 // CHECK:STDOUT: %.loc5_34: ref @Function.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc6_10.1: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34 -// CHECK:STDOUT: return %.loc6_10.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Function.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc6_10.2(%x.ref) to %.loc5_34 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -468,7 +468,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.91e // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.edd -// CHECK:STDOUT: %.loc6_10.2 => constants.%.232 +// CHECK:STDOUT: %.loc6 => constants.%.232 // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.8df // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.5c4 // CHECK:STDOUT: } @@ -493,7 +493,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc6_10.2 => constants.%.cb5 +// CHECK:STDOUT: %.loc6 => constants.%.cb5 // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%impl.elem0.771 // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%specific_impl_fn.b85 // CHECK:STDOUT: } @@ -506,7 +506,7 @@ fn CallSpecific(x: C*) -> C* { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type.d05 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.bbd -// CHECK:STDOUT: %.loc6_10.2 => constants.%.99d +// CHECK:STDOUT: %.loc6 => constants.%.99d // CHECK:STDOUT: %impl.elem0.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.24b // CHECK:STDOUT: %specific_impl_fn.loc6_10.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon index d31df6e23407..3ea8ea67a1aa 100644 --- a/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon +++ b/toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon @@ -272,7 +272,7 @@ fn G() { // CHECK:STDOUT: %.loc34_4.2: type = converted %U.ref, %U.as_type [symbolic = %U.binding.as_type (constants.%U.binding.as_type)] // CHECK:STDOUT: %impl.elem0.loc34_4.1: @CallGenericMethod.%.loc34_4.3 (%.096) = impl_witness_access constants.%Generic.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc34_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc34_4.1: = specific_impl_function %impl.elem0.loc34_4.1, @Generic.F(constants.%T, constants.%U) [symbolic = %specific_impl_fn.loc34_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc34_7: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() +// CHECK:STDOUT: %Generic.F.call: init %empty_tuple.type = call %specific_impl_fn.loc34_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon index 97c87e0e6379..b2c398220adb 100644 --- a/toolchain/check/testdata/function/generic/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/indirect_generic_type.carbon @@ -46,11 +46,11 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc6_10.4: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc6_10.4 (constants.%.841)] +// CHECK:STDOUT: %.loc6_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc6_10.3 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc6_10.5: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_10.5 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.5 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc6_10.4 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%p.param: @F.%ptr.loc4_21.1 (%ptr.125)) -> @F.%ptr.loc4_20.1 (%ptr.e8f) { @@ -58,12 +58,12 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %p.ref: @F.%ptr.loc4_21.1 (%ptr.125) = name_ref p, %p // CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc4_20.1 (%ptr.e8f) = deref %p.ref // CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc4_20.1 (%ptr.e8f) = acquire_value %.loc6_10.1 -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.5 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %.loc6_10.3: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2) -// CHECK:STDOUT: return %.loc6_10.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc4_20.1 (%ptr.e8f) = call %bound_method.loc6_10.2(%.loc6_10.2) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/type_param_scope.carbon b/toolchain/check/testdata/function/generic/type_param_scope.carbon index edf6803ef0e4..e5e02dedf7c8 100644 --- a/toolchain/check/testdata/function/generic/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/type_param_scope.carbon @@ -45,11 +45,11 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: %.loc7_10.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc7_10.2 (constants.%.841)] +// CHECK:STDOUT: %.loc7_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc4_6.1) [symbolic = %.loc7_10.1 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc4_20.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc4_20.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc7_10.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_10.3 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.3 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc7_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc7_10.2 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc7_10.2: @F.%.loc7_10.2 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc7_10.2: = specific_impl_function %impl.elem0.loc7_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%n.param: @F.%ptr.loc4_20.1 (%ptr)) -> @F.%ptr.loc4_20.1 (%ptr) { @@ -64,12 +64,12 @@ fn F(T:! type, n: T*) -> T* { // CHECK:STDOUT: } // CHECK:STDOUT: %m: @F.%ptr.loc4_20.1 (%ptr) = value_binding m, %n.ref // CHECK:STDOUT: %m.ref: @F.%ptr.loc4_20.1 (%ptr) = name_ref m, %m -// CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.3 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc7_10.1: @F.%.loc7_10.2 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc7_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc7_10.1: = bound_method %m.ref, %impl.elem0.loc7_10.1 // CHECK:STDOUT: %specific_impl_fn.loc7_10.1: = specific_impl_function %impl.elem0.loc7_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc7_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc7_10.2: = bound_method %m.ref, %specific_impl_fn.loc7_10.1 -// CHECK:STDOUT: %.loc7_10.1: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref) -// CHECK:STDOUT: return %.loc7_10.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc4_20.1 (%ptr) = call %bound_method.loc7_10.2(%m.ref) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/generic/dependent_param.carbon b/toolchain/check/testdata/generic/dependent_param.carbon index 5444fb3993fe..c0a2a05b0dfa 100644 --- a/toolchain/check/testdata/generic/dependent_param.carbon +++ b/toolchain/check/testdata/generic/dependent_param.carbon @@ -169,8 +169,8 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e)] // CHECK:STDOUT: %U: @Inner.Get.%T.binding.as_type (%T.binding.as_type) = symbolic_binding U, 1 [symbolic = %U (constants.%U.9fd)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %T, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd)] -// CHECK:STDOUT: %.loc7_28.2: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc7_28.2 (constants.%.232)] -// CHECK:STDOUT: %impl.elem0.loc7_28.2: @Inner.Get.%.loc7_28.2 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %.loc7_28: type = fn_type_with_self_type constants.%Copy.Op.type, %T [symbolic = %.loc7_28 (constants.%.232)] +// CHECK:STDOUT: %impl.elem0.loc7_28.2: @Inner.Get.%.loc7_28 (%.232) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc7_28.3: = bound_method %U, %impl.elem0.loc7_28.2 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.293)] // CHECK:STDOUT: %specific_impl_fn.loc7_28.2: = specific_impl_function %impl.elem0.loc7_28.2, @Copy.Op(%T) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc7_28.4: = bound_method %U, %specific_impl_fn.loc7_28.2 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.ed9)] @@ -178,13 +178,13 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: fn() -> %return.param: @Inner.Get.%T.binding.as_type (%T.binding.as_type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %U.ref: @Inner.Get.%T.binding.as_type (%T.binding.as_type) = name_ref U, @Inner.%U.loc5_15.2 [symbolic = %U (constants.%U.9fd)] -// CHECK:STDOUT: %impl.elem0.loc7_28.1: @Inner.Get.%.loc7_28.2 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.8df)] +// CHECK:STDOUT: %impl.elem0.loc7_28.1: @Inner.Get.%.loc7_28 (%.232) = impl_witness_access constants.%Copy.lookup_impl_witness.edd, element0 [symbolic = %impl.elem0.loc7_28.2 (constants.%impl.elem0.8df)] // CHECK:STDOUT: %bound_method.loc7_28.1: = bound_method %U.ref, %impl.elem0.loc7_28.1 [symbolic = %bound_method.loc7_28.3 (constants.%bound_method.293)] // CHECK:STDOUT: %specific_impl_fn.loc7_28.1: = specific_impl_function %impl.elem0.loc7_28.1, @Copy.Op(constants.%T.f92) [symbolic = %specific_impl_fn.loc7_28.2 (constants.%specific_impl_fn.5c4)] // CHECK:STDOUT: %bound_method.loc7_28.2: = bound_method %U.ref, %specific_impl_fn.loc7_28.1 [symbolic = %bound_method.loc7_28.4 (constants.%bound_method.ed9)] // CHECK:STDOUT: %.loc7_14: ref @Inner.Get.%T.binding.as_type (%T.binding.as_type) = splice_block %return {} -// CHECK:STDOUT: %.loc7_28.1: init @Inner.Get.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc7_28.2(%U.ref) to %.loc7_14 -// CHECK:STDOUT: return %.loc7_28.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @Inner.Get.%T.binding.as_type (%T.binding.as_type) = call %bound_method.loc7_28.2(%U.ref) to %.loc7_14 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -270,7 +270,7 @@ var n: i32 = Outer(i32).Inner(42).Get(); // CHECK:STDOUT: %require_complete => constants.%complete_type.f8a // CHECK:STDOUT: %U => constants.%int_42.c68 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.09c -// CHECK:STDOUT: %.loc7_28.2 => constants.%.fe5 +// CHECK:STDOUT: %.loc7_28 => constants.%.fe5 // CHECK:STDOUT: %impl.elem0.loc7_28.2 => constants.%Int.as.Copy.impl.Op.c85 // CHECK:STDOUT: %bound_method.loc7_28.3 => constants.%Int.as.Copy.impl.Op.bound // CHECK:STDOUT: %specific_impl_fn.loc7_28.2 => constants.%Int.as.Copy.impl.Op.specific_fn diff --git a/toolchain/check/testdata/generic/template/unimplemented.carbon b/toolchain/check/testdata/generic/template/unimplemented.carbon index be49f1d78a73..0435e9894a0d 100644 --- a/toolchain/check/testdata/generic/template/unimplemented.carbon +++ b/toolchain/check/testdata/generic/template/unimplemented.carbon @@ -326,11 +326,11 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [template = %require_complete (constants.%require_complete.718)] // CHECK:STDOUT: %ImplicitAs.type.loc14_3.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T.binding.as_type)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.a60)] -// CHECK:STDOUT: %.loc14_3.4: = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template] -// CHECK:STDOUT: %.loc14_3.5: type = type_of_inst %.loc14_3.4 [template] +// CHECK:STDOUT: %.loc14_3.3: = access_member_action %ImplicitAs.type.loc14_3.1, Convert [template] +// CHECK:STDOUT: %.loc14_3.4: type = type_of_inst %.loc14_3.3 [template] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %T.loc4_15.1, @Destroy [template = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] -// CHECK:STDOUT: %.loc14_3.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %T.loc4_15.1 [template = %.loc14_3.6 (constants.%.225)] -// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.6 (%.225) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.0e5)] +// CHECK:STDOUT: %.loc14_3.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %T.loc4_15.1 [template = %.loc14_3.5 (constants.%.225)] +// CHECK:STDOUT: %impl.elem0.loc14_3.2: @F.%.loc14_3.5 (%.225) = impl_witness_access %Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.0e5)] // CHECK:STDOUT: %specific_impl_fn.loc14_3.2: = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%T.loc4_15.1) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.5ef)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.%T.binding.as_type (%T.binding.as_type.132)) { @@ -342,7 +342,7 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %v.var: ref @F.%T.binding.as_type (%T.binding.as_type.132) = var %v.var_patt // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0] // CHECK:STDOUT: %ImplicitAs.type.loc14_3.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%T.binding.as_type.132)> [template = %ImplicitAs.type.loc14_3.2 (constants.%ImplicitAs.type.a60)] -// CHECK:STDOUT: %.loc14_3.1: @F.%.loc14_3.5 (@F.%.loc14_3.5) = splice_inst %.loc14_3.4 +// CHECK:STDOUT: %.loc14_3.1: @F.%.loc14_3.4 (@F.%.loc14_3.4) = splice_inst %.loc14_3.3 // CHECK:STDOUT: %.loc14_3.2: @F.%T.binding.as_type (%T.binding.as_type.132) = converted %int_0, [concrete = ] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: %.loc14_10.1: type = splice_block %.loc14_10.2 [template = %T.binding.as_type (constants.%T.binding.as_type.132)] { @@ -368,11 +368,11 @@ fn F[template T:! Core.Destroy](x: T) { // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn: = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.ae2, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn] // CHECK:STDOUT: %bound_method.loc22: = bound_method %w.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call: init %empty_tuple.type = call %bound_method.loc22(%w.var) -// CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.6 (%.225) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.0e5)] +// CHECK:STDOUT: %impl.elem0.loc14_3.1: @F.%.loc14_3.5 (%.225) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [template = %impl.elem0.loc14_3.2 (constants.%impl.elem0.0e5)] // CHECK:STDOUT: %bound_method.loc14_3.1: = bound_method %v.var, %impl.elem0.loc14_3.1 // CHECK:STDOUT: %specific_impl_fn.loc14_3.1: = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%T.110) [template = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.5ef)] // CHECK:STDOUT: %bound_method.loc14_3.2: = bound_method %v.var, %specific_impl_fn.loc14_3.1 -// CHECK:STDOUT: %.loc14_3.3: init %empty_tuple.type = call %bound_method.loc14_3.2(%v.var) +// CHECK:STDOUT: %Destroy.Op.call: init %empty_tuple.type = call %bound_method.loc14_3.2(%v.var) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/generic/template_dependence.carbon b/toolchain/check/testdata/generic/template_dependence.carbon index 77c58e571451..897181f7dfdb 100644 --- a/toolchain/check/testdata/generic/template_dependence.carbon +++ b/toolchain/check/testdata/generic/template_dependence.carbon @@ -90,11 +90,11 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc5_37: = require_complete_type %ptr.loc5_29.1 [template = %require_complete.loc5_37 (constants.%require_complete.ef162c.1)] // CHECK:STDOUT: %require_complete.loc5_26: = require_complete_type %ptr.loc5_30.1 [template = %require_complete.loc5_26 (constants.%require_complete.fbe)] -// CHECK:STDOUT: %.loc6_10.4: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc5_15.1) [template = %.loc6_10.4 (constants.%.841)] +// CHECK:STDOUT: %.loc6_10.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc5_15.1) [template = %.loc6_10.3 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc5_29.1, @Copy [template = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc5_29.1, (%Copy.lookup_impl_witness) [template = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc6_10.5: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [template = %.loc6_10.5 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.5 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc6_10.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [template = %.loc6_10.4 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc6_10.2: @F.%.loc6_10.4 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc6_10.2: = specific_impl_function %impl.elem0.loc6_10.2, @Copy.Op(%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @F.%ptr.loc5_30.1 (%ptr.125)) -> @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) { @@ -102,12 +102,12 @@ fn F(template T:! type, U:! type) -> (T, U) { // CHECK:STDOUT: %x.ref: @F.%ptr.loc5_30.1 (%ptr.125) = name_ref x, %x // CHECK:STDOUT: %.loc6_10.1: ref @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = deref %x.ref // CHECK:STDOUT: %.loc6_10.2: @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = acquire_value %.loc6_10.1 -// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.5 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc6_10.1: @F.%.loc6_10.4 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [template = %impl.elem0.loc6_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc6_10.1: = bound_method %.loc6_10.2, %impl.elem0.loc6_10.1 // CHECK:STDOUT: %specific_impl_fn.loc6_10.1: = specific_impl_function %impl.elem0.loc6_10.1, @Copy.Op(constants.%Copy.facet) [template = %specific_impl_fn.loc6_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc6_10.2: = bound_method %.loc6_10.2, %specific_impl_fn.loc6_10.1 -// CHECK:STDOUT: %.loc6_10.3: init @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2) -// CHECK:STDOUT: return %.loc6_10.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr.loc5_29.1 (%ptr.e8f8f9.1) = call %bound_method.loc6_10.2(%.loc6_10.2) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_thunk.carbon b/toolchain/check/testdata/impl/impl_thunk.carbon index b32e3d585b98..1a00f132e580 100644 --- a/toolchain/check/testdata/impl/impl_thunk.carbon +++ b/toolchain/check/testdata/impl/impl_thunk.carbon @@ -897,20 +897,20 @@ impl () as I({}) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %U.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e646.1)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc10_8.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd34c.2)] -// CHECK:STDOUT: %.loc10_43.2: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc10_8.1 [symbolic = %.loc10_43.2 (constants.%.232382.2)] -// CHECK:STDOUT: %impl.elem0.loc10_43.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43.2 (%.232382.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.8df274.2)] +// CHECK:STDOUT: %.loc10_43: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc10_8.1 [symbolic = %.loc10_43 (constants.%.232382.2)] +// CHECK:STDOUT: %impl.elem0.loc10_43.2: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43 (%.232382.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.8df274.2)] // CHECK:STDOUT: %specific_impl_fn.loc10_43.2: = specific_impl_function %impl.elem0.loc10_43.2, @Copy.Op(%U.loc10_8.1) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.5c479b.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.e5b)) -> %return.param: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.e5b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.e5b) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc10_43.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43.2 (%.232382.2) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.2, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.8df274.2)] +// CHECK:STDOUT: %impl.elem0.loc10_43.1: @empty_tuple.type.as.I.impl.F.loc10_34.1.%.loc10_43 (%.232382.2) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.2, element0 [symbolic = %impl.elem0.loc10_43.2 (constants.%impl.elem0.8df274.2)] // CHECK:STDOUT: %bound_method.loc10_43.1: = bound_method %x.ref, %impl.elem0.loc10_43.1 // CHECK:STDOUT: %specific_impl_fn.loc10_43.1: = specific_impl_function %impl.elem0.loc10_43.1, @Copy.Op(constants.%U.f92) [symbolic = %specific_impl_fn.loc10_43.2 (constants.%specific_impl_fn.5c479b.2)] // CHECK:STDOUT: %bound_method.loc10_43.2: = bound_method %x.ref, %specific_impl_fn.loc10_43.1 // CHECK:STDOUT: %.loc10_29: ref @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.e5b) = splice_block %return {} -// CHECK:STDOUT: %.loc10_43.1: init @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.e5b) = call %bound_method.loc10_43.2(%x.ref) to %.loc10_29 -// CHECK:STDOUT: return %.loc10_43.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_34.1.%U.binding.as_type (%U.binding.as_type.e5b) = call %bound_method.loc10_43.2(%x.ref) to %.loc10_29 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -958,7 +958,7 @@ impl () as I({}) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc10_43.2 => constants.%.cb5 +// CHECK:STDOUT: %.loc10_43 => constants.%.cb5 // CHECK:STDOUT: %impl.elem0.loc10_43.2 => constants.%impl.elem0.771 // CHECK:STDOUT: %specific_impl_fn.loc10_43.2 => constants.%specific_impl_fn.b85 // CHECK:STDOUT: } @@ -1061,20 +1061,20 @@ impl () as I({}) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %U.binding.as_type [symbolic = %require_complete (constants.%require_complete.91e646.1)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %U.loc10_18.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.edd34c.2)] -// CHECK:STDOUT: %.loc10_53.2: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc10_18.1 [symbolic = %.loc10_53.2 (constants.%.232382.2)] -// CHECK:STDOUT: %impl.elem0.loc10_53.2: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53.2 (%.232382.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.8df274.2)] +// CHECK:STDOUT: %.loc10_53: type = fn_type_with_self_type constants.%Copy.Op.type, %U.loc10_18.1 [symbolic = %.loc10_53 (constants.%.232382.2)] +// CHECK:STDOUT: %impl.elem0.loc10_53.2: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53 (%.232382.2) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.8df274.2)] // CHECK:STDOUT: %specific_impl_fn.loc10_53.2: = specific_impl_function %impl.elem0.loc10_53.2, @Copy.Op(%U.loc10_18.1) [symbolic = %specific_impl_fn.loc10_53.2 (constants.%specific_impl_fn.5c479b.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: %empty_tuple.type, %x.param: @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.e5b)) -> %return.param: @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.e5b) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.e5b) = name_ref x, %x -// CHECK:STDOUT: %impl.elem0.loc10_53.1: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53.2 (%.232382.2) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.2, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.8df274.2)] +// CHECK:STDOUT: %impl.elem0.loc10_53.1: @empty_tuple.type.as.I.impl.F.loc10_44.1.%.loc10_53 (%.232382.2) = impl_witness_access constants.%Copy.lookup_impl_witness.edd34c.2, element0 [symbolic = %impl.elem0.loc10_53.2 (constants.%impl.elem0.8df274.2)] // CHECK:STDOUT: %bound_method.loc10_53.1: = bound_method %x.ref, %impl.elem0.loc10_53.1 // CHECK:STDOUT: %specific_impl_fn.loc10_53.1: = specific_impl_function %impl.elem0.loc10_53.1, @Copy.Op(constants.%U.f92) [symbolic = %specific_impl_fn.loc10_53.2 (constants.%specific_impl_fn.5c479b.2)] // CHECK:STDOUT: %bound_method.loc10_53.2: = bound_method %x.ref, %specific_impl_fn.loc10_53.1 // CHECK:STDOUT: %.loc10_39: ref @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.e5b) = splice_block %return {} -// CHECK:STDOUT: %.loc10_53.1: init @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.e5b) = call %bound_method.loc10_53.2(%x.ref) to %.loc10_39 -// CHECK:STDOUT: return %.loc10_53.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @empty_tuple.type.as.I.impl.F.loc10_44.1.%U.binding.as_type (%U.binding.as_type.e5b) = call %bound_method.loc10_53.2(%x.ref) to %.loc10_39 +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1124,7 +1124,7 @@ impl () as I({}) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%require_complete.ef1 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.lookup_impl_witness.2e6 -// CHECK:STDOUT: %.loc10_53.2 => constants.%.cb5 +// CHECK:STDOUT: %.loc10_53 => constants.%.cb5 // CHECK:STDOUT: %impl.elem0.loc10_53.2 => constants.%impl.elem0.771 // CHECK:STDOUT: %specific_impl_fn.loc10_53.2 => constants.%specific_impl_fn.b85 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/import_builtin_call.carbon b/toolchain/check/testdata/impl/import_builtin_call.carbon index 0570c42c75e8..d31f2cf50a5d 100644 --- a/toolchain/check/testdata/impl/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/import_builtin_call.carbon @@ -360,8 +360,8 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc20_22.2: %Add.type = converted constants.%MyInt, %Add.facet.loc20_22.2 [symbolic = %Add.facet.loc20_11 (constants.%Add.facet.ed8)] // CHECK:STDOUT: %specific_impl_fn.loc20_11.1: = specific_impl_function %impl.elem0.loc20_11.1, @Add.Op(constants.%Add.facet.ed8) [symbolic = %specific_impl_fn.loc20_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc20_22: = bound_method %x.ref.loc20_10, %specific_impl_fn.loc20_11.1 -// CHECK:STDOUT: %.loc20_22.3: init @Double.%MyInt.loc19_39.1 (%MyInt) = call %bound_method.loc20_22(%x.ref.loc20_10, %x.ref.loc20_21) -// CHECK:STDOUT: return %.loc20_22.3 to %return +// CHECK:STDOUT: %Add.Op.call: init @Double.%MyInt.loc19_39.1 (%MyInt) = call %bound_method.loc20_22(%x.ref.loc20_10, %x.ref.loc20_21) +// CHECK:STDOUT: return %Add.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon index 68a00f096337..4cbbce9f1808 100644 --- a/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon +++ b/toolchain/check/testdata/impl/lookup/canonical_query_self.carbon @@ -337,7 +337,7 @@ fn G() { // CHECK:STDOUT: %bound_method.loc26_69: = bound_method %t.ref, %impl.elem0.loc26_69.1 // CHECK:STDOUT: %specific_impl_fn.loc26_69.1: = specific_impl_function %impl.elem0.loc26_69.1, @J.JJ(constants.%J.facet.e41) [symbolic = %specific_impl_fn.loc26_69.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc26_73: = bound_method %t.ref, %specific_impl_fn.loc26_69.1 -// CHECK:STDOUT: %.loc26_73: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref) +// CHECK:STDOUT: %J.JJ.call: init %empty_tuple.type = call %bound_method.loc26_73(%t.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 311d0a8fbc61..947d389d2f8d 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -509,22 +509,22 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %ptr.loc9_14 [symbolic = %require_complete (constants.%require_complete.ef1)] -// CHECK:STDOUT: %.loc9_37.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T) [symbolic = %.loc9_37.2 (constants.%.841)] +// CHECK:STDOUT: %.loc9_37.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T) [symbolic = %.loc9_37.1 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc9_14, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc9_14, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.29b)] -// CHECK:STDOUT: %.loc9_37.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_37.3 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.3 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc9_37.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_37.2 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc9_37.2: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc9_37.2: = specific_impl_function %impl.elem0.loc9_37.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f)) -> @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = name_ref self, %self -// CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.3 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc9_37.1: @ptr.as.HasF.impl.F.%.loc9_37.2 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_37.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc9_37.1: = bound_method %self.ref, %impl.elem0.loc9_37.1 // CHECK:STDOUT: %specific_impl_fn.loc9_37.1: = specific_impl_function %impl.elem0.loc9_37.1, @Copy.Op(constants.%Copy.facet.29b) [symbolic = %specific_impl_fn.loc9_37.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc9_37.2: = bound_method %self.ref, %specific_impl_fn.loc9_37.1 -// CHECK:STDOUT: %.loc9_37.1: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = call %bound_method.loc9_37.2(%self.ref) -// CHECK:STDOUT: return %.loc9_37.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @ptr.as.HasF.impl.F.%ptr.loc9_14 (%ptr.e8f) = call %bound_method.loc9_37.2(%self.ref) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -586,10 +586,10 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete => constants.%complete_type -// CHECK:STDOUT: %.loc9_37.2 => constants.%.a00 +// CHECK:STDOUT: %.loc9_37.1 => constants.%.a00 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.46d // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.4a1 -// CHECK:STDOUT: %.loc9_37.3 => constants.%.e40 +// CHECK:STDOUT: %.loc9_37.2 => constants.%.e40 // CHECK:STDOUT: %impl.elem0.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.36f // CHECK:STDOUT: %specific_impl_fn.loc9_37.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/impl_forall.carbon index 2563242f03ac..c7a149a84086 100644 --- a/toolchain/check/testdata/impl/lookup/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/impl_forall.carbon @@ -192,11 +192,11 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %require_complete.loc13_30: = require_complete_type %ptr.loc13_30.1 [symbolic = %require_complete.loc13_30 (constants.%require_complete.ef162c.1)] // CHECK:STDOUT: %require_complete.loc13_16: = require_complete_type %A [symbolic = %require_complete.loc13_16 (constants.%require_complete.a096cd.1)] // CHECK:STDOUT: %A.elem: type = unbound_element_type %A, %V [symbolic = %A.elem (constants.%A.elem.b1fb46.2)] -// CHECK:STDOUT: %.loc14_12.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%V) [symbolic = %.loc14_12.2 (constants.%.841)] +// CHECK:STDOUT: %.loc14_12.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%V) [symbolic = %.loc14_12.1 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc13_30.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc13_30.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.29b)] -// CHECK:STDOUT: %.loc14_12.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc14_12.3 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc14_12.2: @A.as.I.impl.F.%.loc14_12.3 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc14_12.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc14_12.2 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc14_12.2: @A.as.I.impl.F.%.loc14_12.2 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc14_12.2: = specific_impl_function %impl.elem0.loc14_12.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc14_12.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @A.as.I.impl.F.%A (%A.53a34d.2)) -> @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) { @@ -205,12 +205,12 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %n.ref: @A.as.I.impl.F.%A.elem (%A.elem.b1fb46.2) = name_ref n, @A.%.loc4 [concrete = @A.%.loc4] // CHECK:STDOUT: %.loc14_17: ref @A.as.I.impl.F.%V (%V.67d) = class_element_access %self.ref, element0 // CHECK:STDOUT: %addr: @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = addr_of %.loc14_17 -// CHECK:STDOUT: %impl.elem0.loc14_12.1: @A.as.I.impl.F.%.loc14_12.3 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc14_12.1: @A.as.I.impl.F.%.loc14_12.2 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc14_12.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc14_12.1: = bound_method %addr, %impl.elem0.loc14_12.1 // CHECK:STDOUT: %specific_impl_fn.loc14_12.1: = specific_impl_function %impl.elem0.loc14_12.1, @Copy.Op(constants.%Copy.facet.29b) [symbolic = %specific_impl_fn.loc14_12.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc14_12.2: = bound_method %addr, %specific_impl_fn.loc14_12.1 -// CHECK:STDOUT: %.loc14_12.1: init @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = call %bound_method.loc14_12.2(%addr) -// CHECK:STDOUT: return %.loc14_12.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @A.as.I.impl.F.%ptr.loc13_30.1 (%ptr.e8f8f9.2) = call %bound_method.loc14_12.2(%addr) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,8 +245,8 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %bound_method.loc21_11: = bound_method %.loc21_11.1, %impl.elem0.loc21_11.1 // CHECK:STDOUT: %specific_impl_fn.loc21_11.1: = specific_impl_function %impl.elem0.loc21_11.1, @I.F(constants.%W, constants.%I.facet.17f) [symbolic = %specific_impl_fn.loc21_11.2 (constants.%specific_impl_fn.c04)] // CHECK:STDOUT: %bound_method.loc21_22: = bound_method %.loc21_11.1, %specific_impl_fn.loc21_11.1 -// CHECK:STDOUT: %.loc21_22: init @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1) -// CHECK:STDOUT: return %.loc21_22 to %return +// CHECK:STDOUT: %I.F.call: init @TestGeneric.%ptr.loc19_40.1 (%ptr.e8f8f9.4) = call %bound_method.loc21_22(%.loc21_11.1) +// CHECK:STDOUT: return %I.F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -332,10 +332,10 @@ fn TestSpecific(a: A({})*) -> {}* { // CHECK:STDOUT: %require_complete.loc13_30 => constants.%complete_type.38e // CHECK:STDOUT: %require_complete.loc13_16 => constants.%complete_type.0a6 // CHECK:STDOUT: %A.elem => constants.%A.elem.2af -// CHECK:STDOUT: %.loc14_12.2 => constants.%.a00 +// CHECK:STDOUT: %.loc14_12.1 => constants.%.a00 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.46d // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.4a1 -// CHECK:STDOUT: %.loc14_12.3 => constants.%.e40 +// CHECK:STDOUT: %.loc14_12.2 => constants.%.e40 // CHECK:STDOUT: %impl.elem0.loc14_12.2 => constants.%ptr.as.Copy.impl.Op.36f // CHECK:STDOUT: %specific_impl_fn.loc14_12.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon index a9ba8698413a..4292a124ff28 100644 --- a/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon +++ b/toolchain/check/testdata/impl/lookup/specialization_with_symbolic_rewrite.carbon @@ -926,23 +926,23 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9_30: = require_complete_type %ptr [symbolic = %require_complete.loc9_30 (constants.%require_complete.ef1)] // CHECK:STDOUT: %require_complete.loc9_16: = require_complete_type %T.loc9_6.1 [symbolic = %require_complete.loc9_16 (constants.%require_complete.944)] -// CHECK:STDOUT: %.loc10_10.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc9_6.1) [symbolic = %.loc10_10.2 (constants.%.841)] +// CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc9_6.1) [symbolic = %.loc10_10.1 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_10.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.3 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.3 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.loc9_6.1 (%T.67d)) -> @F.%ptr (%ptr.e8f8f9.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.loc9_6.1 (%T.67d) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.e8f8f9.2) = addr_of %t.ref -// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.3 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 // CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc10_10.2: = bound_method %addr, %specific_impl_fn.loc10_10.1 -// CHECK:STDOUT: %.loc10_10.1: init @F.%ptr (%ptr.e8f8f9.2) = call %bound_method.loc10_10.2(%addr) -// CHECK:STDOUT: return %.loc10_10.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr (%ptr.e8f8f9.2) = call %bound_method.loc10_10.2(%addr) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1138,23 +1138,23 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9_29: = require_complete_type %ptr [symbolic = %require_complete.loc9_29 (constants.%require_complete.861)] // CHECK:STDOUT: %require_complete.loc9_15: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_15 (constants.%require_complete.46d)] -// CHECK:STDOUT: %.loc10_10.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc10_10.2 (constants.%.763)] +// CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc10_10.1 (constants.%.763)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.b92)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_10.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.3 (constants.%.16e)] -// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.3 (%.16e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] +// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.16e)] +// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.16e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.51f)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type.cdd)) -> @F.%ptr (%ptr.586) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.binding.as_type (%T.binding.as_type.cdd) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.586) = addr_of %t.ref -// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.3 (%.16e) = impl_witness_access constants.%Copy.lookup_impl_witness.b92, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] +// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.16e) = impl_witness_access constants.%Copy.lookup_impl_witness.b92, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 // CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.51f)] // CHECK:STDOUT: %bound_method.loc10_10.2: = bound_method %addr, %specific_impl_fn.loc10_10.1 -// CHECK:STDOUT: %.loc10_10.1: init @F.%ptr (%ptr.586) = call %bound_method.loc10_10.2(%addr) -// CHECK:STDOUT: return %.loc10_10.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr (%ptr.586) = call %bound_method.loc10_10.2(%addr) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1349,23 +1349,23 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc9_29: = require_complete_type %ptr [symbolic = %require_complete.loc9_29 (constants.%require_complete.861)] // CHECK:STDOUT: %require_complete.loc9_15: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_15 (constants.%require_complete.46d)] -// CHECK:STDOUT: %.loc10_10.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc10_10.2 (constants.%.763)] +// CHECK:STDOUT: %.loc10_10.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.binding.as_type) [symbolic = %.loc10_10.1 (constants.%.763)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.b92)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc10_10.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.3 (constants.%.16e)] -// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.3 (%.16e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] +// CHECK:STDOUT: %.loc10_10.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc10_10.2 (constants.%.16e)] +// CHECK:STDOUT: %impl.elem0.loc10_10.2: @F.%.loc10_10.2 (%.16e) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] // CHECK:STDOUT: %specific_impl_fn.loc10_10.2: = specific_impl_function %impl.elem0.loc10_10.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.51f)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @F.%T.binding.as_type (%T.binding.as_type.cdd)) -> @F.%ptr (%ptr.586) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: ref @F.%T.binding.as_type (%T.binding.as_type.cdd) = name_ref t, %t // CHECK:STDOUT: %addr: @F.%ptr (%ptr.586) = addr_of %t.ref -// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.3 (%.16e) = impl_witness_access constants.%Copy.lookup_impl_witness.b92, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] +// CHECK:STDOUT: %impl.elem0.loc10_10.1: @F.%.loc10_10.2 (%.16e) = impl_witness_access constants.%Copy.lookup_impl_witness.b92, element0 [symbolic = %impl.elem0.loc10_10.2 (constants.%impl.elem0.bf9)] // CHECK:STDOUT: %bound_method.loc10_10.1: = bound_method %addr, %impl.elem0.loc10_10.1 // CHECK:STDOUT: %specific_impl_fn.loc10_10.1: = specific_impl_function %impl.elem0.loc10_10.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc10_10.2 (constants.%specific_impl_fn.51f)] // CHECK:STDOUT: %bound_method.loc10_10.2: = bound_method %addr, %specific_impl_fn.loc10_10.1 -// CHECK:STDOUT: %.loc10_10.1: init @F.%ptr (%ptr.586) = call %bound_method.loc10_10.2(%addr) -// CHECK:STDOUT: return %.loc10_10.1 to %return +// CHECK:STDOUT: %Copy.Op.call: init @F.%ptr (%ptr.586) = call %bound_method.loc10_10.2(%addr) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/use_assoc_entity.carbon b/toolchain/check/testdata/impl/use_assoc_entity.carbon index 4acbc2f108a9..1d11bf08b538 100644 --- a/toolchain/check/testdata/impl/use_assoc_entity.carbon +++ b/toolchain/check/testdata/impl/use_assoc_entity.carbon @@ -1467,20 +1467,20 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc28_42: = require_complete_type %impl.elem0.loc28_34.1 [symbolic = %require_complete.loc28_42 (constants.%require_complete.4ce)] // CHECK:STDOUT: %require_complete.loc28_25: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc28_25 (constants.%require_complete.dfc)] -// CHECK:STDOUT: %.loc29_11: type = fn_type_with_self_type constants.%J.F.type, %T.loc28_17.1 [symbolic = %.loc29_11 (constants.%.2e3)] -// CHECK:STDOUT: %impl.elem1.loc29_11.2: @GenericCallF.%.loc29_11 (%.2e3) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %.loc29: type = fn_type_with_self_type constants.%J.F.type, %T.loc28_17.1 [symbolic = %.loc29 (constants.%.2e3)] +// CHECK:STDOUT: %impl.elem1.loc29_11.2: @GenericCallF.%.loc29 (%.2e3) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %specific_impl_fn.loc29_11.2: = specific_impl_function %impl.elem1.loc29_11.2, @J.F(%T.loc28_17.1) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @GenericCallF.%T.binding.as_type (%T.binding.as_type), %u.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.eed)) -> %return.param: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.eed) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %t.ref: @GenericCallF.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %F.ref: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1.572] -// CHECK:STDOUT: %impl.elem1.loc29_11.1: @GenericCallF.%.loc29_11 (%.2e3) = impl_witness_access constants.%J.lookup_impl_witness.345, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %impl.elem1.loc29_11.1: @GenericCallF.%.loc29 (%.2e3) = impl_witness_access constants.%J.lookup_impl_witness.345, element1 [symbolic = %impl.elem1.loc29_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %u.ref: @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.eed) = name_ref u, %u // CHECK:STDOUT: %specific_impl_fn.loc29_11.1: = specific_impl_function %impl.elem1.loc29_11.1, @J.F(constants.%T) [symbolic = %specific_impl_fn.loc29_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %.loc28_38: ref @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.eed) = splice_block %return {} -// CHECK:STDOUT: %.loc29_15: init @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.eed) = call %specific_impl_fn.loc29_11.1(%u.ref) to %.loc28_38 -// CHECK:STDOUT: return %.loc29_15 to %return +// CHECK:STDOUT: %J.F.call: init @GenericCallF.%impl.elem0.loc28_34.1 (%impl.elem0.eed) = call %specific_impl_fn.loc29_11.1(%u.ref) to %.loc28_38 +// CHECK:STDOUT: return %J.F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1570,7 +1570,7 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc28_42 => constants.%complete_type.f8a // CHECK:STDOUT: %require_complete.loc28_25 => constants.%complete_type.357 -// CHECK:STDOUT: %.loc29_11 => constants.%.4bf +// CHECK:STDOUT: %.loc29 => constants.%.4bf // CHECK:STDOUT: %impl.elem1.loc29_11.2 => constants.%E.as.J.impl.F // CHECK:STDOUT: %specific_impl_fn.loc29_11.2 => constants.%E.as.J.impl.F // CHECK:STDOUT: } @@ -1819,8 +1819,8 @@ fn F() { // CHECK:STDOUT: %specific_impl_fn.loc13_16.2: = specific_impl_function %impl.elem0.loc13_16.2, @I.Op(%I.facet.loc13_16) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.d95)] // CHECK:STDOUT: %Destroy.lookup_impl_witness: = lookup_impl_witness %impl.elem0.loc12_35.1, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %as_type.loc12_35.1, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet)] -// CHECK:STDOUT: %.loc13_29.8: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_29.8 (constants.%.36c)] -// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.8 (%.36c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.941)] +// CHECK:STDOUT: %.loc13_29.6: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc13_29.6 (constants.%.36c)] +// CHECK:STDOUT: %impl.elem0.loc13_29.2: @GenericResult.%.loc13_29.6 (%.36c) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.941)] // CHECK:STDOUT: %specific_impl_fn.loc13_29.2: = specific_impl_function %impl.elem0.loc13_29.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.580)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @GenericResult.%T.binding.as_type (%T.binding.as_type), %u.param: @GenericResult.%as_type.loc12_35.1 (%as_type.c41)) -> %return.param: @GenericResult.%as_type.loc12_35.1 (%as_type.c41) { @@ -1833,11 +1833,11 @@ fn F() { // CHECK:STDOUT: %.loc13_15.2: %facet_type = converted constants.%as_type.c41, constants.%impl.elem0.937 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.937)] // CHECK:STDOUT: %specific_impl_fn.loc13_11.1: = specific_impl_function %impl.elem1.loc13_11.1, @J.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.3a8)] // CHECK:STDOUT: %.loc13_15.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = temporary_storage -// CHECK:STDOUT: %.loc13_15.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) to %.loc13_15.3 +// CHECK:STDOUT: %J.F.call.loc13_15: init @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = call %specific_impl_fn.loc13_11.1(%u.ref.loc13_14) to %.loc13_15.3 // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type] // CHECK:STDOUT: %Op.ref: %I.assoc_type = name_ref Op, @I.%assoc0 [concrete = constants.%assoc0.ea8] // CHECK:STDOUT: %impl.elem0.loc13_16.1: @GenericResult.%.loc13_16 (%.c3c) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_16.2 (constants.%impl.elem0.a6f)] -// CHECK:STDOUT: %bound_method.loc13_16: = bound_method %.loc13_15.4, %impl.elem0.loc13_16.1 +// CHECK:STDOUT: %bound_method.loc13_16: = bound_method %J.F.call.loc13_15, %impl.elem0.loc13_16.1 // CHECK:STDOUT: %T.ref.loc13: %J.type = name_ref T, %T.loc12_18.2 [symbolic = %T.loc12_18.1 (constants.%T)] // CHECK:STDOUT: %F.ref.loc13_25: %J.assoc_type = name_ref F, @J.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc13: type = facet_access_type %T.ref.loc13 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] @@ -1848,30 +1848,30 @@ fn F() { // CHECK:STDOUT: %.loc13_29.2: %facet_type = converted constants.%as_type.c41, constants.%impl.elem0.937 [symbolic = %impl.elem0.loc12_35.1 (constants.%impl.elem0.937)] // CHECK:STDOUT: %specific_impl_fn.loc13_25: = specific_impl_function %impl.elem1.loc13_25, @J.F(constants.%T) [symbolic = %specific_impl_fn.loc13_11.2 (constants.%specific_impl_fn.3a8)] // CHECK:STDOUT: %.loc13_29.3: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = temporary_storage -// CHECK:STDOUT: %.loc13_29.4: init @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) to %.loc13_29.3 +// CHECK:STDOUT: %J.F.call.loc13_29: init @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = call %specific_impl_fn.loc13_25(%u.ref.loc13_28) to %.loc13_29.3 // CHECK:STDOUT: %I.facet.loc13_30.1: %I.type = facet_value constants.%as_type.c41, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] // CHECK:STDOUT: %.loc13_30.1: %I.type = converted constants.%as_type.c41, %I.facet.loc13_30.1 [symbolic = %I.facet.loc13_16 (constants.%I.facet)] // CHECK:STDOUT: %I.facet.loc13_30.2: %I.type = facet_value constants.%as_type.c41, (constants.%I.lookup_impl_witness) [symbolic = %I.facet.loc13_16 (constants.%I.facet)] // CHECK:STDOUT: %.loc13_30.2: %I.type = converted constants.%as_type.c41, %I.facet.loc13_30.2 [symbolic = %I.facet.loc13_16 (constants.%I.facet)] // CHECK:STDOUT: %specific_impl_fn.loc13_16.1: = specific_impl_function %impl.elem0.loc13_16.1, @I.Op(constants.%I.facet) [symbolic = %specific_impl_fn.loc13_16.2 (constants.%specific_impl_fn.d95)] -// CHECK:STDOUT: %bound_method.loc13_30: = bound_method %.loc13_15.4, %specific_impl_fn.loc13_16.1 +// CHECK:STDOUT: %bound_method.loc13_30: = bound_method %J.F.call.loc13_15, %specific_impl_fn.loc13_16.1 // CHECK:STDOUT: %.loc12_39: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = splice_block %return {} -// CHECK:STDOUT: %.loc13_15.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = temporary %.loc13_15.3, %.loc13_15.4 -// CHECK:STDOUT: %.loc13_15.6: @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = acquire_value %.loc13_15.5 -// CHECK:STDOUT: %.loc13_29.5: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = temporary %.loc13_29.3, %.loc13_29.4 -// CHECK:STDOUT: %.loc13_29.6: @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = acquire_value %.loc13_29.5 -// CHECK:STDOUT: %.loc13_30.3: init @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = call %bound_method.loc13_30(%.loc13_15.6, %.loc13_29.6) to %.loc12_39 -// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.8 (%.36c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.941)] -// CHECK:STDOUT: %bound_method.loc13_29.1: = bound_method %.loc13_29.5, %impl.elem0.loc13_29.1 +// CHECK:STDOUT: %.loc13_15.4: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = temporary %.loc13_15.3, %J.F.call.loc13_15 +// CHECK:STDOUT: %.loc13_15.5: @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = acquire_value %.loc13_15.4 +// CHECK:STDOUT: %.loc13_29.4: ref @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = temporary %.loc13_29.3, %J.F.call.loc13_29 +// CHECK:STDOUT: %.loc13_29.5: @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = acquire_value %.loc13_29.4 +// CHECK:STDOUT: %I.Op.call: init @GenericResult.%as_type.loc12_35.1 (%as_type.c41) = call %bound_method.loc13_30(%.loc13_15.5, %.loc13_29.5) to %.loc12_39 +// CHECK:STDOUT: %impl.elem0.loc13_29.1: @GenericResult.%.loc13_29.6 (%.36c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.941)] +// CHECK:STDOUT: %bound_method.loc13_29.1: = bound_method %.loc13_29.4, %impl.elem0.loc13_29.1 // CHECK:STDOUT: %specific_impl_fn.loc13_29.1: = specific_impl_function %impl.elem0.loc13_29.1, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.580)] -// CHECK:STDOUT: %bound_method.loc13_29.2: = bound_method %.loc13_29.5, %specific_impl_fn.loc13_29.1 -// CHECK:STDOUT: %.loc13_29.7: init %empty_tuple.type = call %bound_method.loc13_29.2(%.loc13_29.5) -// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.8 (%.36c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.941)] -// CHECK:STDOUT: %bound_method.loc13_15.1: = bound_method %.loc13_15.5, %impl.elem0.loc13_15 +// CHECK:STDOUT: %bound_method.loc13_29.2: = bound_method %.loc13_29.4, %specific_impl_fn.loc13_29.1 +// CHECK:STDOUT: %Destroy.Op.call.loc13_29: init %empty_tuple.type = call %bound_method.loc13_29.2(%.loc13_29.4) +// CHECK:STDOUT: %impl.elem0.loc13_15: @GenericResult.%.loc13_29.6 (%.36c) = impl_witness_access constants.%Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc13_29.2 (constants.%impl.elem0.941)] +// CHECK:STDOUT: %bound_method.loc13_15.1: = bound_method %.loc13_15.4, %impl.elem0.loc13_15 // CHECK:STDOUT: %specific_impl_fn.loc13_15: = specific_impl_function %impl.elem0.loc13_15, @Destroy.Op(constants.%Destroy.facet) [symbolic = %specific_impl_fn.loc13_29.2 (constants.%specific_impl_fn.580)] -// CHECK:STDOUT: %bound_method.loc13_15.2: = bound_method %.loc13_15.5, %specific_impl_fn.loc13_15 -// CHECK:STDOUT: %.loc13_15.7: init %empty_tuple.type = call %bound_method.loc13_15.2(%.loc13_15.5) -// CHECK:STDOUT: return %.loc13_30.3 to %return +// CHECK:STDOUT: %bound_method.loc13_15.2: = bound_method %.loc13_15.4, %specific_impl_fn.loc13_15 +// CHECK:STDOUT: %Destroy.Op.call.loc13_15: init %empty_tuple.type = call %bound_method.loc13_15.2(%.loc13_15.4) +// CHECK:STDOUT: return %I.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2073,8 +2073,8 @@ fn F() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc8_59: = require_complete_type %impl.elem0.loc8_51.1 [symbolic = %require_complete.loc8_59 (constants.%require_complete.4ce)] // CHECK:STDOUT: %require_complete.loc8_42: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc8_42 (constants.%require_complete.dfc)] -// CHECK:STDOUT: %.loc9_11: type = fn_type_with_self_type constants.%J.G.type, %T.loc8_34.1 [symbolic = %.loc9_11 (constants.%.503)] -// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9_11 (%.503) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type constants.%J.G.type, %T.loc8_34.1 [symbolic = %.loc9 (constants.%.503)] +// CHECK:STDOUT: %impl.elem1.loc9_11.2: @GenericCallInterfaceQualified.%.loc9 (%.503) = impl_witness_access %J.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem1.loc9_11.2, @J.G(%T.loc8_34.1) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%t.param: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.as_type), %u.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.eed)) -> %return.param: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.eed) { @@ -2082,14 +2082,14 @@ fn F() { // CHECK:STDOUT: %t.ref: @GenericCallInterfaceQualified.%T.binding.as_type (%T.binding.as_type) = name_ref t, %t // CHECK:STDOUT: %J.ref.loc9: type = name_ref J, file.%J.decl [concrete = constants.%J.type] // CHECK:STDOUT: %G.ref: %J.assoc_type = name_ref G, @J.%assoc1 [concrete = constants.%assoc1] -// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9_11 (%.503) = impl_witness_access constants.%J.lookup_impl_witness.345, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] +// CHECK:STDOUT: %impl.elem1.loc9_11.1: @GenericCallInterfaceQualified.%.loc9 (%.503) = impl_witness_access constants.%J.lookup_impl_witness.345, element1 [symbolic = %impl.elem1.loc9_11.2 (constants.%impl.elem1)] // CHECK:STDOUT: %bound_method.loc9_11: = bound_method %t.ref, %impl.elem1.loc9_11.1 // CHECK:STDOUT: %u.ref: @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.eed) = name_ref u, %u // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem1.loc9_11.1, @J.G(constants.%T) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_19: = bound_method %t.ref, %specific_impl_fn.loc9_11.1 // CHECK:STDOUT: %.loc8_55: ref @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.eed) = splice_block %return {} -// CHECK:STDOUT: %.loc9_19: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.eed) = call %bound_method.loc9_19(%t.ref, %u.ref) to %.loc8_55 -// CHECK:STDOUT: return %.loc9_19 to %return +// CHECK:STDOUT: %J.G.call: init @GenericCallInterfaceQualified.%impl.elem0.loc8_51.1 (%impl.elem0.eed) = call %bound_method.loc9_19(%t.ref, %u.ref) to %.loc8_55 +// CHECK:STDOUT: return %J.G.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -2312,8 +2312,8 @@ fn F() { // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc9_14.2(%int_2) [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_2.ef8] // CHECK:STDOUT: %.loc9_14.2: %i32 = converted %int_2, %.loc9_14.1 [concrete = constants.%int_2.ef8] -// CHECK:STDOUT: %.loc9_15: init %i32 = call %specific_impl_fn.loc9_11.1(%.loc9_14.2) -// CHECK:STDOUT: return %.loc9_15 to %return +// CHECK:STDOUT: %J.F.call: init %i32 = call %specific_impl_fn.loc9_11.1(%.loc9_14.2) +// CHECK:STDOUT: return %J.F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/compound_member_access.carbon b/toolchain/check/testdata/interface/compound_member_access.carbon index 6a4fa8751088..5838ff741beb 100644 --- a/toolchain/check/testdata/interface/compound_member_access.carbon +++ b/toolchain/check/testdata/interface/compound_member_access.carbon @@ -444,7 +444,7 @@ fn Works() { // CHECK:STDOUT: %.loc9_4.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple2.%.loc9_4.2 (%.a00e8b.1) = impl_witness_access constants.%K1.lookup_impl_witness.f70577.1, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0.0f4fe2.1)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K1.Q1(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn.055853.1)] -// CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() +// CHECK:STDOUT: %K1.Q1.call: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -454,8 +454,8 @@ fn Works() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %K1.lookup_impl_witness: = lookup_impl_witness %V.loc13_14.1, @K1 [symbolic = %K1.lookup_impl_witness (constants.%K1.lookup_impl_witness.f70577.2)] -// CHECK:STDOUT: %.loc14_4: type = fn_type_with_self_type constants.%K1.Q1.type, %V.loc13_14.1 [symbolic = %.loc14_4 (constants.%.a00e8b.2)] -// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14_4 (%.a00e8b.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.0f4fe2.2)] +// CHECK:STDOUT: %.loc14: type = fn_type_with_self_type constants.%K1.Q1.type, %V.loc13_14.1 [symbolic = %.loc14 (constants.%.a00e8b.2)] +// CHECK:STDOUT: %impl.elem0.loc14_4.2: @Compound2.%.loc14 (%.a00e8b.2) = impl_witness_access %K1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.0f4fe2.2)] // CHECK:STDOUT: %specific_impl_fn.loc14_4.2: = specific_impl_function %impl.elem0.loc14_4.2, @K1.Q1(%V.loc13_14.1) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.055853.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn() { @@ -463,9 +463,9 @@ fn Works() { // CHECK:STDOUT: %V.ref: %K1.type = name_ref V, %V.loc13_14.2 [symbolic = %V.loc13_14.1 (constants.%V)] // CHECK:STDOUT: %K1.ref.loc14: type = name_ref K1, file.%K1.decl [concrete = constants.%K1.type] // CHECK:STDOUT: %Q1.ref: %K1.assoc_type = name_ref Q1, @K1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14_4 (%.a00e8b.2) = impl_witness_access constants.%K1.lookup_impl_witness.f70577.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.0f4fe2.2)] +// CHECK:STDOUT: %impl.elem0.loc14_4.1: @Compound2.%.loc14 (%.a00e8b.2) = impl_witness_access constants.%K1.lookup_impl_witness.f70577.2, element0 [symbolic = %impl.elem0.loc14_4.2 (constants.%impl.elem0.0f4fe2.2)] // CHECK:STDOUT: %specific_impl_fn.loc14_4.1: = specific_impl_function %impl.elem0.loc14_4.1, @K1.Q1(constants.%V) [symbolic = %specific_impl_fn.loc14_4.2 (constants.%specific_impl_fn.055853.2)] -// CHECK:STDOUT: %.loc14_13: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() +// CHECK:STDOUT: %K1.Q1.call: init %empty_tuple.type = call %specific_impl_fn.loc14_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -598,17 +598,17 @@ fn Works() { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %T.binding.as_type [symbolic = %require_complete (constants.%require_complete.2fcd0f.1)] // CHECK:STDOUT: %K2.lookup_impl_witness: = lookup_impl_witness %T.loc8_12.1, @K2 [symbolic = %K2.lookup_impl_witness (constants.%K2.lookup_impl_witness)] -// CHECK:STDOUT: %.loc9_4: type = fn_type_with_self_type constants.%K2.Q2.type, %T.loc8_12.1 [symbolic = %.loc9_4 (constants.%.bd8)] -// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9_4 (%.bd8) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type constants.%K2.Q2.type, %T.loc8_12.1 [symbolic = %.loc9 (constants.%.bd8)] +// CHECK:STDOUT: %impl.elem0.loc9_4.2: @Simple3.%.loc9 (%.bd8) = impl_witness_access %K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.2: = specific_impl_function %impl.elem0.loc9_4.2, @K2.Q2(%T.loc8_12.1) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param: @Simple3.%T.binding.as_type (%T.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Simple3.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %Q2.ref: %K2.assoc_type = name_ref Q2, @K2.%assoc0 [concrete = constants.%assoc0.d67] -// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9_4 (%.bd8) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_4.1: @Simple3.%.loc9 (%.bd8) = impl_witness_access constants.%K2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_4.1: = specific_impl_function %impl.elem0.loc9_4.1, @K2.Q2(constants.%T) [symbolic = %specific_impl_fn.loc9_4.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc9_8: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() +// CHECK:STDOUT: %K2.Q2.call: init %empty_tuple.type = call %specific_impl_fn.loc9_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -838,8 +838,8 @@ fn Works() { // CHECK:STDOUT: %require_complete.loc9_21: = require_complete_type %T.binding.as_type [symbolic = %require_complete.loc9_21 (constants.%require_complete.138550.1)] // CHECK:STDOUT: %require_complete.loc9_27: = require_complete_type %ptr.loc9_30.1 [symbolic = %require_complete.loc9_27 (constants.%require_complete.7c143b.1)] // CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %T.loc9_12.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.6197a4.1)] -// CHECK:STDOUT: %.loc10_4: type = fn_type_with_self_type constants.%L1.R1.type, %T.loc9_12.1 [symbolic = %.loc10_4 (constants.%.1d9dcd.1)] -// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10_4 (%.1d9dcd.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.997c12.1)] +// CHECK:STDOUT: %.loc10: type = fn_type_with_self_type constants.%L1.R1.type, %T.loc9_12.1 [symbolic = %.loc10 (constants.%.1d9dcd.1)] +// CHECK:STDOUT: %impl.elem0.loc10_4.2: @Simple4.%.loc10 (%.1d9dcd.1) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.997c12.1)] // CHECK:STDOUT: %specific_impl_fn.loc10_4.2: = specific_impl_function %impl.elem0.loc10_4.2, @L1.R1(%T.loc9_12.1) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.1a44ec.1)] // CHECK:STDOUT: %.loc11_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %T.loc9_12.1 [symbolic = %.loc11_4.2 (constants.%.19b78a.1)] // CHECK:STDOUT: %impl.elem1.loc11_4.2: @Simple4.%.loc11_4.2 (%.19b78a.1) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc11_4.2 (constants.%impl.elem1.9e058d.1)] @@ -849,11 +849,11 @@ fn Works() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @Simple4.%T.binding.as_type (%T.binding.as_type) = name_ref x, %x // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10_4 (%.1d9dcd.1) = impl_witness_access constants.%L1.lookup_impl_witness.6197a4.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.997c12.1)] +// CHECK:STDOUT: %impl.elem0.loc10_4.1: @Simple4.%.loc10 (%.1d9dcd.1) = impl_witness_access constants.%L1.lookup_impl_witness.6197a4.1, element0 [symbolic = %impl.elem0.loc10_4.2 (constants.%impl.elem0.997c12.1)] // CHECK:STDOUT: %bound_method.loc10_4: = bound_method %x.ref, %impl.elem0.loc10_4.1 // CHECK:STDOUT: %specific_impl_fn.loc10_4.1: = specific_impl_function %impl.elem0.loc10_4.1, @L1.R1(constants.%T) [symbolic = %specific_impl_fn.loc10_4.2 (constants.%specific_impl_fn.1a44ec.1)] // CHECK:STDOUT: %bound_method.loc10_8: = bound_method %x.ref, %specific_impl_fn.loc10_4.1 -// CHECK:STDOUT: %.loc10_8: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref) +// CHECK:STDOUT: %L1.R1.call: init %empty_tuple.type = call %bound_method.loc10_8(%x.ref) // CHECK:STDOUT: %p.ref: @Simple4.%ptr.loc9_30.1 (%ptr.527779.1) = name_ref p, %p // CHECK:STDOUT: %.loc11_4.1: ref @Simple4.%T.binding.as_type (%T.binding.as_type) = deref %p.ref // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1] @@ -861,7 +861,7 @@ fn Works() { // CHECK:STDOUT: %bound_method.loc11_4: = bound_method %.loc11_4.1, %impl.elem1.loc11_4.1 // CHECK:STDOUT: %specific_impl_fn.loc11_4.1: = specific_impl_function %impl.elem1.loc11_4.1, @L1.S1(constants.%T) [symbolic = %specific_impl_fn.loc11_4.2 (constants.%specific_impl_fn.69117e.1)] // CHECK:STDOUT: %bound_method.loc11_9: = bound_method %.loc11_4.1, %specific_impl_fn.loc11_4.1 -// CHECK:STDOUT: %.loc11_9: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1) +// CHECK:STDOUT: %L1.S1.call: init %empty_tuple.type = call %bound_method.loc11_9(%.loc11_4.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -877,8 +877,8 @@ fn Works() { // CHECK:STDOUT: %require_complete.loc15_23: = require_complete_type %V.binding.as_type [symbolic = %require_complete.loc15_23 (constants.%require_complete.138550.2)] // CHECK:STDOUT: %require_complete.loc15_29: = require_complete_type %ptr.loc15_32.1 [symbolic = %require_complete.loc15_29 (constants.%require_complete.7c143b.2)] // CHECK:STDOUT: %L1.lookup_impl_witness: = lookup_impl_witness %V.loc15_14.1, @L1 [symbolic = %L1.lookup_impl_witness (constants.%L1.lookup_impl_witness.6197a4.2)] -// CHECK:STDOUT: %.loc16_4: type = fn_type_with_self_type constants.%L1.R1.type, %V.loc15_14.1 [symbolic = %.loc16_4 (constants.%.1d9dcd.2)] -// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16_4 (%.1d9dcd.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.997c12.2)] +// CHECK:STDOUT: %.loc16: type = fn_type_with_self_type constants.%L1.R1.type, %V.loc15_14.1 [symbolic = %.loc16 (constants.%.1d9dcd.2)] +// CHECK:STDOUT: %impl.elem0.loc16_4.2: @Compound4.%.loc16 (%.1d9dcd.2) = impl_witness_access %L1.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.997c12.2)] // CHECK:STDOUT: %specific_impl_fn.loc16_4.2: = specific_impl_function %impl.elem0.loc16_4.2, @L1.R1(%V.loc15_14.1) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.1a44ec.2)] // CHECK:STDOUT: %.loc17_4.2: type = fn_type_with_self_type constants.%L1.S1.type, %V.loc15_14.1 [symbolic = %.loc17_4.2 (constants.%.19b78a.2)] // CHECK:STDOUT: %impl.elem1.loc17_4.2: @Compound4.%.loc17_4.2 (%.19b78a.2) = impl_witness_access %L1.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc17_4.2 (constants.%impl.elem1.9e058d.2)] @@ -889,11 +889,11 @@ fn Works() { // CHECK:STDOUT: %y.ref: @Compound4.%V.binding.as_type (%V.binding.as_type) = name_ref y, %y // CHECK:STDOUT: %L1.ref.loc16: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %R1.ref: %L1.assoc_type = name_ref R1, @L1.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16_4 (%.1d9dcd.2) = impl_witness_access constants.%L1.lookup_impl_witness.6197a4.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.997c12.2)] +// CHECK:STDOUT: %impl.elem0.loc16_4.1: @Compound4.%.loc16 (%.1d9dcd.2) = impl_witness_access constants.%L1.lookup_impl_witness.6197a4.2, element0 [symbolic = %impl.elem0.loc16_4.2 (constants.%impl.elem0.997c12.2)] // CHECK:STDOUT: %bound_method.loc16_4: = bound_method %y.ref, %impl.elem0.loc16_4.1 // CHECK:STDOUT: %specific_impl_fn.loc16_4.1: = specific_impl_function %impl.elem0.loc16_4.1, @L1.R1(constants.%V) [symbolic = %specific_impl_fn.loc16_4.2 (constants.%specific_impl_fn.1a44ec.2)] // CHECK:STDOUT: %bound_method.loc16_13: = bound_method %y.ref, %specific_impl_fn.loc16_4.1 -// CHECK:STDOUT: %.loc16_13: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref) +// CHECK:STDOUT: %L1.R1.call: init %empty_tuple.type = call %bound_method.loc16_13(%y.ref) // CHECK:STDOUT: %p.ref: @Compound4.%ptr.loc15_32.1 (%ptr.527779.2) = name_ref p, %p // CHECK:STDOUT: %L1.ref.loc17: type = name_ref L1, file.%L1.decl [concrete = constants.%L1.type] // CHECK:STDOUT: %S1.ref: %L1.assoc_type = name_ref S1, @L1.%assoc1 [concrete = constants.%assoc1] @@ -902,7 +902,7 @@ fn Works() { // CHECK:STDOUT: %bound_method.loc17_4: = bound_method %.loc17_4.1, %impl.elem1.loc17_4.1 // CHECK:STDOUT: %specific_impl_fn.loc17_4.1: = specific_impl_function %impl.elem1.loc17_4.1, @L1.S1(constants.%V) [symbolic = %specific_impl_fn.loc17_4.2 (constants.%specific_impl_fn.69117e.2)] // CHECK:STDOUT: %bound_method.loc17_14: = bound_method %.loc17_4.1, %specific_impl_fn.loc17_4.1 -// CHECK:STDOUT: %.loc17_14: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1) +// CHECK:STDOUT: %L1.S1.call: init %empty_tuple.type = call %bound_method.loc17_14(%.loc17_4.1) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1105,14 +1105,14 @@ fn Works() { // CHECK:STDOUT: %.loc18_4.1: type = converted %T.ref.loc18, %T.as_type.loc18 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %impl.elem0.loc18_4.1: @Simple5.%.loc18_4.2 (%.f46) = impl_witness_access constants.%L2.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc18_4.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc18_4.1: = specific_impl_function %impl.elem0.loc18_4.1, @L2.R2(constants.%T) [symbolic = %specific_impl_fn.loc18_4.2 (constants.%specific_impl_fn.981)] -// CHECK:STDOUT: %.loc18_8: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1() [concrete = ] +// CHECK:STDOUT: %L2.R2.call: init %empty_tuple.type = call %specific_impl_fn.loc18_4.1() // CHECK:STDOUT: %T.ref.loc26: %L2.type = name_ref T, %T.loc10_12.2 [symbolic = %T.loc10_12.1 (constants.%T)] // CHECK:STDOUT: %S2.ref: %L2.assoc_type = name_ref S2, @L2.%assoc1 [concrete = constants.%assoc1] // CHECK:STDOUT: %T.as_type.loc26: type = facet_access_type %T.ref.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %.loc26_4.1: type = converted %T.ref.loc26, %T.as_type.loc26 [symbolic = %T.binding.as_type (constants.%T.binding.as_type)] // CHECK:STDOUT: %impl.elem1.loc26_4.1: @Simple5.%.loc26_4.2 (%.18a) = impl_witness_access constants.%L2.lookup_impl_witness, element1 [symbolic = %impl.elem1.loc26_4.2 (constants.%impl.elem1)] // CHECK:STDOUT: %specific_impl_fn.loc26_4.1: = specific_impl_function %impl.elem1.loc26_4.1, @L2.S2(constants.%T) [symbolic = %specific_impl_fn.loc26_4.2 (constants.%specific_impl_fn.124)] -// CHECK:STDOUT: %.loc26_8: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1() [concrete = ] +// CHECK:STDOUT: %L2.S2.call: init %empty_tuple.type = call %specific_impl_fn.loc26_4.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon index 391646ebe5e8..83a19fd159ab 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_alias.carbon @@ -668,26 +668,26 @@ interface C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete: = require_complete_type %Self.binding.as_type [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %C.lookup_impl_witness: = lookup_impl_witness %Self, @C [symbolic = %C.lookup_impl_witness (constants.%C.lookup_impl_witness)] -// CHECK:STDOUT: %.loc9_9: type = fn_type_with_self_type constants.%C.F.type, %Self [symbolic = %.loc9_9 (constants.%.4e7)] -// CHECK:STDOUT: %impl.elem0.loc9_9.2: @C.G.%.loc9_9 (%.4e7) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %.loc9: type = fn_type_with_self_type constants.%C.F.type, %Self [symbolic = %.loc9 (constants.%.4e7)] +// CHECK:STDOUT: %impl.elem0.loc9_9.2: @C.G.%.loc9 (%.4e7) = impl_witness_access %C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc9_9.2: = specific_impl_function %impl.elem0.loc9_9.2, @C.F(%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param: @C.G.%Self.binding.as_type (%Self.binding.as_type)) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref.loc9: @C.G.%Self.binding.as_type (%Self.binding.as_type) = name_ref self, %self // CHECK:STDOUT: %F.ref.loc9: %C.assoc_type = name_ref F, @C.%assoc0 [concrete = constants.%assoc0] -// CHECK:STDOUT: %impl.elem0.loc9_9.1: @C.G.%.loc9_9 (%.4e7) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc9_9.1: @C.G.%.loc9 (%.4e7) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc9_9: = bound_method %self.ref.loc9, %impl.elem0.loc9_9.1 // CHECK:STDOUT: %specific_impl_fn.loc9_9.1: = specific_impl_function %impl.elem0.loc9_9.1, @C.F(constants.%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc9_12: = bound_method %self.ref.loc9, %specific_impl_fn.loc9_9.1 -// CHECK:STDOUT: %.loc9_12: init %empty_tuple.type = call %bound_method.loc9_12(%self.ref.loc9) +// CHECK:STDOUT: %C.F.call.loc9: init %empty_tuple.type = call %bound_method.loc9_12(%self.ref.loc9) // CHECK:STDOUT: %self.ref.loc10: @C.G.%Self.binding.as_type (%Self.binding.as_type) = name_ref self, %self -// CHECK:STDOUT: %impl.elem0.loc10: @C.G.%.loc9_9 (%.4e7) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] -// CHECK:STDOUT: %F.ref.loc10: @C.G.%.loc9_9 (%.4e7) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %impl.elem0.loc10: @C.G.%.loc9 (%.4e7) = impl_witness_access constants.%C.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] +// CHECK:STDOUT: %F.ref.loc10: @C.G.%.loc9 (%.4e7) = name_ref F, %impl.elem0.loc10 [symbolic = %impl.elem0.loc9_9.2 (constants.%impl.elem0)] // CHECK:STDOUT: %bound_method.loc10_9: = bound_method %self.ref.loc10, %F.ref.loc10 // CHECK:STDOUT: %specific_impl_fn.loc10: = specific_impl_function %F.ref.loc10, @C.F(constants.%Self) [symbolic = %specific_impl_fn.loc9_9.2 (constants.%specific_impl_fn)] // CHECK:STDOUT: %bound_method.loc10_14: = bound_method %self.ref.loc10, %specific_impl_fn.loc10 -// CHECK:STDOUT: %.loc10: init %empty_tuple.type = call %bound_method.loc10_14(%self.ref.loc10) +// CHECK:STDOUT: %C.F.call.loc10: init %empty_tuple.type = call %bound_method.loc10_14(%self.ref.loc10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index b4cfb30977c7..63b9e856af42 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -348,22 +348,22 @@ fn Interface.C.F[self: Self](U:! type, u: U*) -> U* { return u; } // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc20_51: = require_complete_type %ptr.loc14_36.1 [symbolic = %require_complete.loc20_51 (constants.%require_complete.56d)] // CHECK:STDOUT: %require_complete.loc20_22: = require_complete_type %C [symbolic = %require_complete.loc20_22 (constants.%require_complete.179)] -// CHECK:STDOUT: %.loc20_62.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_22.1) [symbolic = %.loc20_62.2 (constants.%.2bd)] +// CHECK:STDOUT: %.loc20_62.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc14_22.1) [symbolic = %.loc20_62.1 (constants.%.2bd)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc14_36.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.484)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc14_36.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet)] -// CHECK:STDOUT: %.loc20_62.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc20_62.3 (constants.%.4ef)] -// CHECK:STDOUT: %impl.elem0.loc20_62.2: @C.F.%.loc20_62.3 (%.4ef) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.caa)] +// CHECK:STDOUT: %.loc20_62.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc20_62.2 (constants.%.4ef)] +// CHECK:STDOUT: %impl.elem0.loc20_62.2: @C.F.%.loc20_62.2 (%.4ef) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.caa)] // CHECK:STDOUT: %specific_impl_fn.loc20_62.2: = specific_impl_function %impl.elem0.loc20_62.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc20_62.2 (constants.%specific_impl_fn.8e3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%self.param.loc20: @C.F.%C (%C), %u.param.loc20: @C.F.%ptr.loc14_36.1 (%ptr.18e)) -> @C.F.%ptr.loc14_36.1 (%ptr.18e) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %u.ref: @C.F.%ptr.loc14_36.1 (%ptr.18e) = name_ref u, %u.loc20 -// CHECK:STDOUT: %impl.elem0.loc20_62.1: @C.F.%.loc20_62.3 (%.4ef) = impl_witness_access constants.%Copy.lookup_impl_witness.484, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.caa)] +// CHECK:STDOUT: %impl.elem0.loc20_62.1: @C.F.%.loc20_62.2 (%.4ef) = impl_witness_access constants.%Copy.lookup_impl_witness.484, element0 [symbolic = %impl.elem0.loc20_62.2 (constants.%impl.elem0.caa)] // CHECK:STDOUT: %bound_method.loc20_62.1: = bound_method %u.ref, %impl.elem0.loc20_62.1 // CHECK:STDOUT: %specific_impl_fn.loc20_62.1: = specific_impl_function %impl.elem0.loc20_62.1, @Copy.Op(constants.%Copy.facet) [symbolic = %specific_impl_fn.loc20_62.2 (constants.%specific_impl_fn.8e3)] // CHECK:STDOUT: %bound_method.loc20_62.2: = bound_method %u.ref, %specific_impl_fn.loc20_62.1 -// CHECK:STDOUT: %.loc20_62.1: init @C.F.%ptr.loc14_36.1 (%ptr.18e) = call %bound_method.loc20_62.2(%u.ref) -// CHECK:STDOUT: return %.loc20_62.1 to %return.loc20 +// CHECK:STDOUT: %Copy.Op.call: init @C.F.%ptr.loc14_36.1 (%ptr.18e) = call %bound_method.loc20_62.2(%u.ref) +// CHECK:STDOUT: return %Copy.Op.call to %return.loc20 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/final.carbon b/toolchain/check/testdata/interface/final.carbon index baf4cd52cd91..2fec7a815a6a 100644 --- a/toolchain/check/testdata/interface/final.carbon +++ b/toolchain/check/testdata/interface/final.carbon @@ -230,7 +230,7 @@ fn Use() { UseJ(C); } // CHECK:STDOUT: %.loc11_19.1: type = converted %T.ref, %T.as_type [symbolic = %T.binding.as_type (constants.%T.binding.as_type.b90)] // CHECK:STDOUT: %impl.elem0.loc11_19.1: @UseI.%.loc11_19.2 (%.19a) = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc11_19.2 (constants.%impl.elem0)] // CHECK:STDOUT: %specific_impl_fn.loc11_19.1: = specific_impl_function %impl.elem0.loc11_19.1, @I.F(constants.%T.cfb) [symbolic = %specific_impl_fn.loc11_19.2 (constants.%specific_impl_fn)] -// CHECK:STDOUT: %.loc11_22: init %empty_tuple.type = call %specific_impl_fn.loc11_19.1() +// CHECK:STDOUT: %I.F.call: init %empty_tuple.type = call %specific_impl_fn.loc11_19.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/generic_method.carbon b/toolchain/check/testdata/interface/generic_method.carbon index 133242844975..420e75441547 100644 --- a/toolchain/check/testdata/interface/generic_method.carbon +++ b/toolchain/check/testdata/interface/generic_method.carbon @@ -408,11 +408,11 @@ fn CallIndirect() { // CHECK:STDOUT: %require_complete.loc16_37: = require_complete_type %tuple.type.loc16 [symbolic = %require_complete.loc16_37 (constants.%require_complete.7c8)] // CHECK:STDOUT: %require_complete.loc16_19: = require_complete_type %ptr.loc16_22.1 [symbolic = %require_complete.loc16_19 (constants.%require_complete.ef162c.1)] // CHECK:STDOUT: %tuple.type.loc17: type = tuple_type (constants.%empty_struct_type, constants.%empty_struct_type, %ptr.loc16_22.1) [symbolic = %tuple.type.loc17 (constants.%tuple.type.dd2)] -// CHECK:STDOUT: %.loc17_21.2: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_8.1) [symbolic = %.loc17_21.2 (constants.%.841)] +// CHECK:STDOUT: %.loc17_21.1: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%U.loc16_8.1) [symbolic = %.loc17_21.1 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc16_22.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc16_22.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.29b)] -// CHECK:STDOUT: %.loc17_21.3: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc17_21.3 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.3 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc17_21.2: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc17_21.2 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc17_21.2: @Y.as.A.impl.F.%.loc17_21.2 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %specific_impl_fn.loc17_21.2: = specific_impl_function %impl.elem0.loc17_21.2, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%u.param: @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1)) -> %return.param: @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.9bf) { @@ -427,13 +427,13 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.elem1: ref %Y = tuple_access %return, element1 // CHECK:STDOUT: %.loc17_18.2: init %Y = class_init (), %tuple.elem1 [concrete = constants.%Y.val] // CHECK:STDOUT: %.loc17_22.3: init %Y = converted %.loc17_18.1, %.loc17_18.2 [concrete = constants.%Y.val] -// CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.3 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc17_21.1: @Y.as.A.impl.F.%.loc17_21.2 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc17_21.2 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc17_21.1: = bound_method %u.ref, %impl.elem0.loc17_21.1 // CHECK:STDOUT: %specific_impl_fn.loc17_21.1: = specific_impl_function %impl.elem0.loc17_21.1, @Copy.Op(constants.%Copy.facet.29b) [symbolic = %specific_impl_fn.loc17_21.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc17_21.2: = bound_method %u.ref, %specific_impl_fn.loc17_21.1 -// CHECK:STDOUT: %.loc17_21.1: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref) +// CHECK:STDOUT: %Copy.Op.call: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = call %bound_method.loc17_21.2(%u.ref) // CHECK:STDOUT: %tuple.elem2: ref @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = tuple_access %return, element2 -// CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = initialize_from %.loc17_21.1 to %tuple.elem2 +// CHECK:STDOUT: %.loc17_22.4: init @Y.as.A.impl.F.%ptr.loc16_22.1 (%ptr.e8f8f9.1) = initialize_from %Copy.Op.call to %tuple.elem2 // CHECK:STDOUT: %.loc17_22.5: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.9bf) = tuple_init (%.loc17_22.2, %.loc17_22.3, %.loc17_22.4) to %return // CHECK:STDOUT: %.loc17_23: init @Y.as.A.impl.F.%tuple.type.loc16 (%tuple.type.9bf) = converted %.loc17_22.1, %.loc17_22.5 // CHECK:STDOUT: return %.loc17_23 to %return @@ -490,10 +490,10 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%ptr.fb6) [symbolic = %tuple.type (constants.%tuple.type.089)] // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.e12)] // CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type, () [symbolic = %facet_value (constants.%facet_value.8b2)] -// CHECK:STDOUT: %.loc28_12.4: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %.loc28_12.4 (constants.%.00b)] +// CHECK:STDOUT: %.loc28_12.3: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %.loc28_12.3 (constants.%.00b)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.bd5)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.c2c)] -// CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.5 (constants.%.482)] +// CHECK:STDOUT: %.loc28_12.4: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.4 (constants.%.482)] // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.f36)] // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @CallGeneric.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.f36) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.754)] // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28: = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.4e3)] @@ -518,13 +518,13 @@ fn CallIndirect() { // CHECK:STDOUT: %addr: %ptr.fb6 = addr_of %u.ref // CHECK:STDOUT: %specific_impl_fn.loc28_4.1: = specific_impl_function %impl.elem0.loc28_4.1, @A.F(constants.%X, constants.%T.2e9, constants.%Z) [symbolic = %specific_impl_fn.loc28_4.2 (constants.%specific_impl_fn.727)] // CHECK:STDOUT: %.loc28_12.1: ref @CallGeneric.%tuple.type (%tuple.type.089) = temporary_storage -// CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.089) = call %specific_impl_fn.loc28_4.1(%addr) to %.loc28_12.1 -// CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.089) = temporary %.loc28_12.1, %.loc28_12.2 -// CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.5 (%.482) = impl_witness_access constants.%Destroy.impl_witness.bd5, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.754)] -// CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.3, %impl.elem0.loc28_12 +// CHECK:STDOUT: %A.F.call: init @CallGeneric.%tuple.type (%tuple.type.089) = call %specific_impl_fn.loc28_4.1(%addr) to %.loc28_12.1 +// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.089) = temporary %.loc28_12.1, %A.F.call +// CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.4 (%.482) = impl_witness_access constants.%Destroy.impl_witness.bd5, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.754)] +// CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.2, %impl.elem0.loc28_12 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc28_12, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.8b2) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.4e3)] -// CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.3, %specific_fn -// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.3) +// CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.2, %specific_fn +// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: = bound_method %u.var, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.afb // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.afb, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1eb] // CHECK:STDOUT: %bound_method.loc27: = bound_method %u.var, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1 @@ -609,10 +609,10 @@ fn CallIndirect() { // CHECK:STDOUT: %require_complete.loc16_37 => constants.%complete_type.05d // CHECK:STDOUT: %require_complete.loc16_19 => constants.%complete_type.d3e // CHECK:STDOUT: %tuple.type.loc17 => constants.%tuple.type.953 -// CHECK:STDOUT: %.loc17_21.2 => constants.%.519 +// CHECK:STDOUT: %.loc17_21.1 => constants.%.519 // CHECK:STDOUT: %Copy.lookup_impl_witness => constants.%Copy.impl_witness.9e0 // CHECK:STDOUT: %Copy.facet => constants.%Copy.facet.e2d -// CHECK:STDOUT: %.loc17_21.3 => constants.%.00e +// CHECK:STDOUT: %.loc17_21.2 => constants.%.00e // CHECK:STDOUT: %impl.elem0.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.167 // CHECK:STDOUT: %specific_impl_fn.loc17_21.2 => constants.%ptr.as.Copy.impl.Op.specific_fn // CHECK:STDOUT: } @@ -647,10 +647,10 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.092 // CHECK:STDOUT: %require_complete => constants.%complete_type.05d // CHECK:STDOUT: %facet_value => constants.%facet_value.352 -// CHECK:STDOUT: %.loc28_12.4 => constants.%.dab +// CHECK:STDOUT: %.loc28_12.3 => constants.%.dab // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.dcd // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.694 -// CHECK:STDOUT: %.loc28_12.5 => constants.%.989 +// CHECK:STDOUT: %.loc28_12.4 => constants.%.989 // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.79b // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.c25 // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.067 @@ -1092,10 +1092,10 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type: type = tuple_type (constants.%X, %T.binding.as_type, constants.%Z) [symbolic = %tuple.type (constants.%tuple.type.fe4)] // CHECK:STDOUT: %require_complete: = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.aed)] // CHECK:STDOUT: %facet_value: %type_where = facet_value %tuple.type, () [symbolic = %facet_value (constants.%facet_value.613)] -// CHECK:STDOUT: %.loc28_12.4: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %.loc28_12.4 (constants.%.c60)] +// CHECK:STDOUT: %.loc28_12.3: require_specific_def_type = require_specific_def @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %.loc28_12.3 (constants.%.c60)] // CHECK:STDOUT: %Destroy.impl_witness: = impl_witness imports.%Destroy.impl_witness_table, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %Destroy.impl_witness (constants.%Destroy.impl_witness.17f)] // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.9f4)] -// CHECK:STDOUT: %.loc28_12.5: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.5 (constants.%.168)] +// CHECK:STDOUT: %.loc28_12.4: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc28_12.4 (constants.%.168)] // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type: type = fn_type @DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.type (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.bb5)] // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op: @CallGeneric.%DestroyT.binding.as_type.as.Destroy.impl.Op.type (%DestroyT.binding.as_type.as.Destroy.impl.Op.type.bb5) = struct_value () [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.1ab)] // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28: = specific_function %DestroyT.binding.as_type.as.Destroy.impl.Op, @DestroyT.binding.as_type.as.Destroy.impl.Op(%facet_value) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.824)] @@ -1117,13 +1117,13 @@ fn CallIndirect() { // CHECK:STDOUT: %.loc28_11.4: ref %Z = temporary %.loc28_11.2, %.loc28_11.3 // CHECK:STDOUT: %.loc28_11.5: ref %Z = converted %.loc28_11.1, %.loc28_11.4 // CHECK:STDOUT: %.loc28_11.6: %Z = acquire_value %.loc28_11.5 -// CHECK:STDOUT: %.loc28_12.2: init @CallGeneric.%tuple.type (%tuple.type.fe4) = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) to %.loc28_12.1 -// CHECK:STDOUT: %.loc28_12.3: ref @CallGeneric.%tuple.type (%tuple.type.fe4) = temporary %.loc28_12.1, %.loc28_12.2 -// CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.5 (%.168) = impl_witness_access constants.%Destroy.impl_witness.17f, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.1ab)] -// CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.3, %impl.elem0.loc28_12 +// CHECK:STDOUT: %A.F.call: init @CallGeneric.%tuple.type (%tuple.type.fe4) = call %specific_impl_fn.loc28_4.1(%.loc28_11.6) to %.loc28_12.1 +// CHECK:STDOUT: %.loc28_12.2: ref @CallGeneric.%tuple.type (%tuple.type.fe4) = temporary %.loc28_12.1, %A.F.call +// CHECK:STDOUT: %impl.elem0.loc28_12: @CallGeneric.%.loc28_12.4 (%.168) = impl_witness_access constants.%Destroy.impl_witness.17f, element0 [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.1ab)] +// CHECK:STDOUT: %bound_method.loc28_12.1: = bound_method %.loc28_12.2, %impl.elem0.loc28_12 // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0.loc28_12, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.613) [symbolic = %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 (constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.824)] -// CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.3, %specific_fn -// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28_12: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.3) +// CHECK:STDOUT: %bound_method.loc28_12.2: = bound_method %.loc28_12.2, %specific_fn +// CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.call.loc28_12: init %empty_tuple.type = call %bound_method.loc28_12.2(%.loc28_12.2) // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.bound: = bound_method %.loc28_11.4, constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.afb // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1: = specific_function constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.afb, @DestroyT.binding.as_type.as.Destroy.impl.Op(constants.%facet_value.4e3) [concrete = constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1eb] // CHECK:STDOUT: %bound_method.loc28_11: = bound_method %.loc28_11.4, %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.1 @@ -1299,10 +1299,10 @@ fn CallIndirect() { // CHECK:STDOUT: %tuple.type => constants.%tuple.type.415 // CHECK:STDOUT: %require_complete => constants.%complete_type.aa8 // CHECK:STDOUT: %facet_value => constants.%facet_value.71a -// CHECK:STDOUT: %.loc28_12.4 => constants.%.5ca +// CHECK:STDOUT: %.loc28_12.3 => constants.%.5ca // CHECK:STDOUT: %Destroy.impl_witness => constants.%Destroy.impl_witness.1d2 // CHECK:STDOUT: %Destroy.facet => constants.%Destroy.facet.cb0 -// CHECK:STDOUT: %.loc28_12.5 => constants.%.97c +// CHECK:STDOUT: %.loc28_12.4 => constants.%.97c // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.type => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.type.518 // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.993 // CHECK:STDOUT: %DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.loc28 => constants.%DestroyT.binding.as_type.as.Destroy.impl.Op.specific_fn.0fc diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 95e17fb5ec21..c1c619186fe8 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -233,11 +233,11 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %Interface.lookup_impl_witness: = lookup_impl_witness %I.loc8_28.1, @Interface, @Interface(%T.loc8_18.1) [symbolic = %Interface.lookup_impl_witness (constants.%Interface.lookup_impl_witness.ca1)] // CHECK:STDOUT: %impl.elem0.loc9_11.3: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access %Interface.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.42c)] // CHECK:STDOUT: %require_complete.loc9_13: = require_complete_type %ptr.loc8_50.1 [symbolic = %require_complete.loc9_13 (constants.%require_complete.ef1)] -// CHECK:STDOUT: %.loc9_11.4: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_18.1) [symbolic = %.loc9_11.4 (constants.%.841)] +// CHECK:STDOUT: %.loc9_11.3: require_specific_def_type = require_specific_def @ptr.as.Copy.impl(%T.loc8_18.1) [symbolic = %.loc9_11.3 (constants.%.841)] // CHECK:STDOUT: %Copy.lookup_impl_witness: = lookup_impl_witness %ptr.loc8_50.1, @Copy [symbolic = %Copy.lookup_impl_witness (constants.%Copy.lookup_impl_witness.2e6)] // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %ptr.loc8_50.1, (%Copy.lookup_impl_witness) [symbolic = %Copy.facet (constants.%Copy.facet.29b)] -// CHECK:STDOUT: %.loc9_11.5: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_11.5 (constants.%.cb5)] -// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.5 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %.loc9_11.4: type = fn_type_with_self_type constants.%Copy.Op.type, %Copy.facet [symbolic = %.loc9_11.4 (constants.%.cb5)] +// CHECK:STDOUT: %impl.elem0.loc9_11.4: @AccessGeneric.%.loc9_11.4 (%.cb5) = impl_witness_access %Copy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc9_11.3: = bound_method %impl.elem0.loc9_11.3, %impl.elem0.loc9_11.4 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.704)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.2: = specific_impl_function %impl.elem0.loc9_11.4, @Copy.Op(%Copy.facet) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc9_11.4: = bound_method %impl.elem0.loc9_11.3, %specific_impl_fn.loc9_11.2 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.ce1)] @@ -250,12 +250,12 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %I.as_type: type = facet_access_type %I.ref [symbolic = %I.binding.as_type (constants.%I.binding.as_type.9ac)] // CHECK:STDOUT: %.loc9_11.2: type = converted %I.ref, %I.as_type [symbolic = %I.binding.as_type (constants.%I.binding.as_type.9ac)] // CHECK:STDOUT: %impl.elem0.loc9_11.1: @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = impl_witness_access constants.%Interface.lookup_impl_witness.ca1, element0 [symbolic = %impl.elem0.loc9_11.3 (constants.%impl.elem0.42c)] -// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.5 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.771)] +// CHECK:STDOUT: %impl.elem0.loc9_11.2: @AccessGeneric.%.loc9_11.4 (%.cb5) = impl_witness_access constants.%Copy.lookup_impl_witness.2e6, element0 [symbolic = %impl.elem0.loc9_11.4 (constants.%impl.elem0.771)] // CHECK:STDOUT: %bound_method.loc9_11.1: = bound_method %impl.elem0.loc9_11.1, %impl.elem0.loc9_11.2 [symbolic = %bound_method.loc9_11.3 (constants.%bound_method.704)] // CHECK:STDOUT: %specific_impl_fn.loc9_11.1: = specific_impl_function %impl.elem0.loc9_11.2, @Copy.Op(constants.%Copy.facet.29b) [symbolic = %specific_impl_fn.loc9_11.2 (constants.%specific_impl_fn.b85)] // CHECK:STDOUT: %bound_method.loc9_11.2: = bound_method %impl.elem0.loc9_11.1, %specific_impl_fn.loc9_11.1 [symbolic = %bound_method.loc9_11.4 (constants.%bound_method.ce1)] -// CHECK:STDOUT: %.loc9_11.3: init @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1) -// CHECK:STDOUT: return %.loc9_11.3 to %return +// CHECK:STDOUT: %Copy.Op.call: init @AccessGeneric.%ptr.loc8_50.1 (%ptr.e8f) = call %bound_method.loc9_11.2(%impl.elem0.loc9_11.1) +// CHECK:STDOUT: return %Copy.Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon index f2f788a27a35..77b4c165ee01 100644 --- a/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon +++ b/toolchain/lower/testdata/function/generic/call_different_impls_with_const.carbon @@ -76,11 +76,11 @@ fn Run() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc37_20.1.temp = alloca i1, align 1, !dbg !23 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc37_20.1.temp), !dbg !23 -// CHECK:STDOUT: %.loc37_20.2 = call i1 @"_CF.X.Main:I.Main"(), !dbg !23 -// CHECK:STDOUT: %.loc37_20.3 = zext i1 %.loc37_20.2 to i8, !dbg !23 -// CHECK:STDOUT: store i8 %.loc37_20.3, ptr %.loc37_20.1.temp, align 1, !dbg !23 -// CHECK:STDOUT: %.loc37_20.4 = load i8, ptr %.loc37_20.1.temp, align 1, !dbg !23 -// CHECK:STDOUT: %.loc37_20.41 = trunc i8 %.loc37_20.4 to i1, !dbg !23 +// CHECK:STDOUT: %I.F.call = call i1 @"_CF.X.Main:I.Main"(), !dbg !23 +// CHECK:STDOUT: %.loc37_20.2 = zext i1 %I.F.call to i8, !dbg !23 +// CHECK:STDOUT: store i8 %.loc37_20.2, ptr %.loc37_20.1.temp, align 1, !dbg !23 +// CHECK:STDOUT: %.loc37_20.3 = load i8, ptr %.loc37_20.1.temp, align 1, !dbg !23 +// CHECK:STDOUT: %.loc37_20.31 = trunc i8 %.loc37_20.3 to i1, !dbg !23 // CHECK:STDOUT: ret void, !dbg !24 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -89,9 +89,9 @@ fn Run() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc37_20.1.temp = alloca i32, align 4, !dbg !26 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc37_20.1.temp), !dbg !26 -// CHECK:STDOUT: %.loc37_20.2 = call i32 @"_CF.Y.Main:I.Main"(), !dbg !26 -// CHECK:STDOUT: store i32 %.loc37_20.2, ptr %.loc37_20.1.temp, align 4, !dbg !26 -// CHECK:STDOUT: %.loc37_20.4 = load i32, ptr %.loc37_20.1.temp, align 4, !dbg !26 +// CHECK:STDOUT: %I.F.call = call i32 @"_CF.Y.Main:I.Main"(), !dbg !26 +// CHECK:STDOUT: store i32 %I.F.call, ptr %.loc37_20.1.temp, align 4, !dbg !26 +// CHECK:STDOUT: %.loc37_20.3 = load i32, ptr %.loc37_20.1.temp, align 4, !dbg !26 // CHECK:STDOUT: ret void, !dbg !27 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call_impl_function.carbon b/toolchain/lower/testdata/function/generic/call_impl_function.carbon index f1777ccdaed4..04a358576673 100644 --- a/toolchain/lower/testdata/function/generic/call_impl_function.carbon +++ b/toolchain/lower/testdata/function/generic/call_impl_function.carbon @@ -63,8 +63,8 @@ fn G() { // CHECK:STDOUT: ; Function Attrs: nounwind // CHECK:STDOUT: define linkonce_odr i32 @_CCallGenericMethod.Main.dc54e41cb8a9bf68(i32 %x) #0 !dbg !17 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc36_15 = call i32 @"_CF.ImplsSomeInterface.Main:SomeInterface.Main"(i32 %x), !dbg !20 -// CHECK:STDOUT: ret i32 %.loc36_15, !dbg !21 +// CHECK:STDOUT: %SomeInterface.F.call = call i32 @"_CF.ImplsSomeInterface.Main:SomeInterface.Main"(i32 %x), !dbg !20 +// CHECK:STDOUT: ret i32 %SomeInterface.F.call, !dbg !21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: attributes #0 = { nounwind } diff --git a/toolchain/lower/testdata/function/generic/type_representation.carbon b/toolchain/lower/testdata/function/generic/type_representation.carbon index 611b88f84118..7703ffeb2b0f 100644 --- a/toolchain/lower/testdata/function/generic/type_representation.carbon +++ b/toolchain/lower/testdata/function/generic/type_representation.carbon @@ -171,10 +171,10 @@ fn F_nested_tuple(a: ((i32, i32), X)) -> ((i32, i32), X) { // CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca i32, align 4, !dbg !63 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %v.var), !dbg !63 -// CHECK:STDOUT: %.loc18_26 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !64 -// CHECK:STDOUT: store i32 %.loc18_26, ptr %v.var, align 4, !dbg !63 -// CHECK:STDOUT: %.loc19 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !65 -// CHECK:STDOUT: ret i32 %.loc19, !dbg !66 +// CHECK:STDOUT: %Copy.Op.call.loc18 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !64 +// CHECK:STDOUT: store i32 %Copy.Op.call.loc18, ptr %v.var, align 4, !dbg !63 +// CHECK:STDOUT: %Copy.Op.call.loc19 = call i32 @"_COp.Int.Core:Copy.Main"(i32 %a), !dbg !65 +// CHECK:STDOUT: ret i32 %Copy.Op.call.loc19, !dbg !66 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: ; Function Attrs: nounwind diff --git a/toolchain/sem_ir/function.cpp b/toolchain/sem_ir/function.cpp index 5b60a3ccc83e..2b37de83e045 100644 --- a/toolchain/sem_ir/function.cpp +++ b/toolchain/sem_ir/function.cpp @@ -37,6 +37,10 @@ auto GetCallee(const File& sem_ir, InstId callee_id, SpecificId specific_id) sem_ir.insts().TryGetAs(callee_id)) { fn.resolved_specific_id = specific_function->specific_id; callee_id = specific_function->callee_id; + } else if (auto specific_impl_function = + sem_ir.insts().TryGetAs(callee_id)) { + fn.resolved_specific_id = specific_impl_function->specific_id; + callee_id = specific_impl_function->callee_id; } // Identify the function we're calling by its type.