Просмотр исходного кода

Build generic eval blocks incrementally (#5313)

Instead of building an eval block as a separate pass at the end of a
generic, build the eval block incrementally.

The larger change here is that asking for the type or constant value of
an instruction now always returns an unattached type or constant value,
in order to preserve the behavior that we previously achieved by doing
the rewrite to attached types and constant values at the end of handling
the generic.

This also incidentally fixes some subtle issues where attached types and
constant values would leak out into check and cause it to get confused
about differences between attached and unattached values. Check should
no longer see attached values except where it explicitly asks for them.

---------

Co-authored-by: Dana Jansens <danakj@orodu.net>
Richard Smith 1 год назад
Родитель
Сommit
4f5d11a28b
100 измененных файлов с 784 добавлено и 1632 удалено
  1. 3 4
      toolchain/check/BUILD
  2. 107 82
      toolchain/check/eval.cpp
  3. 357 239
      toolchain/check/generic.cpp
  4. 28 1
      toolchain/check/generic.h
  5. 10 23
      toolchain/check/generic_region_stack.cpp
  6. 80 29
      toolchain/check/generic_region_stack.h
  7. 1 1
      toolchain/check/handle_choice.cpp
  8. 1 1
      toolchain/check/handle_class.cpp
  9. 2 2
      toolchain/check/handle_function.cpp
  10. 1 1
      toolchain/check/handle_impl.cpp
  11. 1 1
      toolchain/check/handle_interface.cpp
  12. 7 5
      toolchain/check/handle_let_and_var.cpp
  13. 42 41
      toolchain/check/import_ref.cpp
  14. 20 12
      toolchain/check/inst.cpp
  15. 2 3
      toolchain/check/member_access.cpp
  16. 1 1
      toolchain/check/member_access.h
  17. 13 4
      toolchain/check/name_lookup.cpp
  18. 16 11
      toolchain/check/subst.cpp
  19. 12 0
      toolchain/check/subst.h
  20. 1 1
      toolchain/check/testdata/alias/fail_control_flow.carbon
  21. 0 2
      toolchain/check/testdata/choice/generic.carbon
  22. 0 4
      toolchain/check/testdata/class/fail_generic_method.carbon
  23. 2 12
      toolchain/check/testdata/class/generic/adapt.carbon
  24. 1 25
      toolchain/check/testdata/class/generic/base_is_generic.carbon
  25. 0 6
      toolchain/check/testdata/class/generic/basic.carbon
  26. 0 16
      toolchain/check/testdata/class/generic/call.carbon
  27. 0 2
      toolchain/check/testdata/class/generic/complete_in_conversion.carbon
  28. 0 6
      toolchain/check/testdata/class/generic/field.carbon
  29. 1 11
      toolchain/check/testdata/class/generic/import.carbon
  30. 0 6
      toolchain/check/testdata/class/generic/init.carbon
  31. 16 61
      toolchain/check/testdata/class/generic/member_access.carbon
  32. 0 8
      toolchain/check/testdata/class/generic/member_inline.carbon
  33. 0 24
      toolchain/check/testdata/class/generic/member_lookup.carbon
  34. 3 19
      toolchain/check/testdata/class/generic/member_out_of_line.carbon
  35. 0 28
      toolchain/check/testdata/class/generic/member_type.carbon
  36. 9 51
      toolchain/check/testdata/class/generic/method_deduce.carbon
  37. 0 12
      toolchain/check/testdata/class/generic/self.carbon
  38. 0 2
      toolchain/check/testdata/class/generic/stringify.carbon
  39. 1 5
      toolchain/check/testdata/class/generic_method.carbon
  40. 0 2
      toolchain/check/testdata/class/min_prelude/destroy_calls.carbon
  41. 0 4
      toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon
  42. 0 16
      toolchain/check/testdata/class/virtual_modifiers.carbon
  43. 3 40
      toolchain/check/testdata/deduce/generic_type.carbon
  44. 0 4
      toolchain/check/testdata/deduce/tuple.carbon
  45. 0 8
      toolchain/check/testdata/deduce/type_operator.carbon
  46. 0 8
      toolchain/check/testdata/deduce/value_with_type_through_access.carbon
  47. 0 18
      toolchain/check/testdata/facet/min_prelude/access.carbon
  48. 0 16
      toolchain/check/testdata/facet/min_prelude/call_combined_impl_witness.carbon
  49. 0 8
      toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon
  50. 0 20
      toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon
  51. 0 8
      toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon
  52. 0 30
      toolchain/check/testdata/facet/min_prelude/convert_class_value_to_generic_facet_value_value.carbon
  53. 0 8
      toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon
  54. 0 10
      toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon
  55. 0 34
      toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_narrowed_facet_type.carbon
  56. 0 12
      toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon
  57. 0 20
      toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon
  58. 0 10
      toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon
  59. 0 8
      toolchain/check/testdata/facet/min_prelude/convert_interface.carbon
  60. 0 12
      toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon
  61. 0 8
      toolchain/check/testdata/facet/min_prelude/fail_convert_facet_value_to_missing_impl.carbon
  62. 0 8
      toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon
  63. 1 15
      toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon
  64. 0 16
      toolchain/check/testdata/facet/min_prelude/runtime_value.carbon
  65. 4 20
      toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon
  66. 1 9
      toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon
  67. 0 6
      toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon
  68. 0 26
      toolchain/check/testdata/function/generic/deduce.carbon
  69. 0 8
      toolchain/check/testdata/function/generic/min_prelude/call.carbon
  70. 0 4
      toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon
  71. 0 2
      toolchain/check/testdata/function/generic/redeclare.carbon
  72. 0 6
      toolchain/check/testdata/function/generic/return_slot.carbon
  73. 0 8
      toolchain/check/testdata/generic/call_basic_depth.carbon
  74. 0 2
      toolchain/check/testdata/generic/complete_type.carbon
  75. 0 4
      toolchain/check/testdata/generic/dependent_param.carbon
  76. 0 2
      toolchain/check/testdata/generic/local.carbon
  77. 6 25
      toolchain/check/testdata/generic/template_dependence.carbon
  78. 1 1
      toolchain/check/testdata/if_expr/fail_not_in_function.carbon
  79. 0 4
      toolchain/check/testdata/impl/assoc_const_self.carbon
  80. 0 18
      toolchain/check/testdata/impl/extend_impl_generic.carbon
  81. 0 6
      toolchain/check/testdata/impl/fail_extend_impl_forall.carbon
  82. 0 4
      toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon
  83. 0 2
      toolchain/check/testdata/impl/fail_self_type_mismatch.carbon
  84. 0 2
      toolchain/check/testdata/impl/impl_forall.carbon
  85. 0 28
      toolchain/check/testdata/impl/lookup/generic.carbon
  86. 0 14
      toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon
  87. 0 20
      toolchain/check/testdata/impl/lookup/min_prelude/impl_forall.carbon
  88. 21 25
      toolchain/check/testdata/impl/lookup/min_prelude/import.carbon
  89. 0 48
      toolchain/check/testdata/impl/lookup/min_prelude/specialization_with_symbolic_rewrite.carbon
  90. 0 20
      toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon
  91. 0 2
      toolchain/check/testdata/impl/min_prelude/fail_extend_impl_scope.carbon
  92. 0 2
      toolchain/check/testdata/impl/min_prelude/fail_impl_as_scope.carbon
  93. 0 28
      toolchain/check/testdata/impl/min_prelude/forward_decls.carbon
  94. 0 20
      toolchain/check/testdata/impl/min_prelude/generic_redeclaration.carbon
  95. 0 28
      toolchain/check/testdata/impl/min_prelude/interface_args.carbon
  96. 0 12
      toolchain/check/testdata/impl/no_prelude/compound.carbon
  97. 1 29
      toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon
  98. 7 19
      toolchain/check/testdata/impl/no_prelude/import_compound.carbon
  99. 1 1
      toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon
  100. 0 72
      toolchain/check/testdata/impl/no_prelude/import_generic.carbon

+ 3 - 4
toolchain/check/BUILD

@@ -118,7 +118,7 @@ cc_library(
         "//toolchain/parse:tree",
         "//toolchain/sem_ir:expr_info",
         "//toolchain/sem_ir:file",
-        "//toolchain/sem_ir:inst",
+        "//toolchain/sem_ir:formatter",
         "//toolchain/sem_ir:typed_insts",
         "@llvm-project//clang:frontend",
         "@llvm-project//clang:sema",
@@ -189,7 +189,6 @@ cc_library(
         "//toolchain/sem_ir:entry_point",
         "//toolchain/sem_ir:expr_info",
         "//toolchain/sem_ir:file",
-        "//toolchain/sem_ir:inst",
         "//toolchain/sem_ir:typed_insts",
         "@llvm-project//llvm:Support",
     ],
@@ -215,10 +214,10 @@ cc_library(
     deps = [
         "//common:array_stack",
         "//common:check",
+        "//common:map",
         "//common:ostream",
         "//common:vlog",
         "//toolchain/sem_ir:file",
-        "//toolchain/sem_ir:inst",
         "//toolchain/sem_ir:typed_insts",
         "@llvm-project//llvm:Support",
     ],
@@ -247,7 +246,7 @@ cc_library(
         ":context",
         "//common:check",
         "//toolchain/parse:node_kind",
-        "//toolchain/sem_ir:inst",
+        "//toolchain/sem_ir:file",
         "//toolchain/sem_ir:typed_insts",
         "@llvm-project//llvm:Support",
     ],

+ 107 - 82
toolchain/check/eval.cpp

@@ -21,6 +21,7 @@
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 #include "toolchain/diagnostics/format_providers.h"
 #include "toolchain/sem_ir/builtin_function_kind.h"
+#include "toolchain/sem_ir/constant.h"
 #include "toolchain/sem_ir/function.h"
 #include "toolchain/sem_ir/generic.h"
 #include "toolchain/sem_ir/id_kind.h"
@@ -93,11 +94,33 @@ class EvalContext {
     return constant_values().Get(args[bind_index.index]);
   }
 
-  // Given a constant value from the SemIR we're evaluating, finds the
-  // corresponding constant value to use in the context of this evaluation.
-  // This can be different if the original SemIR is for a generic and we are
-  // evaluating with specific arguments for the generic parameters.
-  auto GetInContext(SemIR::ConstantId const_id) -> SemIR::ConstantId {
+  // Given information about a symbolic constant, determine its value in the
+  // currently-being-evaluated eval block, if it refers to that eval block. If
+  // we can't find a value in this way, returns `None`.
+  auto GetInEvaluatedSpecific(const SemIR::SymbolicConstant& symbolic_info)
+      -> SemIR::ConstantId {
+    if (!specific_eval_info_ || !symbolic_info.index.has_value()) {
+      return SemIR::ConstantId::None;
+    }
+
+    CARBON_CHECK(
+        symbolic_info.generic_id == specifics().Get(specific_id_).generic_id,
+        "Instruction has constant operand in wrong generic");
+    if (symbolic_info.index.region() != specific_eval_info_->region) {
+      return SemIR::ConstantId::None;
+    }
+
+    auto inst_id = specific_eval_info_->values[symbolic_info.index.index()];
+    CARBON_CHECK(inst_id.has_value(),
+                 "Forward reference in eval block: index {0} referenced "
+                 "before evaluation",
+                 symbolic_info.index.index());
+    return constant_values().Get(inst_id);
+  }
+
+  // Gets the constant value of the specified instruction in this context.
+  auto GetConstantValue(SemIR::InstId inst_id) -> SemIR::ConstantId {
+    auto const_id = constant_values().GetAttached(inst_id);
     if (!const_id.is_symbolic()) {
       return const_id;
     }
@@ -107,53 +130,33 @@ class EvalContext {
     // specific itself yet, so `GetConstantValueInSpecific` won't be able to
     // find them.
     const auto& symbolic_info = constant_values().GetSymbolicConstant(const_id);
-    if (specific_eval_info_ && symbolic_info.index.has_value()) {
-      CARBON_CHECK(
-          symbolic_info.generic_id == specifics().Get(specific_id_).generic_id,
-          "Instruction has constant operand in wrong generic");
-      if (symbolic_info.index.region() == specific_eval_info_->region) {
-        auto inst_id = specific_eval_info_->values[symbolic_info.index.index()];
-        CARBON_CHECK(inst_id.has_value(),
-                     "Forward reference in eval block: index {0} referenced "
-                     "before evaluation",
-                     symbolic_info.index.index());
-        return constant_values().Get(inst_id);
-      } else {
-        // TODO: Eliminate this call. This is the only place where we get a
-        // value from a specific without using an InstId. There are three ways
-        // we can get here:
-        // 1) From GetConstantValue(InstId): these can use
-        //    GetConstantValueInSpecific.
-        // 2) From GetConstantValue(TypeId): for these, we could change
-        //    instructions so they store InstIds instead of TypeIds.
-        return GetConstantInSpecific(sem_ir(), specific_id_, const_id);
-      }
+    if (auto eval_block_const_id = GetInEvaluatedSpecific(symbolic_info);
+        eval_block_const_id.has_value()) {
+      return eval_block_const_id;
     }
 
-    // Map from a specific constant value to the canonical value.
-    return constant_values().Get(symbolic_info.inst_id);
-  }
-
-  // Gets the constant value of the specified instruction in this context.
-  auto GetConstantValue(SemIR::InstId inst_id) -> SemIR::ConstantId {
-    return GetInContext(constant_values().Get(inst_id));
+    return GetConstantValueInSpecific(sem_ir(), specific_id_, inst_id);
   }
 
-  // Gets the constant value of the specified type in this context.
-  auto GetConstantValue(SemIR::TypeId type_id) -> SemIR::ConstantId {
-    return GetInContext(types().GetConstantId(type_id));
-  }
+  // Gets the type of the specified instruction in this context.
+  auto GetTypeOfInst(SemIR::InstId inst_id) -> SemIR::TypeId {
+    auto type_id = insts().GetAttachedType(inst_id);
+    if (!type_id.is_symbolic()) {
+      return type_id;
+    }
 
-  // Gets the constant value of the specified type in this context.
-  auto GetConstantValueAsType(SemIR::TypeId id) -> SemIR::TypeId {
-    return context().types().GetTypeIdForTypeConstantId(GetConstantValue(id));
-  }
+    // While resolving a specific, map from previous instructions in the eval
+    // block into their evaluated values. These values won't be present on the
+    // specific itself yet, so `GetTypeOfInstInSpecific` won't be able to
+    // find them.
+    const auto& symbolic_info =
+        constant_values().GetSymbolicConstant(types().GetConstantId(type_id));
+    if (auto eval_block_const_id = GetInEvaluatedSpecific(symbolic_info);
+        eval_block_const_id.has_value()) {
+      return types().GetTypeIdForTypeConstantId(eval_block_const_id);
+    }
 
-  // Gets the instruction describing the constant value of the specified type in
-  // this context.
-  auto GetConstantValueAsInst(SemIR::TypeId id) -> SemIR::Inst {
-    return insts().Get(
-        context().constant_values().GetInstId(GetConstantValue(id)));
+    return GetTypeOfInstInSpecific(sem_ir(), specific_id_, inst_id);
   }
 
   auto ints() -> SharedValueStores::IntStore& { return sem_ir().ints(); }
@@ -445,14 +448,15 @@ static auto GetConstantValue(EvalContext& /*eval_context*/,
   return SemIR::InstId::None;
 }
 
-// Given a type which may refer to a generic parameter, returns the
+// Given an instruction whose type may refer to a generic parameter, returns the
 // corresponding type in the evaluation context.
-static auto GetConstantValue(EvalContext& eval_context, SemIR::TypeId type_id,
-                             Phase* phase) -> SemIR::TypeId {
-  auto const_id = eval_context.GetConstantValue(type_id);
-  *phase =
-      LatestPhase(*phase, GetPhase(eval_context.constant_values(), const_id));
-  return eval_context.context().types().GetTypeIdForTypeConstantId(const_id);
+static auto GetTypeOfInst(EvalContext& eval_context, SemIR::InstId inst_id,
+                          Phase* phase) -> SemIR::TypeId {
+  auto type_id = eval_context.GetTypeOfInst(inst_id);
+  *phase = LatestPhase(*phase,
+                       GetPhase(eval_context.constant_values(),
+                                eval_context.types().GetConstantId(type_id)));
+  return type_id;
 }
 
 // AbsoluteInstBlockId can not have its values substituted, so this overload is
@@ -717,19 +721,13 @@ static auto GetConstantValueForArg(EvalContext& eval_context,
                                               arg_and_kind.value(), phase);
 }
 
-// Given an instruction, replaces its type and operands with their constant
-// values from the specified evaluation context. `*phase` is updated to describe
-// the constant phase of the result. Returns whether `*phase` is a constant
-// phase; if not, `inst` may not be fully updated and should not be used.
+// Given an instruction, replaces its operands with their constant values from
+// the specified evaluation context. `*phase` is updated to describe the
+// constant phase of the result. Returns whether `*phase` is a constant phase;
+// if not, `inst` may not be fully updated and should not be used.
 static auto ReplaceAllFieldsWithConstantValues(EvalContext& eval_context,
                                                SemIR::Inst* inst, Phase* phase)
     -> bool {
-  auto type_id = GetConstantValue(eval_context, inst->type_id(), phase);
-  inst->SetType(type_id);
-  if (!IsConstant(*phase)) {
-    return false;
-  }
-
   auto arg0 =
       GetConstantValueForArg(eval_context, inst->arg0_and_kind(), phase);
   if (!IsConstant(*phase)) {
@@ -745,21 +743,51 @@ static auto ReplaceAllFieldsWithConstantValues(EvalContext& eval_context,
   return true;
 }
 
+// Given an instruction and its ID, replaces its type with the corresponding
+// value in this evaluation context. Updates `*phase` to describe the phase of
+// the result, and returns whether `*phase` is a constant phase.
+//
+// If the `InstId` is not provided, the instruction is assumed to be new and
+// therefore unattached, so the type is not updated.
+static auto ReplaceTypeWithConstantValue(EvalContext& eval_context,
+                                         SemIR::InstId inst_id,
+                                         SemIR::Inst* inst, Phase* phase)
+    -> bool {
+  if (inst_id.has_value()) {
+    inst->SetType(GetTypeOfInst(eval_context, inst_id, phase));
+  }
+  return IsConstant(*phase);
+}
+
+template <typename InstT>
+static auto ReplaceTypeWithConstantValue(EvalContext& eval_context,
+                                         SemIR::InstId inst_id, InstT* inst,
+                                         Phase* phase) -> bool {
+  if (inst_id.has_value()) {
+    inst->type_id = GetTypeOfInst(eval_context, inst_id, phase);
+  }
+  return IsConstant(*phase);
+}
+
 auto AddImportedConstant(Context& context, SemIR::Inst inst)
     -> SemIR::ConstantId {
   EvalContext eval_context(&context, SemIR::LocId::None);
   Phase phase = Phase::Concrete;
   switch (inst.kind().value_kind()) {
-    case SemIR::InstValueKind::Typed:
+    case SemIR::InstValueKind::Typed: {
+      phase = GetPhase(context.constant_values(),
+                       context.types().GetConstantId(inst.type_id()));
       // TODO: Can we avoid doing this replacement? It may do things that are
       // undesirable during importing, such as resolving specifics.
       if (!ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) {
         return SemIR::ConstantId::NotConstant;
       }
       break;
-    case SemIR::InstValueKind::None:
+    }
+    case SemIR::InstValueKind::None: {
       // Instructions without a type_id are not evaluated.
       break;
+    }
   }
   return MakeConstantResult(context, inst, phase);
 }
@@ -784,8 +812,7 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst)
   // Array indexing is invalid if the index is constant and out of range,
   // regardless of whether the array itself is constant.
   const auto& index_val = eval_context.ints().Get(index->int_id);
-  auto aggregate_type_id = eval_context.GetConstantValueAsType(
-      eval_context.insts().Get(inst.array_id).type_id());
+  auto aggregate_type_id = eval_context.GetTypeOfInst(inst.array_id);
   if (auto array_type =
           eval_context.types().TryGetAs<SemIR::ArrayType>(aggregate_type_id)) {
     if (auto bound = eval_context.insts().TryGetAs<SemIR::IntValue>(
@@ -1607,8 +1634,9 @@ static auto MakeConstantForBuiltinCall(EvalContext& eval_context,
 }
 
 // Makes a constant for a call instruction.
-static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id,
-                                SemIR::Call call) -> SemIR::ConstantId {
+static auto MakeConstantForCall(EvalContext& eval_context,
+                                SemIR::InstId inst_id, SemIR::Call call)
+    -> SemIR::ConstantId {
   Phase phase = Phase::Concrete;
 
   // A call with an invalid argument list is used to represent an erroneous
@@ -1644,8 +1672,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id,
   // Find the argument values and the return type.
   bool has_constant_operands =
       has_constant_callee &&
-      ReplaceFieldWithConstantValue(eval_context, &call, &SemIR::Call::type_id,
-                                    &phase) &&
+      ReplaceTypeWithConstantValue(eval_context, inst_id, &call, &phase) &&
       ReplaceFieldWithConstantValue(eval_context, &call, &SemIR::Call::args_id,
                                     &phase);
   if (phase == Phase::UnknownDueToError) {
@@ -1663,7 +1690,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id,
       CARBON_DIAGNOSTIC(CompTimeOnlyFunctionHere, Note,
                         "compile-time-only function declared here");
       eval_context.emitter()
-          .Build(loc_id, NonConstantCallToCompTimeOnlyFunction)
+          .Build(inst_id, NonConstantCallToCompTimeOnlyFunction)
           .Note(eval_context.functions()
                     .Get(callee_function.function_id)
                     .latest_decl_id(),
@@ -1676,7 +1703,7 @@ static auto MakeConstantForCall(EvalContext& eval_context, SemIR::LocId loc_id,
   // Handle calls to builtins.
   if (builtin_kind != SemIR::BuiltinFunctionKind::None) {
     return MakeConstantForBuiltinCall(
-        eval_context, loc_id, call, builtin_kind,
+        eval_context, SemIR::LocId(inst_id), call, builtin_kind,
         eval_context.inst_blocks().Get(call.args_id), phase);
   }
 
@@ -1743,7 +1770,8 @@ static auto TryEvalTypedInst(EvalContext& eval_context, SemIR::InstId inst_id,
     // Build a constant instruction by replacing each non-constant operand with
     // its constant value.
     Phase phase = Phase::Concrete;
-    if (!ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) {
+    if (!ReplaceTypeWithConstantValue(eval_context, inst_id, &inst, &phase) ||
+        !ReplaceAllFieldsWithConstantValues(eval_context, &inst, &phase)) {
       if constexpr (ConstantKind == SemIR::InstConstantKind::Always) {
         CARBON_CHECK(phase == Phase::UnknownDueToError,
                      "{0} should always be constant", InstT::Kind);
@@ -1799,9 +1827,7 @@ template <>
 auto TryEvalTypedInst<SemIR::Call>(EvalContext& eval_context,
                                    SemIR::InstId inst_id, SemIR::Inst inst)
     -> SemIR::ConstantId {
-  return MakeConstantForCall(eval_context,
-                             eval_context.GetDiagnosticLoc(inst_id),
-                             inst.As<SemIR::Call>());
+  return MakeConstantForCall(eval_context, inst_id, inst.As<SemIR::Call>());
 }
 
 // ImportRefLoaded can have a constant value, but it's owned and maintained by
@@ -1820,7 +1846,7 @@ auto TryEvalTypedInst<SemIR::ImportRefLoaded>(EvalContext& /*eval_context*/,
 // context and produce a context-specific value.
 template <>
 auto TryEvalTypedInst<SemIR::BindSymbolicName>(EvalContext& eval_context,
-                                               SemIR::InstId /*inst_id*/,
+                                               SemIR::InstId inst_id,
                                                SemIR::Inst inst)
     -> SemIR::ConstantId {
   auto bind = inst.As<SemIR::BindSymbolicName>();
@@ -1840,8 +1866,7 @@ auto TryEvalTypedInst<SemIR::BindSymbolicName>(EvalContext& eval_context,
   // original, with no equivalent value.
   Phase phase = Phase::Concrete;
   bind.value_id = SemIR::InstId::None;
-  if (!ReplaceFieldWithConstantValue(
-          eval_context, &bind, &SemIR::BindSymbolicName::type_id, &phase) ||
+  if (!ReplaceTypeWithConstantValue(eval_context, inst_id, &bind, &phase) ||
       !ReplaceFieldWithConstantValue(eval_context, &bind,
                                      &SemIR::BindSymbolicName::entity_name_id,
                                      &phase)) {
@@ -1888,9 +1913,9 @@ auto TryEvalTypedInst<SemIR::WhereExpr>(EvalContext& eval_context,
 
   Phase phase = Phase::Concrete;
   SemIR::TypeId base_facet_type_id =
-      eval_context.insts().Get(typed_inst.period_self_id).type_id();
+      eval_context.GetTypeOfInst(typed_inst.period_self_id);
   SemIR::Inst base_facet_inst =
-      eval_context.GetConstantValueAsInst(base_facet_type_id);
+      eval_context.types().GetAsInst(base_facet_type_id);
   SemIR::FacetTypeInfo info = {.other_requirements = false};
   // `where` provides that the base facet is an error, `type`, or a facet
   // type.

+ 357 - 239
toolchain/check/generic.cpp

@@ -4,7 +4,6 @@
 
 #include "toolchain/check/generic.h"
 
-#include "common/map.h"
 #include "toolchain/base/kind_switch.h"
 #include "toolchain/check/diagnostic_helpers.h"
 #include "toolchain/check/eval.h"
@@ -25,34 +24,37 @@ namespace Carbon::Check {
 static auto MakeSelfSpecificId(Context& context, SemIR::GenericId generic_id)
     -> SemIR::SpecificId;
 
-auto StartGenericDecl(Context& context) -> void {
-  context.generic_region_stack().Push();
-}
-
-auto StartGenericDefinition(Context& context) -> void {
-  // Push a generic region even if we don't have a generic_id. We might still
-  // have locally-introduced generic parameters to track:
-  //
-  // fn F() {
-  //   let T:! type = i32;
-  //   var x: T;
-  // }
-  context.generic_region_stack().Push();
+// Get the current pending generic. If we have not yet allocated a `GenericId`
+// for it, do so now.
+static auto GetOrCreatePendingGeneric(Context& context)
+    -> GenericRegionStack::PendingGeneric {
+  auto pending_generic = context.generic_region_stack().PeekPendingGeneric();
+  if (!pending_generic.generic_id.has_value()) {
+    // Allocate a placeholder generic now to form a generic ID. This generic
+    // will be populated once we reach the end of the generic declaration.
+    pending_generic.generic_id = context.generics().Add(
+        SemIR::Generic{.decl_id = SemIR::InstId::None,
+                       .bindings_id = SemIR::InstBlockId::None,
+                       .self_specific_id = SemIR::SpecificId::None});
+    context.generic_region_stack().SetPendingGenericId(
+        pending_generic.generic_id);
+  }
+  return pending_generic;
 }
 
-// Adds an instruction `generic_inst_id` to the eval block for a generic region,
-// which is the current instruction block. The instruction `generic_inst_id` is
-// expected to compute the value of the constant described by `const_inst_id` in
-// each specific. Forms and returns a corresponding symbolic constant ID that
-// refers to the substituted value of that instruction in each specific.
+// Adds an instruction `generic_inst_id` to the eval block for the current
+// generic region. The instruction `generic_inst_id` is expected to compute the
+// value of the constant described by `const_inst_id` in each specific. Forms
+// and returns a corresponding symbolic constant ID that refers to the
+// substituted value of that instruction in each specific.
 static auto AddGenericConstantInstToEvalBlock(
-    Context& context, SemIR::GenericId generic_id,
-    SemIR::GenericInstIndex::Region region, SemIR::InstId const_inst_id,
+    Context& context, SemIR::InstId const_inst_id,
     SemIR::InstId generic_inst_id, SemIR::ConstantDependence dependence)
     -> SemIR::ConstantId {
+  auto [generic_id, region] = GetOrCreatePendingGeneric(context);
   auto index = SemIR::GenericInstIndex(
-      region, context.inst_block_stack().PeekCurrentBlockContents().size());
-  context.inst_block_stack().AddInstId(generic_inst_id);
+      region, context.generic_region_stack().PeekEvalBlock().size());
+  context.generic_region_stack().AddInstToEvalBlock(generic_inst_id);
   return context.constant_values().AddSymbolicConstant(
       {.inst_id = const_inst_id,
        .generic_id = generic_id,
@@ -61,61 +63,50 @@ static auto AddGenericConstantInstToEvalBlock(
 }
 
 namespace {
-// A map from an instruction ID representing a canonical symbolic constant to an
-// instruction within an eval block of the generic that computes the specific
-// value for that constant.
-//
-// We arbitrarily use a small size of 256 bytes for the map.
-// TODO: Determine a better number based on measurements.
-using ConstantsInGenericMap = Map<SemIR::InstId, SemIR::InstId, 256>;
-
 // Substitution callbacks to rebuild a generic constant in the eval block for a
 // generic region.
 class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks {
  public:
   // `context` must not be null.
-  RebuildGenericConstantInEvalBlockCallbacks(
-      Context* context, SemIR::GenericId generic_id,
-      SemIR::GenericInstIndex::Region region, SemIR::LocId loc_id,
-      ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration)
-      : context_(context),
-        generic_id_(generic_id),
-        region_(region),
+  RebuildGenericConstantInEvalBlockCallbacks(Context* context,
+                                             SemIR::LocId loc_id)
+      : SubstInstCallbacks(context),
         loc_id_(loc_id),
-        constants_in_generic_(constants_in_generic),
-        inside_redeclaration_(inside_redeclaration) {}
-
-  auto context() const -> Context& { return *context_; }
+        constants_in_generic_(
+            context->generic_region_stack().PeekConstantsInGenericMap()) {}
+
+  auto RebuildType(SemIR::TypeInstId type_inst_id) const
+      -> SemIR::TypeId override {
+    // When building instructions in the eval block, form attached types.
+    return context().types().GetTypeIdForTypeConstantId(
+        context().constant_values().GetAttached(type_inst_id));
+  }
 
   // Check for instructions for which we already have a mapping into the eval
-  // block, and substitute them for the instructions in the eval block.
+  // block, and substitute them with the instructions in the eval block.
   auto Subst(SemIR::InstId& inst_id) const -> bool override {
-    auto const_id = context_->constant_values().Get(inst_id);
+    auto const_id = context().constant_values().Get(inst_id);
     if (!const_id.has_value()) {
       // An unloaded import ref should never contain anything we need to
       // substitute into. Don't trigger loading it here.
       CARBON_CHECK(
-          context_->insts().Is<SemIR::ImportRefUnloaded>(inst_id),
+          context().insts().Is<SemIR::ImportRefUnloaded>(inst_id),
           "Substituting into instruction with invalid constant ID: {0}",
-          context_->insts().Get(inst_id));
+          context().insts().Get(inst_id));
       return true;
     }
-    if (!context_->constant_values().DependsOnGenericParameter(const_id)) {
+    if (!context().constant_values().DependsOnGenericParameter(const_id)) {
       // This instruction doesn't have a symbolic constant value, so can't
       // contain any bindings that need to be substituted.
       return true;
     }
 
-    // If this instruction is in the map, return the known result.
+    // If this constant value has a defining instruction in the eval block,
+    // replace the instruction in the body of the generic with the one from the
+    // eval block.
     if (auto result = constants_in_generic_.Lookup(
-            context_->constant_values().GetInstId(const_id))) {
-      // In order to reuse instructions from the generic as often as possible,
-      // keep this instruction as-is if it already has the desired symbolic
-      // constant value.
-      if (const_id != context_->constant_values().Get(result.value())) {
-        inst_id = result.value();
-      }
-      CARBON_CHECK(inst_id.has_value());
+            context().constant_values().GetInstId(const_id))) {
+      inst_id = result.value();
       return true;
     }
 
@@ -126,34 +117,24 @@ class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks {
   // constant.
   auto Rebuild(SemIR::InstId orig_inst_id, SemIR::Inst new_inst) const
       -> SemIR::InstId override {
-    auto& orig_symbolic_const = context_->constant_values().GetSymbolicConstant(
-        context_->constant_values().Get(orig_inst_id));
+    auto& orig_symbolic_const = context().constant_values().GetSymbolicConstant(
+        context().constant_values().Get(orig_inst_id));
     auto const_inst_id = orig_symbolic_const.inst_id;
     auto dependence = orig_symbolic_const.dependence;
 
     // We might already have an instruction in the eval block if a transitive
     // operand of this instruction has the same constant value.
     auto result = constants_in_generic_.Insert(const_inst_id, [&] {
-      if (inside_redeclaration_) {
-        // Adding instructions to a redeclaration causes crashes later since it
-        // causes us to produce invalid indices into the original declaration's
-        // set of instructions. So we terminate now and avoid adding a new
-        // instruction and new index. It should not be possible to create this
-        // situation where a generic redeclaration introduces new instructions
-        // to the eval block.
-        CARBON_FATAL("generic redeclaration differs from previous declaration");
-      }
-
       // TODO: Add a function on `Context` to add the instruction without
       // inserting it into the dependent instructions list or computing a
       // constant value for it.
       // TODO: Is the location we pick here always appropriate for the new
       // instruction?
-      auto inst_id = context_->sem_ir().insts().AddInNoBlock(
+      auto inst_id = context().sem_ir().insts().AddInNoBlock(
           SemIR::LocIdAndInst::UncheckedLoc(loc_id_, new_inst));
       auto const_id = AddGenericConstantInstToEvalBlock(
-          *context_, generic_id_, region_, const_inst_id, inst_id, dependence);
-      context_->constant_values().Set(inst_id, const_id);
+          context(), const_inst_id, inst_id, dependence);
+      context().constant_values().Set(inst_id, const_id);
       return inst_id;
     });
     return result.value();
@@ -161,7 +142,7 @@ class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks {
 
   auto ReuseUnchanged(SemIR::InstId orig_inst_id) const
       -> SemIR::InstId override {
-    auto inst = context_->insts().Get(orig_inst_id);
+    auto inst = context().insts().Get(orig_inst_id);
     CARBON_CHECK(
         inst.Is<SemIR::BindSymbolicName>() ||
             inst.Is<SemIR::SymbolicBindingPattern>(),
@@ -174,12 +155,8 @@ class RebuildGenericConstantInEvalBlockCallbacks : public SubstInstCallbacks {
   }
 
  private:
-  Context* context_;
-  SemIR::GenericId generic_id_;
-  SemIR::GenericInstIndex::Region region_;
   SemIR::LocId loc_id_;
   ConstantsInGenericMap& constants_in_generic_;
-  bool inside_redeclaration_;
 };
 
 // Substitution callbacks to rebuild a template action. This rebuilds the action
@@ -188,14 +165,10 @@ class RebuildTemplateActionInEvalBlockCallbacks final
     : public RebuildGenericConstantInEvalBlockCallbacks {
  public:
   // `context` must not be null.
-  RebuildTemplateActionInEvalBlockCallbacks(
-      Context* context, SemIR::GenericId generic_id,
-      SemIR::GenericInstIndex::Region region, SemIR::LocId loc_id,
-      ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration,
-      SemIR::InstId action_inst_id)
-      : RebuildGenericConstantInEvalBlockCallbacks(context, generic_id, region,
-                                                   loc_id, constants_in_generic,
-                                                   inside_redeclaration),
+  RebuildTemplateActionInEvalBlockCallbacks(Context* context,
+                                            SemIR::LocId loc_id,
+                                            SemIR::InstId action_inst_id)
+      : RebuildGenericConstantInEvalBlockCallbacks(context, loc_id),
         action_inst_id_(action_inst_id) {}
 
   auto Rebuild(SemIR::InstId orig_inst_id, SemIR::Inst new_inst) const
@@ -225,73 +198,67 @@ class RebuildTemplateActionInEvalBlockCallbacks final
 }  // namespace
 
 // Adds instructions to compute the substituted version of `type_id` in each
-// specific into the eval block for the generic, which is the current
-// instruction block. Returns a symbolic type ID that refers to the substituted
-// type in each specific.
-static auto AddGenericTypeToEvalBlock(
-    Context& context, SemIR::GenericId generic_id,
-    SemIR::GenericInstIndex::Region region, SemIR::LocId loc_id,
-    ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration,
-    SemIR::TypeId type_id) -> SemIR::TypeId {
+// specific into the eval block for the current generic region. Returns a
+// symbolic type ID that refers to the substituted type in each specific.
+static auto AddGenericTypeToEvalBlock(Context& context, SemIR::LocId loc_id,
+                                      SemIR::TypeId type_id) -> SemIR::TypeId {
   // Substitute into the type's constant instruction and rebuild it in the eval
   // block.
   auto type_inst_id =
       SubstInst(context, context.types().GetInstId(type_id),
-                RebuildGenericConstantInEvalBlockCallbacks(
-                    &context, generic_id, region, loc_id, constants_in_generic,
-                    inside_redeclaration));
-  return context.types().GetTypeIdForTypeInstId(type_inst_id);
+                RebuildGenericConstantInEvalBlockCallbacks(&context, loc_id));
+  return context.types().GetTypeIdForTypeConstantId(
+      context.constant_values().GetAttached(type_inst_id));
 }
 
 // Adds instructions to compute the substituted value of `inst_id` in each
-// specific into the eval block for the generic, which is the current
-// instruction block. Returns a symbolic constant instruction ID that refers to
-// the substituted constant value in each specific.
-static auto AddGenericConstantToEvalBlock(
-    Context& context, SemIR::GenericId generic_id,
-    SemIR::GenericInstIndex::Region region,
-    ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration,
-    SemIR::InstId inst_id) -> SemIR::ConstantId {
+// specific into the eval block for the current generic region. Returns a
+// symbolic constant instruction ID that refers to the substituted constant
+// value in each specific.
+static auto AddGenericConstantToEvalBlock(Context& context,
+                                          SemIR::InstId inst_id)
+    -> SemIR::ConstantId {
+  CARBON_CHECK(context.constant_values().Get(inst_id).is_symbolic(),
+               "Adding generic constant {0} with non-symbolic value {1}",
+               context.insts().Get(inst_id),
+               context.constant_values().Get(inst_id));
+
   // Substitute into the constant value and rebuild it in the eval block if
   // we've not encountered it before.
   auto const_inst_id = context.constant_values().GetConstantInstId(inst_id);
   auto callbacks = RebuildGenericConstantInEvalBlockCallbacks(
-      &context, generic_id, region, SemIR::LocId(inst_id), constants_in_generic,
-      inside_redeclaration);
+      &context, SemIR::LocId(inst_id));
   auto new_inst_id = SubstInst(context, const_inst_id, callbacks);
   CARBON_CHECK(new_inst_id != const_inst_id,
                "No substitutions performed for generic constant {0}",
                context.insts().Get(inst_id));
-  return context.constant_values().Get(new_inst_id);
+  return context.constant_values().GetAttached(new_inst_id);
 }
 
 // Adds an instruction that performs a template action to the eval block for the
 // generic. The instruction should not yet have been added to any block. The
 // instruction might refer to types and constants that need to be rewritten, so
 // substitute into it first.
-static auto AddTemplateActionToEvalBlock(
-    Context& context, SemIR::GenericId generic_id,
-    SemIR::GenericInstIndex::Region region,
-    ConstantsInGenericMap& constants_in_generic, bool inside_redeclaration,
-    SemIR::InstId inst_id) -> void {
+static auto AddTemplateActionToEvalBlock(Context& context,
+                                         SemIR::InstId inst_id) -> void {
   // Substitute into the constant value and rebuild it in the eval block.
-  auto new_inst_id =
-      SubstInst(context, inst_id,
-                RebuildTemplateActionInEvalBlockCallbacks(
-                    &context, generic_id, region, SemIR::LocId(inst_id),
-                    constants_in_generic, inside_redeclaration, inst_id));
+  auto new_inst_id = SubstInst(context, inst_id,
+                               RebuildTemplateActionInEvalBlockCallbacks(
+                                   &context, SemIR::LocId(inst_id), inst_id));
   CARBON_CHECK(new_inst_id == inst_id,
                "Substitution changed InstId of template action");
-  constants_in_generic.Insert(inst_id, inst_id);
+  context.generic_region_stack().PeekConstantsInGenericMap().Insert(inst_id,
+                                                                    inst_id);
 
   // Add the action to the eval block and point its constant value back to its
   // index within the block.
+  auto [generic_id, region] = GetOrCreatePendingGeneric(context);
   auto& symbolic_constant = context.constant_values().GetSymbolicConstant(
-      context.constant_values().Get(inst_id));
+      context.constant_values().GetAttached(inst_id));
   symbolic_constant.generic_id = generic_id;
   symbolic_constant.index = SemIR::GenericInstIndex(
-      region, context.inst_block_stack().PeekCurrentBlockContents().size());
-  context.inst_block_stack().AddInstId(inst_id);
+      region, context.generic_region_stack().PeekEvalBlock().size());
+  context.generic_region_stack().AddInstToEvalBlock(inst_id);
 }
 
 // Populates a map of constants in a generic from the constants in the
@@ -312,83 +279,69 @@ static auto PopulateConstantsFromDeclaration(
   }
 }
 
-// Builds and returns a block of instructions whose constant values need to be
-// evaluated in order to resolve a generic to a specific.
-static auto MakeGenericEvalBlock(Context& context, SemIR::GenericId generic_id,
-                                 SemIR::GenericInstIndex::Region region,
-                                 bool inside_redeclaration)
-    -> SemIR::InstBlockId {
-  context.inst_block_stack().Push();
-
-  ConstantsInGenericMap constants_in_generic;
+auto AttachDependentInstToCurrentGeneric(Context& context,
+                                         DependentInst dependent_inst) -> void {
+  auto [inst_id, dep_kind] = dependent_inst;
 
-  if (region == SemIR::GenericInstIndex::Region::Definition ||
-      inside_redeclaration) {
-    PopulateConstantsFromDeclaration(context, generic_id, constants_in_generic);
+  // If we don't have a generic region here, leave the dependent instruction
+  // unattached. This happens for out-of-line redeclarations of members of
+  // dependent scopes:
+  //
+  //   class A(T:! type) {
+  //     fn F();
+  //   }
+  //   // Has generic type and constant value, but no generic region.
+  //   fn A(T:! type).F() {}
+  //
+  // TODO: Copy the attached type and constant value from the previous
+  // declaration in this case instead of attempting to attach the new
+  // declaration to a generic region that we're no longer within.
+  if (context.generic_region_stack().Empty()) {
+    // This should only happen for `*Decl` instructions, never for template
+    // actions.
+    CARBON_CHECK((dep_kind & DependentInst::Template) == DependentInst::None);
+    return;
   }
 
-  // The work done in this loop might invalidate iterators into the generic
-  // region stack, but shouldn't add new dependent instructions to the current
-  // region.
-  auto num_dependent_insts =
-      context.generic_region_stack().PeekDependentInsts().size();
-  for (auto i : llvm::seq(num_dependent_insts)) {
-    auto [inst_id, dep_kind] =
-        context.generic_region_stack().PeekDependentInsts()[i];
-
-    // If the type is symbolic, replace it with a type specific to this generic.
-    if ((dep_kind & GenericRegionStack::DependencyKind::SymbolicType) !=
-        GenericRegionStack::DependencyKind::None) {
-      auto inst = context.insts().Get(inst_id);
-      auto type_id = AddGenericTypeToEvalBlock(
-          context, generic_id, region, SemIR::LocId(inst_id),
-          constants_in_generic, inside_redeclaration, inst.type_id());
-      // If the generic declaration is invalid, it can result in an error.
-      if (type_id == SemIR::ErrorInst::TypeId) {
-        break;
-      }
-      // TODO: Eventually, completeness requirements should be modeled as
-      // constraints on the generic rather than properties of the type. For now,
-      // require the transformed type to be complete if the original was.
-      if (context.types().IsComplete(inst.type_id())) {
-        CompleteTypeOrCheckFail(context, type_id);
-      }
-      inst.SetType(type_id);
-      context.sem_ir().insts().Set(inst_id, inst);
+  context.generic_region_stack().AddDependentInst(dependent_inst.inst_id);
+
+  // If the type is symbolic, replace it with a type specific to this generic.
+  if ((dep_kind & DependentInst::SymbolicType) != DependentInst::None) {
+    auto inst = context.insts().Get(inst_id);
+    auto type_id = AddGenericTypeToEvalBlock(context, SemIR::LocId(inst_id),
+                                             inst.type_id());
+    // TODO: Eventually, completeness requirements should be modeled as
+    // constraints on the generic rather than properties of the type. For now,
+    // require the transformed type to be complete if the original was.
+    if (context.types().IsComplete(inst.type_id())) {
+      CompleteTypeOrCheckFail(context, type_id);
     }
+    inst.SetType(type_id);
+    context.sem_ir().insts().Set(inst_id, inst);
+  }
 
-    // If the instruction has a symbolic constant value, then make a note that
-    // we'll need to evaluate this instruction when forming the specific. Update
-    // the constant value of the instruction to refer to the result of that
-    // eventual evaluation.
-    if ((dep_kind & GenericRegionStack::DependencyKind::SymbolicConstant) !=
-        GenericRegionStack::DependencyKind::None) {
-      // Update the constant value to refer to this generic.
-      context.constant_values().Set(
-          inst_id, AddGenericConstantToEvalBlock(
-                       context, generic_id, region, constants_in_generic,
-                       inside_redeclaration, inst_id));
-    }
+  // If the instruction has a symbolic constant value, then make a note that
+  // we'll need to evaluate this instruction when forming the specific. Update
+  // the constant value of the instruction to refer to the result of that
+  // eventual evaluation.
+  if ((dep_kind & DependentInst::SymbolicConstant) != DependentInst::None) {
+    // Update the constant value to refer to this generic.
+    context.constant_values().Set(
+        inst_id, AddGenericConstantToEvalBlock(context, inst_id));
+  }
 
-    // If the instruction is a template action, add it directly to this position
-    // in the eval block.
-    if ((dep_kind & GenericRegionStack::DependencyKind::Template) !=
-        GenericRegionStack::DependencyKind::None) {
-      AddTemplateActionToEvalBlock(context, generic_id, region,
-                                   constants_in_generic, inside_redeclaration,
-                                   inst_id);
-    }
+  // If the instruction is a template action, add it directly to this position
+  // in the eval block.
+  if ((dep_kind & DependentInst::Template) != DependentInst::None) {
+    AddTemplateActionToEvalBlock(context, inst_id);
   }
+}
 
-  CARBON_CHECK(
-      num_dependent_insts ==
-          context.generic_region_stack().PeekDependentInsts().size(),
-      "Building eval block added new dependent insts, for example {0}",
-      context.insts().Get(context.generic_region_stack()
-                              .PeekDependentInsts()[num_dependent_insts]
-                              .inst_id));
-
-  return context.inst_block_stack().Pop();
+// Builds and returns a block of instructions whose constant values need to be
+// evaluated in order to resolve a generic to a specific.
+static auto MakeGenericEvalBlock(Context& context) -> SemIR::InstBlockId {
+  return context.inst_blocks().Add(
+      context.generic_region_stack().PeekEvalBlock());
 }
 
 // Builds and returns an eval block, given the list of canonical symbolic
@@ -398,37 +351,71 @@ auto RebuildGenericEvalBlock(Context& context, SemIR::GenericId generic_id,
                              SemIR::GenericInstIndex::Region region,
                              llvm::ArrayRef<SemIR::InstId> const_ids)
     -> SemIR::InstBlockId {
-  context.inst_block_stack().Push();
-
-  // We say we are not inside a redeclaration since this function is used for
-  // import and there's no redeclaration there.
-  bool inside_redeclaration = false;
+  context.generic_region_stack().Push(
+      {.generic_id = generic_id, .region = region});
 
-  ConstantsInGenericMap constants_in_generic;
+  auto& constants_in_generic =
+      context.generic_region_stack().PeekConstantsInGenericMap();
 
   // For the definition region, populate constants from the declaration.
-  if (inside_redeclaration ||
-      region == SemIR::GenericInstIndex::Region::Definition) {
+  if (region == SemIR::GenericInstIndex::Definition) {
     PopulateConstantsFromDeclaration(context, generic_id, constants_in_generic);
   }
 
   constants_in_generic.GrowForInsertCount(const_ids.size());
   for (auto [i, inst_id] : llvm::enumerate(const_ids)) {
     // Build a constant in the inst block.
-    AddGenericConstantToEvalBlock(context, generic_id, region,
-                                  constants_in_generic, inside_redeclaration,
-                                  inst_id);
-    CARBON_CHECK(
-        context.inst_block_stack().PeekCurrentBlockContents().size() == i + 1,
-        "Produced {0} instructions when importing {1}",
-        (context.inst_block_stack().PeekCurrentBlockContents().size() - i),
-        context.insts().Get(inst_id));
+    AddGenericConstantToEvalBlock(context, inst_id);
+    CARBON_CHECK(context.generic_region_stack().PeekEvalBlock().size() == i + 1,
+                 "Produced {0} instructions when importing {1}",
+                 (context.generic_region_stack().PeekEvalBlock().size() - i),
+                 context.insts().Get(inst_id));
   }
 
-  return context.inst_block_stack().Pop();
+  auto eval_block_id = MakeGenericEvalBlock(context);
+  context.generic_region_stack().Pop();
+  return eval_block_id;
+}
+
+auto StartGenericDecl(Context& context) -> void {
+  context.generic_region_stack().Push(
+      {.generic_id = SemIR::GenericId::None,
+       .region = SemIR::GenericInstIndex::Declaration});
+}
+
+auto StartGenericDefinition(Context& context, SemIR::GenericId generic_id)
+    -> void {
+  // Push a generic region even if we don't have a generic_id. We might still
+  // have locally-introduced generic parameters to track:
+  //
+  // fn F() {
+  //   let T:! type = i32;
+  //   var x: T;
+  // }
+  context.generic_region_stack().Push(
+      {.generic_id = generic_id,
+       .region = SemIR::GenericInstIndex::Definition});
+  if (generic_id.has_value()) {
+    PopulateConstantsFromDeclaration(
+        context, generic_id,
+        context.generic_region_stack().PeekConstantsInGenericMap());
+  }
 }
 
 auto DiscardGenericDecl(Context& context) -> void {
+  // Unattach any types and constant values we might have created in the
+  // generic.
+  // TODO: We should re-evaluate the contents of the eval block in a synthesized
+  // specific to form these values, in order to propagate the values of local
+  // `let :!` bindings.
+  for (auto inst_id : context.generic_region_stack().PeekDependentInsts()) {
+    // Note that `Get` returns an instruction with an unattached type.
+    context.sem_ir().insts().Set(inst_id, context.insts().Get(inst_id));
+    // Note that `Get` returns an unattached constant.
+    context.constant_values().Set(inst_id,
+                                  context.constant_values().Get(inst_id));
+  }
+  // Note that we may leak a GenericId here, if one was allocated.
   context.generic_region_stack().Pop();
 }
 
@@ -437,15 +424,13 @@ auto BuildGeneric(Context& context, SemIR::InstId decl_id) -> SemIR::GenericId {
       context.scope_stack().compile_time_bindings_stack().PeekAllValues();
 
   if (all_bindings.empty()) {
-    CARBON_CHECK(context.generic_region_stack().PeekDependentInsts().empty(),
-                 "Have dependent instruction {0} in declaration {1} but no "
+    CARBON_CHECK(context.generic_region_stack().PeekEvalBlock().empty(),
+                 "Have non-empty eval block {0} in declaration {1} but no "
                  "compile time bindings are in scope.",
-                 context.insts().Get(context.generic_region_stack()
-                                         .PeekDependentInsts()
-                                         .front()
-                                         .inst_id),
+                 context.insts().Get(
+                     context.generic_region_stack().PeekEvalBlock().front()),
                  context.insts().Get(decl_id));
-    context.generic_region_stack().Pop();
+    DiscardGenericDecl(context);
     return SemIR::GenericId::None;
   }
 
@@ -455,10 +440,25 @@ auto BuildGeneric(Context& context, SemIR::InstId decl_id) -> SemIR::GenericId {
   // building this generic.
   auto bindings_id = context.inst_blocks().Add(all_bindings);
 
-  SemIR::GenericId generic_id = context.generics().Add(
-      SemIR::Generic{.decl_id = decl_id,
-                     .bindings_id = bindings_id,
-                     .self_specific_id = SemIR::SpecificId::None});
+  SemIR::Generic generic = {.decl_id = decl_id,
+                            .bindings_id = bindings_id,
+                            .self_specific_id = SemIR::SpecificId::None};
+
+  // Get the generic ID, or allocate one now if we don't have one yet. That
+  // could happen if the eval block is empty.
+  auto generic_id =
+      context.generic_region_stack().PeekPendingGeneric().generic_id;
+  if (!generic_id.has_value()) {
+    CARBON_CHECK(context.generic_region_stack().PeekEvalBlock().empty(),
+                 "Non-empty eval block but didn't yet allocate a GenericId");
+    generic_id = context.generics().Add(generic);
+    context.generic_region_stack().SetPendingGenericId(generic_id);
+  } else {
+    CARBON_CHECK(!context.generics().Get(generic_id).decl_id.has_value(),
+                 "Built generic {0} twice", generic_id);
+    context.generics().Get(generic_id) = generic;
+  }
+
   // MakeSelfSpecificId could cause something to be imported, which would
   // invalidate the return value of `context.generics().Get(generic_id)`.
   auto self_specific_id = MakeSelfSpecificId(context, generic_id);
@@ -471,9 +471,7 @@ auto FinishGenericDecl(Context& context, SemIR::LocId loc_id,
   if (!generic_id.has_value()) {
     return;
   }
-  auto decl_block_id = MakeGenericEvalBlock(
-      context, generic_id, SemIR::GenericInstIndex::Region::Declaration,
-      /*inside_redeclaration=*/false);
+  auto decl_block_id = MakeGenericEvalBlock(context);
   context.generic_region_stack().Pop();
   context.generics().Get(generic_id).decl_block_id = decl_block_id;
 
@@ -490,38 +488,159 @@ auto BuildGenericDecl(Context& context, SemIR::InstId decl_id)
   return generic_id;
 }
 
+// Returns the first difference between the two given eval blocks.
+static auto FirstDifferenceBetweenEvalBlocks(
+    Context& context, llvm::ArrayRef<SemIR::InstId> old_eval_block,
+    llvm::ArrayRef<SemIR::InstId> new_eval_block)
+    -> std::pair<SemIR::InstId, SemIR::InstId> {
+  // Check each element of the eval block computes the same unattached constant.
+  for (auto [old_inst_id, new_inst_id] :
+       llvm::zip(old_eval_block, new_eval_block)) {
+    auto old_const_id = context.constant_values().Get(old_inst_id);
+    auto new_const_id = context.constant_values().Get(new_inst_id);
+    if (old_const_id != new_const_id) {
+      if (old_const_id.is_symbolic() && new_const_id.is_symbolic() &&
+          context.constant_values().GetDependence(old_const_id) ==
+              SemIR::ConstantDependence::Template &&
+          context.constant_values().GetDependence(new_const_id) ==
+              SemIR::ConstantDependence::Template &&
+          context.insts().Get(old_inst_id).kind() ==
+              context.insts().Get(new_inst_id).kind()) {
+        // TODO: We don't have a good mechanism to compare template constants
+        // because they canonicalize to themselves, so just assume this is OK.
+        continue;
+      }
+
+      // These constant values differ unexpectedly.
+      return {old_inst_id, new_inst_id};
+    }
+  }
+
+  if (old_eval_block.size() < new_eval_block.size()) {
+    return {SemIR::InstId::None, new_eval_block[old_eval_block.size()]};
+  }
+  if (old_eval_block.size() > new_eval_block.size()) {
+    return {old_eval_block[new_eval_block.size()], SemIR::InstId::None};
+  }
+
+  return {SemIR::InstId::None, SemIR::InstId::None};
+}
+
+// If `constant_id` refers to a symbolic constant within the declaration region
+// of `generic_id`, remap it to refer to the constant value of the corresponding
+// element in the given eval block. Otherwise returns the ID unchanged.
+static auto ReattachConstant(Context& context, SemIR::GenericId generic_id,
+                             llvm::ArrayRef<SemIR::InstId> eval_block,
+                             SemIR::ConstantId constant_id)
+    -> SemIR::ConstantId {
+  if (!constant_id.has_value() || !constant_id.is_symbolic()) {
+    return constant_id;
+  }
+
+  auto& symbolic_const =
+      context.constant_values().GetSymbolicConstant(constant_id);
+  if (symbolic_const.generic_id != generic_id) {
+    // Constant doesn't refer into this generic.
+    return constant_id;
+  }
+
+  CARBON_CHECK(
+      symbolic_const.index.region() == SemIR::GenericInstIndex::Declaration,
+      "Definition region of redeclaration should not be referenced");
+  return context.constant_values().GetAttached(
+      eval_block[symbolic_const.index.index()]);
+}
+
+// Same as `ReattachConstant` but for a type.
+static auto ReattachType(Context& context, SemIR::GenericId generic_id,
+                         llvm::ArrayRef<SemIR::InstId> eval_block,
+                         SemIR::TypeId type_id) -> SemIR::TypeId {
+  return context.types().GetTypeIdForTypeConstantId(ReattachConstant(
+      context, generic_id, eval_block, context.types().GetConstantId(type_id)));
+}
+
 auto FinishGenericRedecl(Context& context, SemIR::GenericId generic_id)
     -> void {
   if (!generic_id.has_value()) {
-    context.generic_region_stack().Pop();
+    DiscardGenericDecl(context);
     return;
   }
 
-  auto definition_block_id = MakeGenericEvalBlock(
-      context, generic_id, SemIR::GenericInstIndex::Region::Declaration,
-      /*inside_redeclaration=*/true);
-  CARBON_CHECK(definition_block_id == SemIR::InstBlockId::Empty);
+  // Find the old and new eval blocks.
+  auto old_eval_block_id =
+      context.generics()
+          .Get(generic_id)
+          .GetEvalBlock(SemIR::GenericInstIndex::Declaration);
+  CARBON_CHECK(old_eval_block_id.has_value(),
+               "Old generic is not fully declared");
+
+  auto old_eval_block = context.inst_blocks().Get(old_eval_block_id);
+  auto new_eval_block = context.generic_region_stack().PeekEvalBlock();
+
+  // Check the eval blocks are computing the same constants in the same order.
+  // This should always be the case because we have already verified they have
+  // the same parse tree, and the poisoning rules mean that all entities they
+  // refer to are also the same.
+  //
+  // Note that it's OK if the first difference is that an old instruction has no
+  // corresponding new instruction; we wouldn't have used that anyway. This
+  // happens for `ImplDecl`, for which the witness is included in the eval block
+  // of the first declaration.
+  if (auto [old_inst_id, new_inst_id] = FirstDifferenceBetweenEvalBlocks(
+          context, old_eval_block, new_eval_block);
+      new_inst_id.has_value()) {
+    // This shouldn't be possible: we should have already checked that the
+    // syntax of the redeclaration matches the prior declaration, and none of
+    // the name lookups or semantic checks should be allowed to differ between
+    // the two declarations, so we should have built the same eval block as in
+    // the prior declaration.
+    //
+    // However, that isn't a strong enough invariant that it seems appropriate
+    // to CHECK-fail here, so we produce a diagnostic with context.TODO()
+    // instead.
+    //
+    // TODO: Add something like context.UNEXPECTED() instead of using
+    // context.TODO() here because there's not really anything to do.
+    context.TODO(new_inst_id,
+                 "generic redeclaration differs from previous declaration");
+    if (old_inst_id.has_value()) {
+      context.TODO(old_inst_id, "instruction in previous declaration");
+    }
+    DiscardGenericDecl(context);
+    return;
+  }
 
+  auto redecl_generic_id =
+      context.generic_region_stack().PeekPendingGeneric().generic_id;
+
+  // Reattach any instructions that depend on the redeclaration to instead refer
+  // to the original.
+  for (auto inst_id : context.generic_region_stack().PeekDependentInsts()) {
+    // Reattach the type.
+    auto inst = context.insts().GetWithAttachedType(inst_id);
+    inst.SetType(ReattachType(context, redecl_generic_id, old_eval_block,
+                              inst.type_id()));
+    context.sem_ir().insts().Set(inst_id, inst);
+
+    // Reattach the constant value.
+    context.constant_values().Set(
+        inst_id,
+        ReattachConstant(context, redecl_generic_id, old_eval_block,
+                         context.constant_values().GetAttached(inst_id)));
+  }
   context.generic_region_stack().Pop();
 }
 
 auto FinishGenericDefinition(Context& context, SemIR::GenericId generic_id)
     -> void {
   if (!generic_id.has_value()) {
-    // TODO: We can have symbolic constants in a context that had a non-generic
-    // declaration, for example if there's a local generic let binding in a
-    // function definition. Handle this case somehow -- perhaps by forming
-    // substituted constant values now.
-    context.generic_region_stack().Pop();
+    DiscardGenericDecl(context);
     return;
   }
 
-  auto definition_block_id = MakeGenericEvalBlock(
-      context, generic_id, SemIR::GenericInstIndex::Region::Definition,
-      /*inside_redeclaration=*/false);
-  context.generics().Get(generic_id).definition_block_id = definition_block_id;
-
+  auto definition_block_id = MakeGenericEvalBlock(context);
   context.generic_region_stack().Pop();
+  context.generics().Get(generic_id).definition_block_id = definition_block_id;
 }
 
 auto ResolveSpecificDeclaration(Context& context, SemIR::LocId loc_id,
@@ -602,9 +721,8 @@ auto ResolveSpecificDefinition(Context& context, SemIR::LocId loc_id,
       // The generic is not defined yet.
       return false;
     }
-    auto definition_block_id =
-        TryEvalBlockForSpecific(context, loc_id, specific_id,
-                                SemIR::GenericInstIndex::Region::Definition);
+    auto definition_block_id = TryEvalBlockForSpecific(
+        context, loc_id, specific_id, SemIR::GenericInstIndex::Definition);
     // Note that TryEvalBlockForSpecific may reallocate the list of specifics,
     // so re-lookup the specific here.
     context.specifics().Get(specific_id).definition_block_id =

+ 28 - 1
toolchain/check/generic.h

@@ -5,17 +5,44 @@
 #ifndef CARBON_TOOLCHAIN_CHECK_GENERIC_H_
 #define CARBON_TOOLCHAIN_CHECK_GENERIC_H_
 
+#include "llvm/ADT/BitmaskEnum.h"
 #include "toolchain/check/context.h"
 #include "toolchain/sem_ir/entity_with_params_base.h"
 #include "toolchain/sem_ir/ids.h"
 
 namespace Carbon::Check {
 
+LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
+
 // Start processing a declaration or definition that might be a generic entity.
 auto StartGenericDecl(Context& context) -> void;
 
 // Start processing a declaration or definition that might be a generic entity.
-auto StartGenericDefinition(Context& context) -> void;
+auto StartGenericDefinition(Context& context, SemIR::GenericId generic_id)
+    -> void;
+
+// An instruction that depends on a generic parameter in some way.
+struct DependentInst {
+  // Ways in which an instruction can depend on a generic parameter.
+  enum Kind : int8_t {
+    None = 0x0,
+    // The type of the instruction depends on a checked generic parameter.
+    SymbolicType = 0x1,
+    // The constant value of the instruction depends on a checked generic
+    // parameter.
+    SymbolicConstant = 0x2,
+    Template = 0x4,
+    LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Template)
+  };
+
+  SemIR::InstId inst_id;
+  Kind kind;
+};
+
+// Attach a dependent instruction to the current generic, updating its type and
+// constant value as necessary.
+auto AttachDependentInstToCurrentGeneric(Context& context,
+                                         DependentInst dependent_inst) -> void;
 
 // Discard the information about the current generic entity. This should be
 // called instead of `FinishGenericDecl` if the corresponding `Generic` object

+ 10 - 23
toolchain/check/generic_region_stack.cpp

@@ -6,31 +6,18 @@
 
 namespace Carbon::Check {
 
-auto GenericRegionStack::Push() -> void { dependent_insts_stack_.PushArray(); }
-
-auto GenericRegionStack::Pop() -> void { dependent_insts_stack_.PopArray(); }
-
-auto GenericRegionStack::AddDependentInst(DependentInst inst) -> void {
-  if (dependent_insts_stack_.empty()) {
-    // If we don't have a generic region here, leave the dependent instruction
-    // unattached. This happens for out-of-line redeclarations of members of
-    // dependent scopes:
-    //
-    //   class A(T:! type) {
-    //     fn F();
-    //   }
-    //   // Has generic type and constant value, but no generic region.
-    //   fn A(T:! type).F() {}
-    //
-    // TODO: Use a different instruction kind for out-of-line definitions and
-    // CHECK this doesn't happen.
-    return;
-  }
-  dependent_insts_stack_.AppendToTop(inst);
+auto GenericRegionStack::Push(PendingGeneric generic) -> void {
+  pending_generic_ids_.push_back(generic);
+  pending_eval_block_stack_.PushArray();
+  dependent_inst_stack_.PushArray();
+  constants_in_generic_stack_.emplace_back();
 }
 
-auto GenericRegionStack::PeekDependentInsts() -> llvm::ArrayRef<DependentInst> {
-  return dependent_insts_stack_.PeekArray();
+auto GenericRegionStack::Pop() -> void {
+  pending_generic_ids_.pop_back();
+  pending_eval_block_stack_.PopArray();
+  dependent_inst_stack_.PopArray();
+  constants_in_generic_stack_.pop_back();
 }
 
 }  // namespace Carbon::Check

+ 80 - 29
toolchain/check/generic_region_stack.h

@@ -6,20 +6,24 @@
 #define CARBON_TOOLCHAIN_CHECK_GENERIC_REGION_STACK_H_
 
 #include "common/array_stack.h"
-#include "llvm/ADT/BitmaskEnum.h"
+#include "common/map.h"
 #include "toolchain/sem_ir/ids.h"
 
 namespace Carbon::Check {
 
-LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
+// A map from an instruction ID representing a canonical symbolic constant to an
+// instruction within an eval block of the generic that computes the specific
+// value for that constant.
+//
+// We arbitrarily use a small size of 256 bytes for the map.
+// TODO: Determine a better number based on measurements.
+using ConstantsInGenericMap = Map<SemIR::InstId, SemIR::InstId, 256>;
 
 // A stack of enclosing regions that might be declaring or defining a generic
 // entity. In such a region, we track the generic constructs that are used, such
 // as symbolic constants and types, and instructions that depend on a template
 // parameter.
 //
-// TODO: For now we're just tracking symbolic constants.
-//
 // We split a generic into two regions -- declaration and definition -- because
 // these are in general introduced separately, and substituted into separately.
 // For example, for `class C(T:! type, N:! T) { var x: T; }`, a use such as
@@ -27,47 +31,94 @@ LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
 // `var x: C(i32, 0) = {.x = 0};` also substitutes into the definition.
 class GenericRegionStack {
  public:
-  // Ways in which an instruction can depend on a generic parameter.
-  enum class DependencyKind : int8_t {
-    None = 0x0,
-    // The type of the instruction depends on a checked generic parameter.
-    SymbolicType = 0x1,
-    // The constant value of the instruction depends on a checked generic
-    // parameter.
-    SymbolicConstant = 0x2,
-    Template = 0x4,
-    LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/Template)
-  };
+  GenericRegionStack() {
+    // Reserve a large enough stack that we typically won't need to reallocate.
+    constants_in_generic_stack_.reserve(4);
+  }
 
-  // An instruction that depends on a generic parameter in some way.
-  struct DependentInst {
-    SemIR::InstId inst_id;
-    DependencyKind kind;
+  struct PendingGeneric {
+    // The generic ID. May not have a value if no ID has been assigned yet.
+    SemIR::GenericId generic_id;
+    // The region of the generic that is being processed.
+    SemIR::GenericInstIndex::Region region;
   };
 
   // Pushes a region that might be declaring or defining a generic.
-  auto Push() -> void;
+  auto Push(PendingGeneric generic) -> void;
 
   // Pops a generic region.
   auto Pop() -> void;
 
-  // Adds an instruction to the list of instructions in the current region that
-  // in some way depend on a generic parameter.
-  auto AddDependentInst(DependentInst inst) -> void;
+  // Returns whether the stack is empty.
+  auto Empty() const -> bool { return pending_generic_ids_.empty(); }
+
+  // Sets the GenericId for the currently pending generic, once one has been
+  // allocated.
+  auto SetPendingGenericId(SemIR::GenericId generic_id) -> void {
+    CARBON_CHECK(!pending_generic_ids_.back().generic_id.has_value(),
+                 "Already have a GenericId for the pending generic");
+    pending_generic_ids_.back().generic_id = generic_id;
+  }
+
+  // Adds an instruction to the list of instructions whose type or value depends
+  // on something in the current pending generic.
+  auto AddDependentInst(SemIR::InstId inst_id) -> void {
+    CARBON_CHECK(!Empty());
+    dependent_inst_stack_.AppendToTop(inst_id);
+  }
+
+  // Adds an instruction to the eval block for the current pending generic.
+  auto AddInstToEvalBlock(SemIR::InstId inst_id) -> void {
+    CARBON_CHECK(!Empty());
+    pending_eval_block_stack_.AppendToTop(inst_id);
+  }
+
+  // Returns the current pending generic.
+  auto PeekPendingGeneric() const -> PendingGeneric {
+    CARBON_CHECK(!Empty());
+    return pending_generic_ids_.back();
+  }
 
   // Returns the list of dependent instructions in the current generic region.
-  auto PeekDependentInsts() -> llvm::ArrayRef<DependentInst>;
+  auto PeekDependentInsts() -> llvm::ArrayRef<SemIR::InstId> {
+    CARBON_CHECK(!Empty());
+    return dependent_inst_stack_.PeekArray();
+  }
+
+  // Returns the contents of the eval block for the current generic region.
+  auto PeekEvalBlock() -> llvm::ArrayRef<SemIR::InstId> {
+    CARBON_CHECK(!Empty());
+    return pending_eval_block_stack_.PeekArray();
+  }
+
+  // Returns the mapping from abstract constant instructions to eval block
+  // instructions for the current generic.
+  auto PeekConstantsInGenericMap() -> ConstantsInGenericMap& {
+    CARBON_CHECK(!Empty());
+    return constants_in_generic_stack_.back();
+  }
 
   // Runs verification that the processing cleanly finished.
   auto VerifyOnFinish() const -> void {
-    CARBON_CHECK(dependent_insts_stack_.empty(),
-                 "generic_region_stack still has {0} entries",
-                 dependent_insts_stack_.all_values_size());
+    CARBON_CHECK(pending_generic_ids_.empty(),
+                 "pending_generic_ids_ still has {0} entries",
+                 pending_generic_ids_.size());
   }
 
  private:
-  // A stack of symbolic constants for enclosing generic regions.
-  ArrayStack<DependentInst> dependent_insts_stack_;
+  // The IDs of pending generics.
+  llvm::SmallVector<PendingGeneric> pending_generic_ids_;
+
+  // Contents of eval blocks for pending generics.
+  ArrayStack<SemIR::InstId> pending_eval_block_stack_;
+
+  // Instructions that depend on the current generic.
+  ArrayStack<SemIR::InstId> dependent_inst_stack_;
+
+  // Mapping from constant InstIds to the corresponding InstIds in the eval
+  // blocks for each enclosing generic. We reserve this to a suitable size in
+  // the constructor.
+  llvm::SmallVector<ConstantsInGenericMap, 0> constants_in_generic_stack_;
 };
 
 }  // namespace Carbon::Check

+ 1 - 1
toolchain/check/handle_choice.cpp

@@ -118,7 +118,7 @@ auto HandleParseNode(Context& context, Parse::ChoiceDefinitionStartId node_id)
   //  that here. Either remove the need for a token or find a token (a new
   //  introducer?) for the alternative to name.
   context.decl_introducer_state_stack().Push<Lex::TokenKind::Choice>();
-  StartGenericDefinition(context);
+  StartGenericDefinition(context, class_info.generic_id);
 
   context.name_scopes().AddRequiredName(
       class_info.scope_id, SemIR::NameId::SelfType,

+ 1 - 1
toolchain/check/handle_class.cpp

@@ -281,7 +281,7 @@ auto HandleParseNode(Context& context, Parse::ClassDefinitionStartId node_id)
   context.scope_stack().PushForEntity(
       class_decl_id, class_info.scope_id,
       context.generics().GetSelfSpecific(class_info.generic_id));
-  StartGenericDefinition(context);
+  StartGenericDefinition(context, class_info.generic_id);
 
   context.inst_block_stack().Push();
   context.node_stack().Push(node_id, class_id);

+ 2 - 2
toolchain/check/handle_function.cpp

@@ -623,7 +623,7 @@ static auto HandleFunctionDefinitionAfterSignature(
   context.scope_stack().PushForFunctionBody(decl_id);
   context.inst_block_stack().Push();
   context.region_stack().PushRegion(context.inst_block_stack().PeekOrAdd());
-  StartGenericDefinition(context);
+  StartGenericDefinition(context, function.generic_id);
 
   CheckFunctionDefinitionSignature(context, function);
 
@@ -770,7 +770,7 @@ auto HandleParseNode(Context& context,
     if (IsValidBuiltinDeclaration(context, function, builtin_kind)) {
       function.builtin_function_kind = builtin_kind;
       // Build an empty generic definition if this is a generic builtin.
-      StartGenericDefinition(context);
+      StartGenericDefinition(context, function.generic_id);
       FinishGenericDefinition(context, function.generic_id);
     } else {
       CARBON_DIAGNOSTIC(InvalidBuiltinSignature, Error,

+ 1 - 1
toolchain/check/handle_impl.cpp

@@ -541,7 +541,7 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id)
   context.scope_stack().PushForEntity(
       impl_decl_id, impl_info.scope_id,
       context.generics().GetSelfSpecific(impl_info.generic_id));
-  StartGenericDefinition(context);
+  StartGenericDefinition(context, impl_info.generic_id);
   ImplWitnessStartDefinition(context, impl_info);
   context.inst_block_stack().Push();
   context.node_stack().Push(node_id, impl_id);

+ 1 - 1
toolchain/check/handle_interface.cpp

@@ -164,7 +164,7 @@ auto HandleParseNode(Context& context,
   auto self_specific_id =
       context.generics().GetSelfSpecific(interface_info.generic_id);
 
-  StartGenericDefinition(context);
+  StartGenericDefinition(context, interface_info.generic_id);
 
   context.inst_block_stack().Push();
   context.node_stack().Push(node_id, interface_id);

+ 7 - 5
toolchain/check/handle_let_and_var.cpp

@@ -43,12 +43,12 @@ static auto StartAssociatedConstant(Context& context) -> void {
 // called at the `=` or the `;` of the declaration, whichever comes first.
 static auto EndAssociatedConstantDeclRegion(Context& context,
                                             SemIR::InterfaceId interface_id)
-    -> void {
+    -> SemIR::GenericId {
   // TODO: Stop special-casing tuple patterns once they behave like other
   // patterns.
   if (context.node_stack().PeekIs(Parse::NodeKind::TuplePattern)) {
     DiscardGenericDecl(context);
-    return;
+    return SemIR::GenericId::None;
   }
 
   // Peek the pattern. For a valid associated constant, the corresponding
@@ -60,7 +60,7 @@ static auto EndAssociatedConstantDeclRegion(Context& context,
     // The pattern wasn't suitable for an associated constant. We'll detect
     // and diagnose this later. For now, just clean up the generic stack.
     DiscardGenericDecl(context);
-    return;
+    return SemIR::GenericId::None;
   }
 
   // Finish the declaration region of this generic.
@@ -80,6 +80,7 @@ static auto EndAssociatedConstantDeclRegion(Context& context,
                          .modifier_set.GetAccessKind();
   context.decl_name_stack().AddNameOrDiagnose(name_context, assoc_id,
                                               access_kind);
+  return assoc_const.generic_id;
 }
 
 template <Lex::TokenKind::RawEnumType Kind>
@@ -206,10 +207,11 @@ auto HandleParseNode(Context& context, Parse::LetInitializerId node_id)
     -> bool {
   if (auto interface_decl =
           context.scope_stack().GetCurrentScopeAs<SemIR::InterfaceDecl>()) {
-    EndAssociatedConstantDeclRegion(context, interface_decl->interface_id);
+    auto generic_id =
+        EndAssociatedConstantDeclRegion(context, interface_decl->interface_id);
 
     // Start building the definition region of the constant.
-    StartGenericDefinition(context);
+    StartGenericDefinition(context, generic_id);
   }
 
   return HandleInitializer(context, node_id);

+ 42 - 41
toolchain/check/import_ref.cpp

@@ -462,7 +462,8 @@ class ImportRefResolver : public ImportContext {
         work_stack_.pop_back();
       }
     }
-    auto constant_id = local_constant_values_for_import_insts().Get(inst_id);
+    auto constant_id =
+        local_constant_values_for_import_insts().GetAttached(inst_id);
     CARBON_CHECK(constant_id.has_value());
     return constant_id;
   }
@@ -515,7 +516,8 @@ class ImportRefResolver : public ImportContext {
   // Returns the ConstantId for an InstId. Adds unresolved constants to
   // work_stack_.
   auto GetLocalConstantValueOrPush(SemIR::InstId inst_id) -> SemIR::ConstantId {
-    auto const_id = local_constant_values_for_import_insts().Get(inst_id);
+    auto const_id =
+        local_constant_values_for_import_insts().GetAttached(inst_id);
     if (!const_id.has_value()) {
       work_stack_.push_back({.inst_id = inst_id});
     }
@@ -551,7 +553,7 @@ class ImportRefResolver : public ImportContext {
     ResolvedConstId result;
 
     if (auto existing_const_id =
-            local_constant_values_for_import_insts().Get(inst_id);
+            local_constant_values_for_import_insts().GetAttached(inst_id);
         existing_const_id.has_value()) {
       result.const_id = existing_const_id;
       return result;
@@ -589,7 +591,7 @@ class ImportRefResolver : public ImportContext {
 
       if (auto const_id = local_context()
                               .import_ir_constant_values()[cursor_ir_id.index]
-                              .Get(cursor_inst_id);
+                              .GetAttached(cursor_inst_id);
           const_id.has_value()) {
         SetResolvedConstId(inst_id, result.indirect_insts, const_id);
         result.const_id = const_id;
@@ -755,7 +757,7 @@ static auto GetLocalConstantIdChecked(ImportContext& context,
                                       SemIR::InstId inst_id)
     -> SemIR::ConstantId {
   auto result_id =
-      context.local_constant_values_for_import_insts().Get(inst_id);
+      context.local_constant_values_for_import_insts().GetAttached(inst_id);
   CARBON_CHECK(result_id.has_value());
   return result_id;
 }
@@ -1055,11 +1057,11 @@ static auto LoadLocalPatternConstantIds(ImportRefResolver& resolver,
   const auto& param_patterns =
       resolver.import_inst_blocks().Get(param_patterns_id);
   for (auto pattern_id : param_patterns) {
-    auto pattern_inst = resolver.import_insts().Get(pattern_id);
+    auto pattern_inst = resolver.import_insts().GetWithAttachedType(pattern_id);
     GetLocalConstantId(resolver, pattern_inst.type_id());
     if (auto addr = pattern_inst.TryAs<SemIR::AddrPattern>()) {
       pattern_id = addr->inner_id;
-      pattern_inst = resolver.import_insts().Get(pattern_id);
+      pattern_inst = resolver.import_insts().GetWithAttachedType(pattern_id);
       GetLocalConstantId(resolver, pattern_inst.type_id());
     }
     // If the parameter is a symbolic binding, build the
@@ -1098,27 +1100,27 @@ static auto GetLocalParamPatternsId(ImportContext& context,
   const auto& param_patterns =
       context.import_inst_blocks().Get(param_patterns_id);
   llvm::SmallVector<SemIR::InstId> new_patterns;
-  for (auto param_id : param_patterns) {
+  for (auto inst_id : param_patterns) {
     // Figure out the pattern structure. This echoes
     // Function::GetParamPatternInfoFromPatternId.
-    auto addr_pattern_id = param_id;
-    auto addr_inst =
-        context.import_insts().TryGetAs<SemIR::AddrPattern>(addr_pattern_id);
-    auto param_pattern_id = addr_pattern_id;
+    auto inst = context.import_insts().GetWithAttachedType(inst_id);
+
+    auto addr_pattern_id = inst_id;
+    auto addr_inst = inst.TryAs<SemIR::AddrPattern>();
     if (addr_inst) {
-      param_pattern_id = addr_inst->inner_id;
+      inst_id = addr_inst->inner_id;
+      inst = context.import_insts().GetWithAttachedType(inst_id);
     }
 
-    auto param_pattern =
-        context.import_insts().TryGetAs<SemIR::ValueParamPattern>(
-            param_pattern_id);
-    auto binding_id = addr_pattern_id;
+    auto param_pattern_id = inst_id;
+    auto param_pattern = inst.TryAs<SemIR::ValueParamPattern>();
     if (param_pattern) {
-      binding_id = param_pattern->subpattern_id;
+      inst_id = param_pattern->subpattern_id;
+      inst = context.import_insts().GetWithAttachedType(inst_id);
     }
 
-    auto binding =
-        context.import_insts().GetAs<SemIR::AnyBindingPattern>(binding_id);
+    auto binding_id = inst_id;
+    auto binding = inst.As<SemIR::AnyBindingPattern>();
 
     // Rebuild the pattern.
     auto entity_name =
@@ -1179,19 +1181,16 @@ static auto GetLocalParamPatternsId(ImportContext& context,
 // Returns a version of import_return_slot_pattern_id localized to the current
 // IR.
 static auto GetLocalReturnSlotPatternId(
-    ImportContext& context, SemIR::InstId import_return_slot_pattern_id)
-    -> SemIR::InstId {
+    ImportContext& context, SemIR::InstId import_return_slot_pattern_id,
+    SemIR::ConstantId return_type_const_id) -> SemIR::InstId {
   if (!import_return_slot_pattern_id.has_value()) {
     return SemIR::InstId::None;
   }
 
   auto param_pattern = context.import_insts().GetAs<SemIR::OutParamPattern>(
       import_return_slot_pattern_id);
-  auto return_slot_pattern =
-      context.import_insts().GetAs<SemIR::ReturnSlotPattern>(
-          param_pattern.subpattern_id);
   auto type_id = context.local_context().types().GetTypeIdForTypeConstantId(
-      GetLocalConstantIdChecked(context, return_slot_pattern.type_id));
+      return_type_const_id);
 
   auto new_return_slot_pattern_id = AddImportedInst<SemIR::ReturnSlotPattern>(
       context, param_pattern.subpattern_id,
@@ -1422,7 +1421,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
                                 SemIR::InstId import_inst_id) -> ResolveResult {
   auto adapted_type_const_id = GetLocalConstantId(
       resolver,
-      resolver.import_constant_values().Get(inst.adapted_type_inst_id));
+      resolver.import_constant_values().GetAttached(inst.adapted_type_inst_id));
   if (resolver.HasNewWork()) {
     return ResolveResult::Retry();
   }
@@ -1573,7 +1572,8 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
                                 SemIR::InstId import_inst_id) -> ResolveResult {
   auto type_const_id = GetLocalConstantId(resolver, inst.type_id);
   auto base_type_const_id = GetLocalConstantId(
-      resolver, resolver.import_constant_values().Get(inst.base_type_inst_id));
+      resolver,
+      resolver.import_constant_values().GetAttached(inst.base_type_inst_id));
   if (resolver.HasNewWork()) {
     return ResolveResult::Retry();
   }
@@ -2010,9 +2010,8 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
   auto return_type_const_id = SemIR::ConstantId::None;
   if (import_function.return_slot_pattern_id.has_value()) {
     return_type_const_id = GetLocalConstantId(
-        resolver, resolver.import_insts()
-                      .Get(import_function.return_slot_pattern_id)
-                      .type_id());
+        resolver, resolver.import_insts().GetAttachedType(
+                      import_function.return_slot_pattern_id));
   }
   auto parent_scope_id =
       GetLocalNameScopeId(resolver, import_function.parent_scope_id);
@@ -2036,7 +2035,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
   new_function.param_patterns_id =
       GetLocalParamPatternsId(resolver, import_function.param_patterns_id);
   new_function.return_slot_pattern_id = GetLocalReturnSlotPatternId(
-      resolver, import_function.return_slot_pattern_id);
+      resolver, import_function.return_slot_pattern_id, return_type_const_id);
   SetGenericData(resolver, import_function.generic_id, new_function.generic_id,
                  generic_data);
 
@@ -2207,10 +2206,11 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
   LoadLocalPatternConstantIds(resolver, import_impl.implicit_param_patterns_id);
   auto generic_data = GetLocalGenericData(resolver, import_impl.generic_id);
   auto self_const_id = GetLocalConstantId(
-      resolver, resolver.import_constant_values().Get(import_impl.self_id));
+      resolver,
+      resolver.import_constant_values().GetAttached(import_impl.self_id));
   auto constraint_const_id = GetLocalConstantId(
       resolver,
-      resolver.import_constant_values().Get(import_impl.constraint_id));
+      resolver.import_constant_values().GetAttached(import_impl.constraint_id));
   auto& new_impl = resolver.local_impls().Get(impl_id);
 
   if (resolver.HasNewWork()) {
@@ -3036,7 +3036,7 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver,
 // TODO: Error is returned when support is missing, but that should go away.
 static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id,
                            SemIR::ConstantId const_id) -> ResolveResult {
-  auto inst_const_id = resolver.import_constant_values().Get(inst_id);
+  auto inst_const_id = resolver.import_constant_values().GetAttached(inst_id);
   if (!inst_const_id.has_value() || !inst_const_id.is_symbolic()) {
     return TryResolveInstCanonical(resolver, inst_id, const_id);
   }
@@ -3051,7 +3051,7 @@ static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id,
   if (const_id.has_value()) {
     // For the third phase, extract the constant value that
     // TryResolveInstCanonical produced previously.
-    inner_const_id = resolver.local_constant_values().Get(
+    inner_const_id = resolver.local_constant_values().GetAttached(
         resolver.local_constant_values().GetSymbolicConstant(const_id).inst_id);
   }
 
@@ -3063,8 +3063,8 @@ static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id,
   }
 
   if (!const_id.has_value()) {
-    // Second phase: we have created an abstract constant. Create a
-    // corresponding generic constant.
+    // Second phase: we have created an unattached constant. Create a
+    // corresponding attached constant.
     if (symbolic_const.generic_id.has_value()) {
       result.const_id = resolver.local_constant_values().AddSymbolicConstant(
           {.inst_id =
@@ -3073,8 +3073,8 @@ static auto TryResolveInst(ImportRefResolver& resolver, SemIR::InstId inst_id,
            .index = symbolic_const.index,
            .dependence = symbolic_const.dependence});
       if (result.decl_id.has_value()) {
-        // Overwrite the abstract symbolic constant given initially to the
-        // declaration with its final concrete symbolic value.
+        // Overwrite the unattached symbolic constant given initially to the
+        // declaration with its final attached symbolic value.
         resolver.local_constant_values().Set(result.decl_id, result.const_id);
       }
     }
@@ -3260,7 +3260,8 @@ static auto GetInstForLoad(Context& context,
       context.import_irs().Get(import_ir_inst.ir_id()).sem_ir;
 
   while (true) {
-    auto cursor_inst = cursor_ir->insts().Get(import_ir_inst.inst_id());
+    auto cursor_inst =
+        cursor_ir->insts().GetWithAttachedType(import_ir_inst.inst_id());
 
     auto import_ref = cursor_inst.TryAs<SemIR::ImportRefUnloaded>();
     if (!import_ref) {

+ 20 - 12
toolchain/check/inst.cpp

@@ -7,7 +7,7 @@
 #include "common/vlog.h"
 #include "toolchain/check/context.h"
 #include "toolchain/check/eval.h"
-#include "toolchain/check/generic_region_stack.h"
+#include "toolchain/check/generic.h"
 #include "toolchain/sem_ir/constant.h"
 #include "toolchain/sem_ir/ids.h"
 #include "toolchain/sem_ir/inst_kind.h"
@@ -18,14 +18,13 @@ namespace Carbon::Check {
 // any applicable instruction lists.
 static auto FinishInst(Context& context, SemIR::InstId inst_id,
                        SemIR::Inst inst) -> void {
-  GenericRegionStack::DependencyKind dep_kind =
-      GenericRegionStack::DependencyKind::None;
+  DependentInst::Kind dep_kind = DependentInst::None;
 
   // If the instruction has a symbolic constant type, track that we need to
   // substitute into it.
   if (context.constant_values().DependsOnGenericParameter(
           context.types().GetConstantId(inst.type_id()))) {
-    dep_kind |= GenericRegionStack::DependencyKind::SymbolicType;
+    dep_kind |= DependentInst::SymbolicType;
   }
 
   // If the instruction has a constant value, compute it.
@@ -38,7 +37,7 @@ static auto FinishInst(Context& context, SemIR::InstId inst_id,
     // If the constant value is symbolic, track that we need to substitute into
     // it.
     if (context.constant_values().DependsOnGenericParameter(const_id)) {
-      dep_kind |= GenericRegionStack::DependencyKind::SymbolicConstant;
+      dep_kind |= DependentInst::SymbolicConstant;
     }
   }
 
@@ -49,9 +48,9 @@ static auto FinishInst(Context& context, SemIR::InstId inst_id,
       "Use AddDependentActionInst to add an action instruction");
 
   // Keep track of dependent instructions.
-  if (dep_kind != GenericRegionStack::DependencyKind::None) {
-    context.generic_region_stack().AddDependentInst(
-        {.inst_id = inst_id, .kind = dep_kind});
+  if (dep_kind != DependentInst::None) {
+    AttachDependentInstToCurrentGeneric(context,
+                                        {.inst_id = inst_id, .kind = dep_kind});
   }
 }
 
@@ -86,9 +85,8 @@ auto AddDependentActionInst(Context& context,
   context.constant_values().Set(inst_id, const_id);
 
   // Register the instruction to be added to the eval block.
-  context.generic_region_stack().AddDependentInst(
-      {.inst_id = inst_id,
-       .kind = GenericRegionStack::DependencyKind::Template});
+  AttachDependentInstToCurrentGeneric(
+      context, {.inst_id = inst_id, .kind = DependentInst::Template});
   return inst_id;
 }
 
@@ -232,10 +230,20 @@ auto ReplaceInstBeforeConstantUse(Context& context, SemIR::InstId inst_id,
 
 auto ReplaceInstPreservingConstantValue(Context& context, SemIR::InstId inst_id,
                                         SemIR::Inst inst) -> void {
-  auto old_const_id = context.constant_values().Get(inst_id);
+  // Check that the type didn't change: a change of type will change the
+  // constant value. Replace the type with the attached type.
+  auto old_type_id = context.insts().GetAttachedType(inst_id);
+  CARBON_CHECK(context.types().GetUnattachedType(old_type_id) == inst.type_id(),
+               "Given wrong type for replacement instruction");
+  inst.SetType(old_type_id);
+
+  // Update the instruction.
   context.sem_ir().insts().Set(inst_id, inst);
   CARBON_VLOG_TO(context.vlog_stream(), "ReplaceInst: {0} -> {1}\n", inst_id,
                  inst);
+
+  // Check the constant value didn't change.
+  auto old_const_id = context.constant_values().Get(inst_id);
   auto new_const_id = TryEvalInstUnsafe(context, inst_id, inst);
   CARBON_CHECK(old_const_id == new_const_id);
 }

+ 2 - 3
toolchain/check/member_access.cpp

@@ -616,14 +616,13 @@ static auto GetAssociatedValueImpl(Context& context, SemIR::LocId loc_id,
 
 auto GetAssociatedValue(Context& context, SemIR::LocId loc_id,
                         SemIR::InstId base_id,
-                        SemIR::InstId assoc_entity_inst_id,
+                        SemIR::ConstantId assoc_entity_const_id,
                         SemIR::SpecificInterface interface) -> SemIR::InstId {
   // TODO: This function shares a code with PerformCompoundMemberAccess(),
   // it would be nice to reduce the duplication.
 
   auto value_inst_id =
-      context.constant_values().GetConstantInstId(assoc_entity_inst_id);
-  CARBON_CHECK(value_inst_id.has_value());
+      context.constant_values().GetInstId(assoc_entity_const_id);
   auto assoc_entity =
       context.insts().GetAs<SemIR::AssociatedEntity>(value_inst_id);
   auto decl_id = assoc_entity.decl_id;

+ 1 - 1
toolchain/check/member_access.h

@@ -32,7 +32,7 @@ auto PerformCompoundMemberAccess(
 // facet (given by base_id). Never does instance binding.
 auto GetAssociatedValue(Context& context, SemIR::LocId loc_id,
                         SemIR::InstId base_id,
-                        SemIR::InstId assoc_entity_inst_id,
+                        SemIR::ConstantId assoc_entity_const_id,
                         SemIR::SpecificInterface interface) -> SemIR::InstId;
 
 // Creates SemIR to perform a tuple index with base expression `tuple_inst_id`

+ 13 - 4
toolchain/check/name_lookup.cpp

@@ -13,6 +13,7 @@
 #include "toolchain/check/member_access.h"
 #include "toolchain/check/type_completion.h"
 #include "toolchain/diagnostics/format_providers.h"
+#include "toolchain/sem_ir/generic.h"
 #include "toolchain/sem_ir/name_scope.h"
 
 namespace Carbon::Check {
@@ -113,16 +114,24 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
             non_lexical_result.scope_result.target_inst_id();
         if (auto assoc_type =
                 context.types().TryGetAs<SemIR::AssociatedEntityType>(
-                    context.insts().Get(target_inst_id).type_id())) {
+                    SemIR::GetTypeOfInstInSpecific(
+                        context.sem_ir(), non_lexical_result.specific_id,
+                        target_inst_id))) {
           auto interface_decl =
               context.insts().GetAs<SemIR::InterfaceDecl>(scope.inst_id());
           const auto& interface =
               context.interfaces().Get(interface_decl.interface_id);
           SemIR::InstId result_inst_id = GetAssociatedValue(
-              context, loc_id, interface.self_param_id, target_inst_id,
+              context, loc_id, interface.self_param_id,
+              SemIR::GetConstantValueInSpecific(context.sem_ir(),
+                                                non_lexical_result.specific_id,
+                                                target_inst_id),
               assoc_type->GetSpecificInterface());
-          non_lexical_result.scope_result = SemIR::ScopeLookupResult::MakeFound(
-              result_inst_id, non_lexical_result.scope_result.access_kind());
+          non_lexical_result = {
+              .specific_id = SemIR::SpecificId::None,
+              .scope_result = SemIR::ScopeLookupResult::MakeFound(
+                  result_inst_id,
+                  non_lexical_result.scope_result.access_kind())};
         }
       }
       return non_lexical_result;

+ 16 - 11
toolchain/check/subst.cpp

@@ -14,6 +14,11 @@
 
 namespace Carbon::Check {
 
+auto SubstInstCallbacks::RebuildType(SemIR::TypeInstId type_inst_id) const
+    -> SemIR::TypeId {
+  return context().types().GetTypeIdForTypeInstId(type_inst_id);
+}
+
 namespace {
 
 // Information about an instruction that we are substituting into.
@@ -257,7 +262,8 @@ static auto Rebuild(Context& context, Worklist& worklist, SemIR::InstId inst_id,
   int32_t arg1 = PopOperand(context, worklist, inst.arg1_and_kind());
   int32_t arg0 = PopOperand(context, worklist, inst.arg0_and_kind());
   auto type_id = inst.type_id().has_value()
-                     ? context.types().GetTypeIdForTypeInstId(worklist.Pop())
+                     ? callbacks.RebuildType(
+                           context.types().GetAsTypeInstId(worklist.Pop()))
                      : SemIR::TypeId::None;
   if (type_id == inst.type_id() && arg0 == inst.arg0() && arg1 == inst.arg1()) {
     return callbacks.ReuseUnchanged(inst_id);
@@ -340,12 +346,12 @@ class SubstConstantCallbacks final : public SubstInstCallbacks {
  public:
   // `context` must not be null.
   SubstConstantCallbacks(Context* context, Substitutions substitutions)
-      : context_(context), substitutions_(substitutions) {}
+      : SubstInstCallbacks(context), substitutions_(substitutions) {}
 
   // Applies the given Substitutions to an instruction, in order to replace
   // BindSymbolicName instructions with the value of the binding.
   auto Subst(SemIR::InstId& inst_id) const -> bool override {
-    if (context_->constant_values().Get(inst_id).is_concrete()) {
+    if (context().constant_values().Get(inst_id).is_concrete()) {
       // This instruction is a concrete constant, so can't contain any
       // bindings that need to be substituted.
       return true;
@@ -353,10 +359,10 @@ class SubstConstantCallbacks final : public SubstInstCallbacks {
 
     auto entity_name_id = SemIR::EntityNameId::None;
     if (auto bind =
-            context_->insts().TryGetAs<SemIR::BindSymbolicName>(inst_id)) {
+            context().insts().TryGetAs<SemIR::BindSymbolicName>(inst_id)) {
       entity_name_id = bind->entity_name_id;
     } else if (auto bind =
-                   context_->insts().TryGetAs<SemIR::SymbolicBindingPattern>(
+                   context().insts().TryGetAs<SemIR::SymbolicBindingPattern>(
                        inst_id)) {
       entity_name_id = bind->entity_name_id;
     } else {
@@ -367,10 +373,10 @@ class SubstConstantCallbacks final : public SubstInstCallbacks {
     // TODO: Consider building a hash map for substitutions. We might have a
     // lot of them.
     for (auto [bind_index, replacement_id] : substitutions_) {
-      if (context_->entity_names().Get(entity_name_id).bind_index() ==
+      if (context().entity_names().Get(entity_name_id).bind_index() ==
           bind_index) {
         // This is the binding we're replacing. Perform substitution.
-        inst_id = context_->constant_values().GetInstId(replacement_id);
+        inst_id = context().constant_values().GetInstId(replacement_id);
         return true;
       }
     }
@@ -384,17 +390,16 @@ class SubstConstantCallbacks final : public SubstInstCallbacks {
   auto Rebuild(SemIR::InstId old_inst_id, SemIR::Inst new_inst) const
       -> SemIR::InstId override {
     auto const_id = EvalOrAddInst(
-        *context_,
+        context(),
         SemIR::LocIdAndInst::UncheckedLoc(
-            context_->insts().GetCanonicalLocId(old_inst_id).ToImplicit(),
+            context().insts().GetCanonicalLocId(old_inst_id).ToImplicit(),
             new_inst));
     CARBON_CHECK(const_id.has_value(),
                  "Substitution into constant produced non-constant");
-    return context_->constant_values().GetInstId(const_id);
+    return context().constant_values().GetInstId(const_id);
   }
 
  private:
-  Context* context_;
   Substitutions substitutions_;
 };
 }  // namespace

+ 12 - 0
toolchain/check/subst.h

@@ -14,12 +14,21 @@ namespace Carbon::Check {
 // instruction.
 class SubstInstCallbacks {
  public:
+  explicit SubstInstCallbacks(Context* context) : context_(context) {}
+
+  auto context() const -> Context& { return *context_; }
+
   // Performs any needed substitution into an instruction. The instruction ID
   // should be updated as necessary to represent the new instruction. Returns
   // true if the resulting instruction ID is fully-substituted, or false if
   // substitution may be needed into operands of the instruction.
   virtual auto Subst(SemIR::InstId& inst_id) const -> bool = 0;
 
+  // Rebuilds the type of an instruction from the substituted type instruction.
+  // By default this builds the unattached type described by the given type ID.
+  virtual auto RebuildType(SemIR::TypeInstId type_inst_id) const
+      -> SemIR::TypeId;
+
   // Rebuilds an instruction whose operands were changed by substitution.
   // `orig_inst_id` is the instruction prior to substitution, and `new_inst` is
   // the substituted instruction. Returns the new instruction ID to use to refer
@@ -35,6 +44,9 @@ class SubstInstCallbacks {
       -> SemIR::InstId {
     return orig_inst_id;
   }
+
+ private:
+  Context* context_;
 };
 
 // Performs substitution into `inst_id` and its operands recursively, using

+ 1 - 1
toolchain/check/testdata/alias/fail_control_flow.carbon

@@ -77,7 +77,7 @@ fn F() {
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @B {
-// CHECK:STDOUT:   %C.ref: %C.type = name_ref C, <unexpected>.inst33.loc4_24 [concrete = constants.%C.generic]
+// CHECK:STDOUT:   %C.ref: %C.type = name_ref C, <unexpected>.inst34.loc4_24 [concrete = constants.%C.generic]
 // CHECK:STDOUT:   %true.loc12_20: bool = bool_literal true [concrete = constants.%true]
 // CHECK:STDOUT:   %.loc12: bool = not %true.loc12_20 [concrete = constants.%false]
 // CHECK:STDOUT:   %true.loc12_25: bool = bool_literal true [concrete = constants.%true]

+ 0 - 2
toolchain/check/testdata/choice/generic.carbon

@@ -83,5 +83,3 @@ choice Always(T:! type) {
 // CHECK:STDOUT:   %T.loc11_15.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Always(%T.loc11_15.2) {}
-// CHECK:STDOUT:

+ 0 - 4
toolchain/check/testdata/class/fail_generic_method.carbon

@@ -172,10 +172,6 @@ fn Class(N:! i32).F[self: Self](n: T) {}
 // CHECK:STDOUT:   %pattern_type.loc13_20 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@F.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%N.51e) {
 // CHECK:STDOUT:   %N.loc33_10.2 => constants.%N.51e
 // CHECK:STDOUT: }

+ 2 - 12
toolchain/check/testdata/class/generic/adapt.carbon

@@ -246,8 +246,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %T.loc4_9.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc4_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_9.2 => constants.%i32
 // CHECK:STDOUT:
@@ -303,7 +301,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %Main.import_ref.709: <witness> = import_ref Main//adapt_specific_type, loc10_1, loaded [concrete = constants.%complete_type.c07]
 // CHECK:STDOUT:   %Main.import_ref.feb = import_ref Main//adapt_specific_type, inst42 [no loc], unloaded
 // CHECK:STDOUT:   %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
-// CHECK:STDOUT:   %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete]
+// CHECK:STDOUT:   %.22b: %C.elem.66c = field_decl x, element0 [concrete]
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: file {
@@ -388,8 +386,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %complete_type => constants.%complete_type.c07
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_todo_extend_adapt_specific_type.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -515,8 +511,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %T.loc4_9.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc4_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_9.2 => constants.%i32
 // CHECK:STDOUT:
@@ -620,8 +614,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %T.loc7_9.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc7_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%i32) {
 // CHECK:STDOUT:   %T.loc7_9.2 => constants.%i32
 // CHECK:STDOUT:
@@ -678,7 +670,7 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %Main.import_ref.feb = import_ref Main//extend_adapt_specific_type_library, inst42 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.19d12e.2: type = import_ref Main//extend_adapt_specific_type_library, loc12_21, loaded [concrete = constants.%C.239]
 // CHECK:STDOUT:   %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
-// CHECK:STDOUT:   %.22b: @C.%C.elem (%C.elem.66c) = field_decl x, element0 [concrete]
+// CHECK:STDOUT:   %.22b: %C.elem.66c = field_decl x, element0 [concrete]
 // CHECK:STDOUT:   %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -759,8 +751,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT:   %complete_type => constants.%complete_type.c07
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- adapt_generic_type.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {

+ 1 - 25
toolchain/check/testdata/class/generic/base_is_generic.carbon

@@ -232,8 +232,6 @@ fn H() {
 // CHECK:STDOUT:   %T.loc4_17.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(%T.loc4_17.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Base(constants.%Param) {
 // CHECK:STDOUT:   %T.loc4_17.2 => constants.%Param
 // CHECK:STDOUT:
@@ -297,7 +295,7 @@ fn H() {
 // CHECK:STDOUT:   %Main.import_ref.d24 = import_ref Main//extend_generic_base, loc13_27, unloaded
 // CHECK:STDOUT:   %Main.import_ref.77a301.2: type = import_ref Main//extend_generic_base, loc13_26, loaded [concrete = constants.%Base.7a8]
 // CHECK:STDOUT:   %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
-// CHECK:STDOUT:   %.e66: @Base.%Base.elem (%Base.elem.9af) = field_decl x, element0 [concrete]
+// CHECK:STDOUT:   %.e66: %Base.elem.9af = field_decl x, element0 [concrete]
 // CHECK:STDOUT:   %.be7: %Param.elem = field_decl y, element0 [concrete]
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -393,8 +391,6 @@ fn H() {
 // CHECK:STDOUT:   %complete_type => constants.%complete_type.db3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_todo_extend_symbolic_base.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -692,12 +688,6 @@ fn H() {
 // CHECK:STDOUT:   %G.specific_fn.loc5_24.2 => constants.%G.specific_fn.169
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(%U.loc4_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(@G.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @G(%U) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_9.2 => constants.%T
 // CHECK:STDOUT: }
@@ -710,10 +700,6 @@ fn H() {
 // CHECK:STDOUT:   %G => constants.%G.b504c4.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(@C.%T.loc8_9.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc8_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%i32) {
 // CHECK:STDOUT:   %T.loc8_9.2 => constants.%i32
 // CHECK:STDOUT:
@@ -915,12 +901,6 @@ fn H() {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(@C.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @G(constants.%U) {
 // CHECK:STDOUT:   %U => constants.%U
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -932,10 +912,6 @@ fn H() {
 // CHECK:STDOUT:   %G.specific_fn => constants.%G.specific_fn.169
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(@G.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @G(%U) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%i32) {
 // CHECK:STDOUT:   %T => constants.%i32
 // CHECK:STDOUT:

+ 0 - 6
toolchain/check/testdata/class/generic/basic.carbon

@@ -220,8 +220,6 @@ class Declaration(T:! type);
 // CHECK:STDOUT:   %pattern_type.loc12_34 => constants.%pattern_type.afe
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@GetAddr.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @GetValue(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Class => constants.%Class
@@ -229,10 +227,6 @@ class Declaration(T:! type);
 // CHECK:STDOUT:   %pattern_type.loc17_29 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@GetValue.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Declaration(constants.%T) {
 // CHECK:STDOUT:   %T.loc24_19.2 => constants.%T
 // CHECK:STDOUT: }

+ 0 - 16
toolchain/check/testdata/class/generic/call.carbon

@@ -768,8 +768,6 @@ class Outer(T:! type) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.e86
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(@A.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Outer(constants.%U) {
 // CHECK:STDOUT:   %T.loc2_13.2 => constants.%U
 // CHECK:STDOUT:
@@ -784,8 +782,6 @@ class Outer(T:! type) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.089
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(@B.%U) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Inner(constants.%T, constants.%T) {
 // CHECK:STDOUT:   %U.loc3_15.2 => constants.%T
 // CHECK:STDOUT:
@@ -809,10 +805,6 @@ class Outer(T:! type) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a60
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(@C.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@C.%T, @C.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @D(constants.%T, constants.%U) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Inner.type => constants.%Inner.type.eae
@@ -822,11 +814,3 @@ class Outer(T:! type) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.372
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(@D.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@D.%T, @D.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(%T, %U.loc3_15.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(%T.loc2_13.2) {}
-// CHECK:STDOUT:

+ 0 - 2
toolchain/check/testdata/class/generic/complete_in_conversion.carbon

@@ -258,8 +258,6 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:   %N.loc6_9.2 => constants.%N.51e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(%N.loc6_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @A(constants.%int_0.6a9) {
 // CHECK:STDOUT:   %N.loc6_9.2 => constants.%int_0.6a9
 // CHECK:STDOUT:

+ 0 - 6
toolchain/check/testdata/class/generic/field.carbon

@@ -236,8 +236,6 @@ fn H(U:! type, c: Class(U)) -> U {
 // CHECK:STDOUT:   %complete_type.loc13_1.2 => constants.%complete_type.4339b3.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Class(constants.%i32) {
 // CHECK:STDOUT:   %T.loc11_13.2 => constants.%i32
 // CHECK:STDOUT:
@@ -256,8 +254,6 @@ fn H(U:! type, c: Class(U)) -> U {
 // CHECK:STDOUT:   %pattern_type.loc19_29 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@G.%T.loc19_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Class(constants.%U) {
 // CHECK:STDOUT:   %T.loc11_13.2 => constants.%U
 // CHECK:STDOUT:
@@ -276,5 +272,3 @@ fn H(U:! type, c: Class(U)) -> U {
 // CHECK:STDOUT:   %pattern_type.loc23_29 => constants.%pattern_type.7dcd0a.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@H.%U.loc23_6.2) {}
-// CHECK:STDOUT:

+ 1 - 11
toolchain/check/testdata/class/generic/import.carbon

@@ -246,8 +246,6 @@ class Class(U:! type) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @CompleteClass(%T.loc6_21.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
 // CHECK:STDOUT:   %T.loc6_21.2 => constants.%i32
 // CHECK:STDOUT: }
@@ -423,8 +421,6 @@ class Class(U:! type) {
 // CHECK:STDOUT:   %T.1 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.1) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CompleteClass(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:
@@ -435,8 +431,6 @@ class Class(U:! type) {
 // CHECK:STDOUT:   %F => constants.%F.874
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @CompleteClass(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
@@ -496,7 +490,7 @@ class Class(U:! type) {
 // CHECK:STDOUT:   %Main.import_ref.e76: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = import_ref Main//foo, loc7_8, loaded [concrete = %.364]
 // CHECK:STDOUT:   %Main.import_ref.a52: @CompleteClass.%F.type (%F.type.14f) = import_ref Main//foo, loc8_17, loaded [symbolic = @CompleteClass.%F (constants.%F.874)]
 // CHECK:STDOUT:   %Main.import_ref.5ab3ec.2: type = import_ref Main//foo, loc6_21, loaded [symbolic = @CompleteClass.%T (constants.%T)]
-// CHECK:STDOUT:   %.364: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem.28a) = field_decl n, element0 [concrete]
+// CHECK:STDOUT:   %.364: %CompleteClass.elem.28a = field_decl n, element0 [concrete]
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: file {
@@ -620,8 +614,6 @@ class Class(U:! type) {
 // CHECK:STDOUT:   %F => constants.%F.874
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @CompleteClass(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @CompleteClass(constants.%i32) {
@@ -765,8 +757,6 @@ class Class(U:! type) {
 // CHECK:STDOUT:   %F => constants.%F.874
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @CompleteClass(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @CompleteClass(constants.%ptr.9e1) {

+ 0 - 6
toolchain/check/testdata/class/generic/init.carbon

@@ -234,15 +234,11 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 {
 // CHECK:STDOUT:   %complete_type.loc6_1.2 => constants.%complete_type.b9e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @InitFromStructGeneric(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_26.2 => constants.%T
 // CHECK:STDOUT:   %pattern_type.loc8 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@InitFromStructGeneric.%T.loc8_26.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Class(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%i32
 // CHECK:STDOUT:
@@ -409,8 +405,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Adapt(@InitFromAdaptedGeneric.%T.loc8_27.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Adapt(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%i32
 // CHECK:STDOUT:

+ 16 - 61
toolchain/check/testdata/class/generic/member_access.carbon

@@ -30,7 +30,7 @@ fn AddrMethodCall(p: Class(i32)*) -> i32 {
   return *p->GetAddr();
 }
 
-// --- fail_todo_static_member_fn_call.carbon
+// --- static_member_fn_call.carbon
 
 library "[[@TEST_NAME]]";
 
@@ -39,13 +39,6 @@ class Class(T:! type) {
 }
 
 fn StaticMemberFunctionCall(T:! type) -> Class(T) {
-  // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+7]]:3: error: cannot implicitly convert expression of type `Class(T)` to `Class(T)` [ConversionFailure]
-  // CHECK:STDERR:   return Class(T).Make();
-  // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+4]]:3: note: type `Class(T)` does not implement interface `Core.ImplicitAs(Class(T))` [MissingImplInMemberAccessNote]
-  // CHECK:STDERR:   return Class(T).Make();
-  // CHECK:STDERR:   ^~~~~~~~~~~~~~~~~~~~~~~
-  // CHECK:STDERR:
   return Class(T).Make();
 }
 
@@ -364,8 +357,6 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %pattern_type.loc5_24 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@Get.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @GetAddr(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Class => constants.%Class.fe1
@@ -375,10 +366,6 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %pattern_type.loc7_34 => constants.%pattern_type.afe
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@GetAddr.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc2_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Class(constants.%i32) {
 // CHECK:STDOUT:   %T.loc2_13.2 => constants.%i32
 // CHECK:STDOUT:
@@ -421,7 +408,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %Class.elem => constants.%Class.elem.2d8
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: --- fail_todo_static_member_fn_call.carbon
+// CHECK:STDOUT: --- static_member_fn_call.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %T: type = bind_symbolic_name T, 0 [symbolic]
@@ -434,34 +421,18 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %Make: %Make.type = struct_value () [symbolic]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
-// CHECK:STDOUT:   %require_complete.4f8: <witness> = require_complete_type %Class [symbolic]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %Class [symbolic]
 // CHECK:STDOUT:   %Class.val: %Class = struct_value () [symbolic]
 // CHECK:STDOUT:   %StaticMemberFunctionCall.type: type = fn_type @StaticMemberFunctionCall [concrete]
 // CHECK:STDOUT:   %StaticMemberFunctionCall: %StaticMemberFunctionCall.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Make.specific_fn: <specific function> = specific_function %Make, @Make(%T) [symbolic]
-// CHECK:STDOUT:   %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
-// CHECK:STDOUT:   %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
-// CHECK:STDOUT:   %Dest: type = bind_symbolic_name Dest, 0 [symbolic]
-// CHECK:STDOUT:   %Convert.type.275: type = fn_type @Convert, @ImplicitAs(%Dest) [symbolic]
-// CHECK:STDOUT:   %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
-// CHECK:STDOUT:   %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Dest) [symbolic]
-// CHECK:STDOUT:   %ImplicitAs.type.53b: type = facet_type <@ImplicitAs, @ImplicitAs(%Class)> [symbolic]
-// CHECK:STDOUT:   %ImplicitAs.assoc_type.6aa: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Class) [symbolic]
-// CHECK:STDOUT:   %assoc0.f00: %ImplicitAs.assoc_type.6aa = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic]
-// CHECK:STDOUT:   %require_complete.d81: <witness> = require_complete_type %ImplicitAs.type.53b [symbolic]
-// CHECK:STDOUT:   %assoc0.dc0: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207 [symbolic]
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: imports {
 // CHECK:STDOUT:   %Core: <namespace> = namespace file.%Core.import, [concrete] {
-// CHECK:STDOUT:     .ImplicitAs = %Core.ImplicitAs
 // CHECK:STDOUT:     import Core//prelude
 // CHECK:STDOUT:     import Core//prelude/...
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
-// CHECK:STDOUT:   %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//prelude/operators/as, loc13_35, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc0)]
-// CHECK:STDOUT:   %Core.import_ref.1c7: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//prelude/operators/as, loc13_35, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
-// CHECK:STDOUT:   %Core.import_ref.207 = import_ref Core//prelude/operators/as, loc13_35, unloaded
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: file {
@@ -526,7 +497,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %Class.loc5_23.1 [symbolic = %pattern_type (constants.%pattern_type.3c1)]
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %Class.loc5_23.1 [symbolic = %require_complete (constants.%require_complete.4f8)]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %Class.loc5_23.1 [symbolic = %require_complete (constants.%require_complete)]
 // CHECK:STDOUT:   %Class.val: @Make.%Class.loc5_23.1 (%Class) = struct_value () [symbolic = %Class.val (constants.%Class.val)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn() -> %return.param: @Make.%Class.loc5_23.1 (%Class) {
@@ -544,30 +515,22 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %Class.loc8_49.2 [symbolic = %pattern_type (constants.%pattern_type.3c1)]
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete.loc16_18: <witness> = require_complete_type %Class.loc8_49.2 [symbolic = %require_complete.loc16_18 (constants.%require_complete.4f8)]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %Class.loc8_49.2 [symbolic = %require_complete (constants.%require_complete)]
 // CHECK:STDOUT:   %Make.type: type = fn_type @Make, @Class(%T.loc8_29.2) [symbolic = %Make.type (constants.%Make.type)]
 // CHECK:STDOUT:   %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)]
-// CHECK:STDOUT:   %Make.specific_fn.loc16_18.2: <specific function> = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %Make.specific_fn.loc16_18.2 (constants.%Make.specific_fn)]
-// CHECK:STDOUT:   %ImplicitAs.type.loc16_25.2: type = facet_type <@ImplicitAs, @ImplicitAs(%Class.loc8_49.2)> [symbolic = %ImplicitAs.type.loc16_25.2 (constants.%ImplicitAs.type.53b)]
-// CHECK:STDOUT:   %require_complete.loc16_25: <witness> = require_complete_type %ImplicitAs.type.loc16_25.2 [symbolic = %require_complete.loc16_25 (constants.%require_complete.d81)]
-// CHECK:STDOUT:   %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%Class.loc8_49.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.6aa)]
-// CHECK:STDOUT:   %assoc0: @StaticMemberFunctionCall.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.6aa) = assoc_entity element0, imports.%Core.import_ref.1c7 [symbolic = %assoc0 (constants.%assoc0.f00)]
+// CHECK:STDOUT:   %Make.specific_fn.loc9_18.2: <specific function> = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %Make.specific_fn.loc9_18.2 (constants.%Make.specific_fn)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn() -> %return.param: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) {
 // CHECK:STDOUT:   !entry:
-// CHECK:STDOUT:     %Class.ref.loc16: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic]
-// CHECK:STDOUT:     %T.ref.loc16: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)]
-// CHECK:STDOUT:     %Class.loc16: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class)]
-// CHECK:STDOUT:     %.loc16_18: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)]
-// CHECK:STDOUT:     %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc16_18 [symbolic = %Make (constants.%Make)]
-// CHECK:STDOUT:     %Make.specific_fn.loc16_18.1: <specific function> = specific_function %Make.ref, @Make(constants.%T) [symbolic = %Make.specific_fn.loc16_18.2 (constants.%Make.specific_fn)]
-// CHECK:STDOUT:     %.loc16_24: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = temporary_storage
-// CHECK:STDOUT:     %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = call %Make.specific_fn.loc16_18.1() to %.loc16_24
-// CHECK:STDOUT:     %ImplicitAs.type.loc16_25.1: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%Class)> [symbolic = %ImplicitAs.type.loc16_25.2 (constants.%ImplicitAs.type.53b)]
-// CHECK:STDOUT:     %.loc16_25.1: @StaticMemberFunctionCall.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.6aa) = specific_constant imports.%Core.import_ref.492, @ImplicitAs(constants.%Class) [symbolic = %assoc0 (constants.%assoc0.f00)]
-// CHECK:STDOUT:     %Convert.ref: @StaticMemberFunctionCall.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.6aa) = name_ref Convert, %.loc16_25.1 [symbolic = %assoc0 (constants.%assoc0.f00)]
-// CHECK:STDOUT:     %.loc16_25.2: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = converted %Make.call, <error> [concrete = <error>]
-// CHECK:STDOUT:     return <error> to %return
+// CHECK:STDOUT:     %Class.ref.loc9: %Class.type = name_ref Class, file.%Class.decl [concrete = constants.%Class.generic]
+// CHECK:STDOUT:     %T.ref.loc9: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)]
+// CHECK:STDOUT:     %Class.loc9: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class)]
+// CHECK:STDOUT:     %.loc9: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)]
+// CHECK:STDOUT:     %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc9 [symbolic = %Make (constants.%Make)]
+// CHECK:STDOUT:     %Make.specific_fn.loc9_18.1: <specific function> = specific_function %Make.ref, @Make(constants.%T) [symbolic = %Make.specific_fn.loc9_18.2 (constants.%Make.specific_fn)]
+// CHECK:STDOUT:     %.loc8: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = splice_block %return {}
+// CHECK:STDOUT:     %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class) = call %Make.specific_fn.loc9_18.1() to %.loc8
+// CHECK:STDOUT:     return %Make.call to %return
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -585,21 +548,13 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.3c1
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete => constants.%require_complete.4f8
+// CHECK:STDOUT:   %require_complete => constants.%require_complete
 // CHECK:STDOUT:   %Class.val => constants.%Class.val
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@Make.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @StaticMemberFunctionCall(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_29.2 => constants.%T
 // CHECK:STDOUT:   %Class.loc8_49.2 => constants.%Class
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.3c1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@StaticMemberFunctionCall.%T.loc8_29.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Make(@StaticMemberFunctionCall.%T.loc8_29.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/class/generic/member_inline.carbon

@@ -201,10 +201,6 @@ class C(T:! type) {
 // CHECK:STDOUT:   %pattern_type.loc9_22 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@G.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_member_inline.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -291,7 +287,3 @@ class C(T:! type) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%T) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc4_9.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.%T) {}
-// CHECK:STDOUT:

+ 0 - 24
toolchain/check/testdata/class/generic/member_lookup.carbon

@@ -333,8 +333,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %complete_type.loc6_1.2 => constants.%complete_type.eaf
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(%T.loc4_17.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Derived(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_15.2 => constants.%T
 // CHECK:STDOUT:
@@ -349,10 +347,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %complete_type.loc11_1.2 => constants.%complete_type.8ad
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(@Derived.%T.loc8_15.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Derived(%T.loc8_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @AccessDerived(constants.%T) {
 // CHECK:STDOUT:   %T.loc13_18.2 => constants.%T
 // CHECK:STDOUT:   %Derived.loc13_40.2 => constants.%Derived.85c
@@ -360,8 +354,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc13_43 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Derived(@AccessDerived.%T.loc13_18.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @AccessBase(constants.%T) {
 // CHECK:STDOUT:   %T.loc17_15.2 => constants.%T
 // CHECK:STDOUT:   %Derived.loc17_37.2 => constants.%Derived.85c
@@ -369,10 +361,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc17_40 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Derived(@AccessBase.%T.loc17_15.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(@AccessBase.%T.loc17_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Derived(constants.%i32) {
 // CHECK:STDOUT:   %T.loc8_15.2 => constants.%i32
 // CHECK:STDOUT:
@@ -649,8 +637,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %complete_type.loc6_1.2 => constants.%complete_type.eaf
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(%T.loc4_17.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Derived(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_15.2 => constants.%T
 // CHECK:STDOUT:
@@ -665,10 +651,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %complete_type.loc11_1.2 => constants.%complete_type.8ad
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(@Derived.%T.loc8_15.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Derived(%T.loc8_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @AccessMissingBase(constants.%T) {
 // CHECK:STDOUT:   %T.loc13_22.2 => constants.%T
 // CHECK:STDOUT:   %Base.loc13_41.2 => constants.%Base.370
@@ -676,8 +658,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc13_44 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(@AccessMissingBase.%T.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @AccessMissingDerived(constants.%T) {
 // CHECK:STDOUT:   %T.loc21_25.2 => constants.%T
 // CHECK:STDOUT:   %Derived.loc21_47.2 => constants.%Derived.85c
@@ -685,10 +665,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc21_50 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Derived(@AccessMissingDerived.%T.loc21_25.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(@AccessMissingDerived.%T.loc21_25.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Derived(constants.%i32) {
 // CHECK:STDOUT:   %T.loc8_15.2 => constants.%i32
 // CHECK:STDOUT:

+ 3 - 19
toolchain/check/testdata/class/generic/member_out_of_line.carbon

@@ -145,7 +145,7 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:   } {
 // CHECK:STDOUT:     %T.loc4_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_13.2 (constants.%T)]
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] {
+// CHECK:STDOUT:   %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] {
 // CHECK:STDOUT:     %n.patt: @F.%pattern_type (%pattern_type.7dc) = binding_pattern n [concrete]
 // CHECK:STDOUT:     %n.param_patt: @F.%pattern_type (%pattern_type.7dc) = value_param_pattern %n.patt, call_param0 [concrete]
 // CHECK:STDOUT:     %return.patt: @F.%pattern_type (%pattern_type.7dc) = return_slot_pattern [concrete]
@@ -159,7 +159,7 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:     %return.param.loc10: ref @F.%T.loc5 (%T) = out_param call_param1
 // CHECK:STDOUT:     %return.loc10: ref @F.%T.loc5 (%T) = return_slot %return.param.loc10
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %G.decl: @Class.%G.type (%G.type) = fn_decl @G [symbolic = constants.%G] {
+// CHECK:STDOUT:   %G.decl: %G.type = fn_decl @G [symbolic = constants.%G] {
 // CHECK:STDOUT:     %self.patt: @G.%pattern_type.loc6_8 (%pattern_type.3c1) = binding_pattern self [concrete]
 // CHECK:STDOUT:     %self.param_patt: @G.%pattern_type.loc6_8 (%pattern_type.3c1) = value_param_pattern %self.patt, call_param0 [concrete]
 // CHECK:STDOUT:     %return.patt: @G.%pattern_type.loc6_22 (%pattern_type.7dc) = return_slot_pattern [concrete]
@@ -299,10 +299,6 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:   %pattern_type.loc6_22 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@G.%T.loc6) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- nested.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -343,7 +339,7 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:   } {
 // CHECK:STDOUT:     %T.loc4_9.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc4_9.2 (constants.%T)]
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %F.decl: @B.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] {
+// CHECK:STDOUT:   %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] {
 // CHECK:STDOUT:     %self.patt: @F.%pattern_type.loc6_10 (%pattern_type.13e) = binding_pattern self [concrete]
 // CHECK:STDOUT:     %self.param_patt: @F.%pattern_type.loc6_10 (%pattern_type.13e) = value_param_pattern %self.patt, call_param0 [concrete]
 // CHECK:STDOUT:     %a.patt: @F.%pattern_type.loc6_22 (%pattern_type.7dc) = binding_pattern a [concrete]
@@ -469,12 +465,6 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:   %pattern_type.loc6_22 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @B(@F.%T.loc6, @F.%N.loc6) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @B(%T, %N.loc5_11.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(%T.loc4_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_mismatched_not_generic_vs_generic.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -606,8 +596,6 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @TooFew.1(constants.%T) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%T.loc4_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_mismatched_too_many_args.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -690,8 +678,6 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @TooMany.1(constants.%T) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%T.loc4_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @TooMany.2(constants.%T, constants.%U) {
 // CHECK:STDOUT:   %T.loc15_12.2 => constants.%T
 // CHECK:STDOUT:   %U.loc15_22.2 => constants.%U
@@ -782,8 +768,6 @@ fn Generic(T:! ()).WrongType() {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @WrongType.1(constants.%T.8b3) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%T.loc4_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @WrongType.2(constants.%T.7a6) {
 // CHECK:STDOUT:   %T.loc15_12.2 => constants.%T.7a6
 // CHECK:STDOUT: }

+ 0 - 28
toolchain/check/testdata/class/generic/member_type.carbon

@@ -287,8 +287,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %complete_type.loc7_3.2 => constants.%complete_type.84b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type.loc9_8 => constants.%pattern_type.7dcd0a.1
@@ -296,12 +294,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc9_14 => constants.%pattern_type.253
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@F.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@Outer.%T.loc4_13.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Outer(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%i32
 // CHECK:STDOUT:
@@ -720,10 +712,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@F.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%T) {
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
@@ -740,12 +728,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %F => constants.%F.ed9
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@impl.eed.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@impl.eed.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.eed(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %C => constants.%C.390
@@ -753,8 +735,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc11_23 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.2.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Inner.facet.9a3) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Inner.type => constants.%Inner.type.392
@@ -764,10 +744,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@Outer.%T.loc4_13.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@Outer.%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Inner.facet.c18) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Inner.type => constants.%Inner.type.392
@@ -777,10 +753,6 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %pattern_type.loc6_24 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@F.2.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F.1(@F.2.%T, @F.2.%Inner.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Outer(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%i32
 // CHECK:STDOUT:

+ 9 - 51
toolchain/check/testdata/class/generic/method_deduce.carbon

@@ -48,7 +48,6 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %require_complete.fe1: <witness> = require_complete_type %tuple.type.30b [symbolic]
 // CHECK:STDOUT:   %Get.specific_fn.f73: <specific function> = specific_function %Get.cf9, @Get(%T, %U) [symbolic]
 // CHECK:STDOUT:   %require_complete.4ae: <witness> = require_complete_type %T [symbolic]
-// CHECK:STDOUT:   %require_complete.b54: <witness> = require_complete_type %U [symbolic]
 // CHECK:STDOUT:   %GetNoDeduce.specific_fn.536: <specific function> = specific_function %GetNoDeduce.c9a, @GetNoDeduce(%T, %U) [symbolic]
 // CHECK:STDOUT:   %Class.480: type = class_type @Class, @Class(%A) [concrete]
 // CHECK:STDOUT:   %pattern_type.827: type = pattern_type %Class.480 [concrete]
@@ -213,12 +212,10 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %tuple.type [symbolic = %pattern_type (constants.%pattern_type.65c)]
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete.loc15_20: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc15_20 (constants.%require_complete.fe1)]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %tuple.type [symbolic = %require_complete (constants.%require_complete.fe1)]
 // CHECK:STDOUT:   %Get.type: type = fn_type @Get, @Class(%T) [symbolic = %Get.type (constants.%Get.type.fd9)]
 // CHECK:STDOUT:   %Get: @Get.%Get.type (%Get.type.fd9) = struct_value () [symbolic = %Get (constants.%Get.cf9)]
 // CHECK:STDOUT:   %Get.specific_fn.loc15_39.2: <specific function> = specific_function %Get, @Get(%T, %U.loc15_10.1) [symbolic = %Get.specific_fn.loc15_39.2 (constants.%Get.specific_fn.f73)]
-// CHECK:STDOUT:   %require_complete.loc15_44.1: <witness> = require_complete_type %T [symbolic = %require_complete.loc15_44.1 (constants.%require_complete.4ae)]
-// CHECK:STDOUT:   %require_complete.loc15_44.2: <witness> = require_complete_type %U.loc15_10.1 [symbolic = %require_complete.loc15_44.2 (constants.%require_complete.b54)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn() -> %return.param: @Get.%tuple.type (%tuple.type.30b) {
 // CHECK:STDOUT:   !entry:
@@ -226,20 +223,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:     %Get.ref: @Get.%Get.type (%Get.type.fd9) = name_ref Get, %.loc15_39 [symbolic = %Get (constants.%Get.cf9)]
 // CHECK:STDOUT:     %U.ref.loc15_43: type = name_ref U, %U.loc15_10.2 [symbolic = %U.loc15_10.1 (constants.%U)]
 // CHECK:STDOUT:     %Get.specific_fn.loc15_39.1: <specific function> = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %Get.specific_fn.loc15_39.2 (constants.%Get.specific_fn.f73)]
-// CHECK:STDOUT:     %.loc15_44.1: ref @Get.%tuple.type (%tuple.type.30b) = temporary_storage
-// CHECK:STDOUT:     %Get.call: init @Get.%tuple.type (%tuple.type.30b) = call %Get.specific_fn.loc15_39.1() to %.loc15_44.1
-// CHECK:STDOUT:     %.loc15_44.2: ref @Get.%tuple.type (%tuple.type.30b) = temporary %.loc15_44.1, %Get.call
-// CHECK:STDOUT:     %tuple.elem0.loc15_44.1: ref @Get.%T (%T) = tuple_access %.loc15_44.2, element0
-// CHECK:STDOUT:     %.loc15_44.3: @Get.%T (%T) = bind_value %tuple.elem0.loc15_44.1
-// CHECK:STDOUT:     %tuple.elem0.loc15_44.2: ref @Get.%T (%T) = tuple_access %return, element0
-// CHECK:STDOUT:     %.loc15_44.4: init @Get.%T (%T) = initialize_from %.loc15_44.3 to %tuple.elem0.loc15_44.2
-// CHECK:STDOUT:     %tuple.elem1.loc15_44.1: ref @Get.%U.loc15_10.1 (%U) = tuple_access %.loc15_44.2, element1
-// CHECK:STDOUT:     %.loc15_44.5: @Get.%U.loc15_10.1 (%U) = bind_value %tuple.elem1.loc15_44.1
-// CHECK:STDOUT:     %tuple.elem1.loc15_44.2: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1
-// CHECK:STDOUT:     %.loc15_44.6: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_44.5 to %tuple.elem1.loc15_44.2
-// CHECK:STDOUT:     %.loc15_44.7: init @Get.%tuple.type (%tuple.type.30b) = tuple_init (%.loc15_44.4, %.loc15_44.6) to %return
-// CHECK:STDOUT:     %.loc15_45: init @Get.%tuple.type (%tuple.type.30b) = converted %Get.call, %.loc15_44.7
-// CHECK:STDOUT:     return %.loc15_45 to %return
+// CHECK:STDOUT:     %.loc15_20: ref @Get.%tuple.type (%tuple.type.30b) = splice_block %return {}
+// CHECK:STDOUT:     %Get.call: init @Get.%tuple.type (%tuple.type.30b) = call %Get.specific_fn.loc15_39.1() to %.loc15_20
+// CHECK:STDOUT:     return %Get.call to %return
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -256,7 +242,6 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %GetNoDeduce: @GetNoDeduce.%GetNoDeduce.type (%GetNoDeduce.type.766) = struct_value () [symbolic = %GetNoDeduce (constants.%GetNoDeduce.c9a)]
 // CHECK:STDOUT:   %GetNoDeduce.specific_fn.loc16_53.2: <specific function> = specific_function %GetNoDeduce, @GetNoDeduce(%T, %U.loc16_24.1) [symbolic = %GetNoDeduce.specific_fn.loc16_53.2 (constants.%GetNoDeduce.specific_fn.536)]
 // CHECK:STDOUT:   %require_complete.loc16_70: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc16_70 (constants.%require_complete.fe1)]
-// CHECK:STDOUT:   %require_complete.loc16_69: <witness> = require_complete_type %U.loc16_24.1 [symbolic = %require_complete.loc16_69 (constants.%require_complete.b54)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn(%x.param: @GetNoDeduce.%T (%T)) -> %return.param: @GetNoDeduce.%tuple.type (%tuple.type.30b) {
 // CHECK:STDOUT:   !entry:
@@ -265,20 +250,9 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:     %x.ref: @GetNoDeduce.%T (%T) = name_ref x, %x
 // CHECK:STDOUT:     %U.ref.loc16_68: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)]
 // CHECK:STDOUT:     %GetNoDeduce.specific_fn.loc16_53.1: <specific function> = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %GetNoDeduce.specific_fn.loc16_53.2 (constants.%GetNoDeduce.specific_fn.536)]
-// CHECK:STDOUT:     %.loc16_69.1: ref @GetNoDeduce.%tuple.type (%tuple.type.30b) = temporary_storage
-// CHECK:STDOUT:     %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = call %GetNoDeduce.specific_fn.loc16_53.1(%x.ref) to %.loc16_69.1
-// CHECK:STDOUT:     %.loc16_69.2: ref @GetNoDeduce.%tuple.type (%tuple.type.30b) = temporary %.loc16_69.1, %GetNoDeduce.call
-// CHECK:STDOUT:     %tuple.elem0.loc16_69.1: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_69.2, element0
-// CHECK:STDOUT:     %.loc16_69.3: @GetNoDeduce.%T (%T) = bind_value %tuple.elem0.loc16_69.1
-// CHECK:STDOUT:     %tuple.elem0.loc16_69.2: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0
-// CHECK:STDOUT:     %.loc16_69.4: init @GetNoDeduce.%T (%T) = initialize_from %.loc16_69.3 to %tuple.elem0.loc16_69.2
-// CHECK:STDOUT:     %tuple.elem1.loc16_69.1: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %.loc16_69.2, element1
-// CHECK:STDOUT:     %.loc16_69.5: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %tuple.elem1.loc16_69.1
-// CHECK:STDOUT:     %tuple.elem1.loc16_69.2: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1
-// CHECK:STDOUT:     %.loc16_69.6: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_69.5 to %tuple.elem1.loc16_69.2
-// CHECK:STDOUT:     %.loc16_69.7: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = tuple_init (%.loc16_69.4, %.loc16_69.6) to %return
-// CHECK:STDOUT:     %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = converted %GetNoDeduce.call, %.loc16_69.7
-// CHECK:STDOUT:     return %.loc16_70 to %return
+// CHECK:STDOUT:     %.loc16_34: ref @GetNoDeduce.%tuple.type (%tuple.type.30b) = splice_block %return {}
+// CHECK:STDOUT:     %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.30b) = call %GetNoDeduce.specific_fn.loc16_53.1(%x.ref) to %.loc16_34
+// CHECK:STDOUT:     return %GetNoDeduce.call to %return
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -329,12 +303,10 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.65c
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete.loc15_20 => constants.%require_complete.fe1
+// CHECK:STDOUT:   %require_complete => constants.%require_complete.fe1
 // CHECK:STDOUT:   %Get.type => constants.%Get.type.fd9
 // CHECK:STDOUT:   %Get => constants.%Get.cf9
 // CHECK:STDOUT:   %Get.specific_fn.loc15_39.2 => constants.%Get.specific_fn.f73
-// CHECK:STDOUT:   %require_complete.loc15_44.1 => constants.%require_complete.4ae
-// CHECK:STDOUT:   %require_complete.loc15_44.2 => constants.%require_complete.b54
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @GetNoDeduce(constants.%T, constants.%U) {
@@ -350,19 +322,8 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %GetNoDeduce => constants.%GetNoDeduce.c9a
 // CHECK:STDOUT:   %GetNoDeduce.specific_fn.loc16_53.2 => constants.%GetNoDeduce.specific_fn.536
 // CHECK:STDOUT:   %require_complete.loc16_70 => constants.%require_complete.fe1
-// CHECK:STDOUT:   %require_complete.loc16_69 => constants.%require_complete.b54
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc14_13.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@Get.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Get(%T, %U.loc15_10.1) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@GetNoDeduce.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @GetNoDeduce(%T, %U.loc16_24.1) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Class(constants.%A) {
 // CHECK:STDOUT:   %T.loc14_13.2 => constants.%A
 // CHECK:STDOUT:
@@ -380,12 +341,10 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.edc
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete.loc15_20 => constants.%complete_type.56a
+// CHECK:STDOUT:   %require_complete => constants.%complete_type.56a
 // CHECK:STDOUT:   %Get.type => constants.%Get.type.501
 // CHECK:STDOUT:   %Get => constants.%Get.f37
 // CHECK:STDOUT:   %Get.specific_fn.loc15_39.2 => constants.%Get.specific_fn.213
-// CHECK:STDOUT:   %require_complete.loc15_44.1 => constants.%complete_type.357
-// CHECK:STDOUT:   %require_complete.loc15_44.2 => constants.%complete_type.357
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @GetNoDeduce(constants.%A, constants.%B) {
@@ -401,6 +360,5 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %GetNoDeduce => constants.%GetNoDeduce.162
 // CHECK:STDOUT:   %GetNoDeduce.specific_fn.loc16_53.2 => constants.%GetNoDeduce.specific_fn.438
 // CHECK:STDOUT:   %require_complete.loc16_70 => constants.%complete_type.56a
-// CHECK:STDOUT:   %require_complete.loc16_69 => constants.%complete_type.357
 // CHECK:STDOUT: }
 // CHECK:STDOUT:

+ 0 - 12
toolchain/check/testdata/class/generic/self.carbon

@@ -218,8 +218,6 @@ class Class(T:! type) {
 // CHECK:STDOUT:   %Class.val => constants.%Class.val
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@MakeSelf.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @MakeClass(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Class.loc15_28.1 => constants.%Class
@@ -230,15 +228,5 @@ class Class(T:! type) {
 // CHECK:STDOUT:   %Class.val => constants.%Class.val
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@MakeClass.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%T) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@F.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @MakeSelf(@F.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @MakeClass(@F.%T) {}
-// CHECK:STDOUT:

+ 0 - 2
toolchain/check/testdata/class/generic/stringify.carbon

@@ -312,8 +312,6 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
 // CHECK:STDOUT:   %U.loc5_15.2 => constants.%U
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Outer(constants.%ptr.c28) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%ptr.c28
 // CHECK:STDOUT:

+ 1 - 5
toolchain/check/testdata/class/generic_method.carbon

@@ -52,7 +52,7 @@ fn Class(T:! type).F[self: Self](n: T) {}
 // CHECK:STDOUT:   } {
 // CHECK:STDOUT:     %T.loc11_13.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_13.2 (constants.%T)]
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = constants.%F] {
+// CHECK:STDOUT:   %F.decl: %F.type = fn_decl @F [symbolic = constants.%F] {
 // CHECK:STDOUT:     %self.patt: @F.%pattern_type.loc13_8 (%pattern_type.3c1) = binding_pattern self [concrete]
 // CHECK:STDOUT:     %self.param_patt: @F.%pattern_type.loc13_8 (%pattern_type.3c1) = value_param_pattern %self.patt, call_param0 [concrete]
 // CHECK:STDOUT:     %n.patt: @F.%pattern_type.loc13_20 (%pattern_type.7dc) = binding_pattern n [concrete]
@@ -150,7 +150,3 @@ fn Class(T:! type).F[self: Self](n: T) {}
 // CHECK:STDOUT:   %pattern_type.loc13_20 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(@F.%T.loc13) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Class(%T.loc11_13.2) {}
-// CHECK:STDOUT:

+ 0 - 2
toolchain/check/testdata/class/min_prelude/destroy_calls.carbon

@@ -890,8 +890,6 @@ fn G() { F({}); }
 // CHECK:STDOUT:   %T.loc6_15.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.%T.loc6_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%empty_struct_type) {
 // CHECK:STDOUT:   %T.loc6_15.2 => constants.%empty_struct_type
 // CHECK:STDOUT:

+ 0 - 4
toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon

@@ -334,10 +334,6 @@ class Foo[T:! type];
 // CHECK:STDOUT:   %U.loc10_26.2 => constants.%U
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @GenericNoParams(@C.%T.loc8_9.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc8_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @GenericAndParams.1(constants.%X) {
 // CHECK:STDOUT:   %T.loc6_24.2 => constants.%X
 // CHECK:STDOUT:

+ 0 - 16
toolchain/check/testdata/class/virtual_modifiers.carbon

@@ -1919,10 +1919,6 @@ base class T1(T:! type) {
 // CHECK:STDOUT:   %pattern_type.loc8_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(@F.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Base(%T.loc7_17.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Base(constants.%T1) {
 // CHECK:STDOUT:   %T.loc7_17.2 => constants.%T1
 // CHECK:STDOUT:
@@ -2245,10 +2241,6 @@ base class T1(T:! type) {
 // CHECK:STDOUT:   %T.loc9_28.1 => constants.%T.336
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @T1(@F.%T.loc9_22) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @T1(%T.loc4_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- generic_with_virtual.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -2335,10 +2327,6 @@ base class T1(T:! type) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.48e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @T1(@F.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @T1(%T.loc4_15.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- with_dependent_arg.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -2434,7 +2422,3 @@ base class T1(T:! type) {
 // CHECK:STDOUT:   %pattern_type.loc5_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @T1(@F.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @T1(%T.loc4_15.2) {}
-// CHECK:STDOUT:

+ 3 - 40
toolchain/check/testdata/deduce/generic_type.carbon

@@ -226,10 +226,6 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.ef1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.%T.loc7_6.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc7_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%D) {
 // CHECK:STDOUT:   %T.loc4_9.2 => constants.%D
 // CHECK:STDOUT:
@@ -402,10 +398,6 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %F.specific_fn.loc7_39.2 => constants.%F.specific_fn.ef1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.%T.loc7_6.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc7_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%C) {
 // CHECK:STDOUT:   %T.loc4_9.2 => constants.%C
 // CHECK:STDOUT:
@@ -448,8 +440,6 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %require_complete.fe1: <witness> = require_complete_type %tuple.type.30b [symbolic]
 // CHECK:STDOUT:   %require_complete.e7e: <witness> = require_complete_type %Inner.c71 [symbolic]
 // CHECK:STDOUT:   %F.specific_fn.dd9: <specific function> = specific_function %F, @F(%T, %U) [symbolic]
-// CHECK:STDOUT:   %require_complete.4ae: <witness> = require_complete_type %T [symbolic]
-// CHECK:STDOUT:   %require_complete.b54: <witness> = require_complete_type %U [symbolic]
 // CHECK:STDOUT:   %Outer.7c4: type = class_type @Outer, @Outer(%C) [concrete]
 // CHECK:STDOUT:   %Inner.type.181: type = generic_class_type @Inner, @Outer(%C) [concrete]
 // CHECK:STDOUT:   %Inner.generic.205: %Inner.type.181 = struct_value () [concrete]
@@ -613,28 +603,15 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %require_complete.loc13_48: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc13_48 (constants.%require_complete.fe1)]
 // CHECK:STDOUT:   %require_complete.loc13_27: <witness> = require_complete_type %Inner.loc13_45.2 [symbolic = %require_complete.loc13_27 (constants.%require_complete.e7e)]
 // CHECK:STDOUT:   %F.specific_fn.loc13_67.2: <specific function> = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.dd9)]
-// CHECK:STDOUT:   %require_complete.loc13_70.1: <witness> = require_complete_type %T.loc13_6.2 [symbolic = %require_complete.loc13_70.1 (constants.%require_complete.4ae)]
-// CHECK:STDOUT:   %require_complete.loc13_70.2: <witness> = require_complete_type %U.loc13_16.2 [symbolic = %require_complete.loc13_70.2 (constants.%require_complete.b54)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn(%p.param: @F.%Inner.loc13_45.2 (%Inner.c71)) -> %return.param: @F.%tuple.type (%tuple.type.30b) {
 // CHECK:STDOUT:   !entry:
 // CHECK:STDOUT:     %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
 // CHECK:STDOUT:     %p.ref: @F.%Inner.loc13_45.2 (%Inner.c71) = name_ref p, %p
 // CHECK:STDOUT:     %F.specific_fn.loc13_67.1: <specific function> = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %F.specific_fn.loc13_67.2 (constants.%F.specific_fn.dd9)]
-// CHECK:STDOUT:     %.loc13_70.1: ref @F.%tuple.type (%tuple.type.30b) = temporary_storage
-// CHECK:STDOUT:     %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc13_67.1(%p.ref) to %.loc13_70.1
-// CHECK:STDOUT:     %.loc13_70.2: ref @F.%tuple.type (%tuple.type.30b) = temporary %.loc13_70.1, %F.call
-// CHECK:STDOUT:     %tuple.elem0.loc13_70.1: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_70.2, element0
-// CHECK:STDOUT:     %.loc13_70.3: @F.%T.loc13_6.2 (%T) = bind_value %tuple.elem0.loc13_70.1
-// CHECK:STDOUT:     %tuple.elem0.loc13_70.2: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0
-// CHECK:STDOUT:     %.loc13_70.4: init @F.%T.loc13_6.2 (%T) = initialize_from %.loc13_70.3 to %tuple.elem0.loc13_70.2
-// CHECK:STDOUT:     %tuple.elem1.loc13_70.1: ref @F.%U.loc13_16.2 (%U) = tuple_access %.loc13_70.2, element1
-// CHECK:STDOUT:     %.loc13_70.5: @F.%U.loc13_16.2 (%U) = bind_value %tuple.elem1.loc13_70.1
-// CHECK:STDOUT:     %tuple.elem1.loc13_70.2: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1
-// CHECK:STDOUT:     %.loc13_70.6: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_70.5 to %tuple.elem1.loc13_70.2
-// CHECK:STDOUT:     %.loc13_70.7: init @F.%tuple.type (%tuple.type.30b) = tuple_init (%.loc13_70.4, %.loc13_70.6) to %return
-// CHECK:STDOUT:     %.loc13_71: init @F.%tuple.type (%tuple.type.30b) = converted %F.call, %.loc13_70.7
-// CHECK:STDOUT:     return %.loc13_71 to %return
+// CHECK:STDOUT:     %.loc13_48: ref @F.%tuple.type (%tuple.type.30b) = splice_block %return {}
+// CHECK:STDOUT:     %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc13_67.1(%p.ref) to %.loc13_48
+// CHECK:STDOUT:     return %F.call to %return
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -662,8 +639,6 @@ fn G() -> i32 {
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%T, constants.%U) {
 // CHECK:STDOUT:   %T.loc13_6.2 => constants.%T
 // CHECK:STDOUT:   %U.loc13_16.2 => constants.%U
@@ -680,16 +655,8 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %require_complete.loc13_48 => constants.%require_complete.fe1
 // CHECK:STDOUT:   %require_complete.loc13_27 => constants.%require_complete.e7e
 // CHECK:STDOUT:   %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.dd9
-// CHECK:STDOUT:   %require_complete.loc13_70.1 => constants.%require_complete.4ae
-// CHECK:STDOUT:   %require_complete.loc13_70.2 => constants.%require_complete.b54
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(@F.%T.loc13_6.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@F.%T.loc13_6.2, @F.%U.loc13_16.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc13_6.2, %U.loc13_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Outer(constants.%C) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%C
 // CHECK:STDOUT:
@@ -720,8 +687,6 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %require_complete.loc13_48 => constants.%complete_type.53b
 // CHECK:STDOUT:   %require_complete.loc13_27 => constants.%complete_type.357
 // CHECK:STDOUT:   %F.specific_fn.loc13_67.2 => constants.%F.specific_fn.4a7
-// CHECK:STDOUT:   %require_complete.loc13_70.1 => constants.%complete_type.357
-// CHECK:STDOUT:   %require_complete.loc13_70.2 => constants.%complete_type.357
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: --- nontype.carbon
@@ -900,8 +865,6 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.48f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @WithNontype(@F.%N.loc6_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @WithNontype(constants.%int_0.6a9) {
 // CHECK:STDOUT:   %N.loc4_19.2 => constants.%int_0.6a9
 // CHECK:STDOUT:

+ 0 - 4
toolchain/check/testdata/deduce/tuple.carbon

@@ -206,8 +206,6 @@ fn G(pair: (C, D)) -> D {
 // CHECK:STDOUT:   %F.specific_fn.loc7_54.2 => constants.%F.specific_fn.dd9
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc7_6.2, %U.loc7_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%C, constants.%D) {
 // CHECK:STDOUT:   %T.loc7_6.2 => constants.%C
 // CHECK:STDOUT:   %U.loc7_16.2 => constants.%D
@@ -443,8 +441,6 @@ fn G(pair: (C, D)) -> D {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.88c
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasPair(@F.%tuple.loc6_40.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HasPair(constants.%tuple.21c) {
 // CHECK:STDOUT:   %Pair.loc4_15.2 => constants.%tuple.21c
 // CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/deduce/type_operator.carbon

@@ -194,8 +194,6 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.ef1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc6_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%C) {
 // CHECK:STDOUT:   %T.loc6_6.2 => constants.%C
 // CHECK:STDOUT:   %ptr.loc6_20.2 => constants.%ptr.019
@@ -345,8 +343,6 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %F.specific_fn.loc6_43.2 => constants.%F.specific_fn.ef1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc6_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%C) {
 // CHECK:STDOUT:   %T.loc6_6.2 => constants.%C
 // CHECK:STDOUT:   %const.loc6_19.2 => constants.%const.668
@@ -494,8 +490,6 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %F.specific_fn.loc6_37.2 => constants.%F.specific_fn.ef1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc6_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%const) {
 // CHECK:STDOUT:   %T.loc6_6.2 => constants.%const
 // CHECK:STDOUT:   %ptr.loc6_20.2 => constants.%ptr.801
@@ -640,5 +634,3 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %F.specific_fn.loc6_43.2 => constants.%F.specific_fn
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc6_6.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/deduce/value_with_type_through_access.carbon

@@ -267,8 +267,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc8_37 => constants.%pattern_type.08e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HoldsType(@F.%T.loc8_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HoldsType(constants.%tuple) {
 // CHECK:STDOUT:   %T.loc4_17.2 => constants.%tuple
 // CHECK:STDOUT:
@@ -448,8 +446,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc8_39 => constants.%pattern_type.9f0
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HoldsType(@F.%T.loc8_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HoldsType(constants.%struct) {
 // CHECK:STDOUT:   %T.loc4_17.2 => constants.%struct
 // CHECK:STDOUT:
@@ -641,8 +637,6 @@ fn G() {
 // CHECK:STDOUT:   %.loc21_38.3 => constants.%.2fe
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HoldsType(@F.%T.loc21_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HoldsType(constants.%c) {
 // CHECK:STDOUT:   %T.loc8_17.2 => constants.%c
 // CHECK:STDOUT:
@@ -837,5 +831,3 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.142
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HoldsType(@F.%T.loc12_6.2) {}
-// CHECK:STDOUT:

+ 0 - 18
toolchain/check/testdata/facet/min_prelude/access.carbon

@@ -234,8 +234,6 @@ interface J {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @DoIt(constants.%I.facet) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @DoIt(@Use.%I.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- assoc_fn_using_self.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -364,8 +362,6 @@ interface J {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.6de4e4.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Make(@Use.%I.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- access_assoc_method.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -514,8 +510,6 @@ interface J {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.6de4e4.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Copy(@Use.%I.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- access_selfless_method.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -622,8 +616,6 @@ interface J {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @Hello(constants.%I.facet) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Hello(@Use.%I.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- access_assoc_method_indirect.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -773,8 +765,6 @@ interface J {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.6de4e4.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Copy(@UseIndirect.%I.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_non_const_associated.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1370,10 +1360,6 @@ interface J {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -1387,7 +1373,3 @@ interface J {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 16
toolchain/check/testdata/facet/min_prelude/call_combined_impl_witness.carbon

@@ -447,8 +447,6 @@ fn F() {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.f92(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T.8b3) {
 // CHECK:STDOUT:   %T => constants.%T.8b3
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -481,10 +479,6 @@ fn F() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @BB.1(constants.%B.facet.8d1) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @AA.1(@G.%A.facet.loc33) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @BB.1(@G.%B.facet.loc34) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @G(constants.%facet_value) {
 // CHECK:STDOUT:   %T.loc32_6.2 => constants.%facet_value
 // CHECK:STDOUT:   %T.as_type.loc32_28.2 => constants.%C
@@ -782,10 +776,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc13_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -799,10 +789,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
 // CHECK:STDOUT:   %Self => constants.%Self.e44
 // CHECK:STDOUT:   %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
@@ -814,8 +800,6 @@ fn F() {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2

+ 0 - 8
toolchain/check/testdata/facet/min_prelude/convert_class_type_to_facet_type.carbon

@@ -290,10 +290,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -307,7 +303,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 20
toolchain/check/testdata/facet/min_prelude/convert_class_type_to_generic_facet_value.carbon

@@ -290,8 +290,6 @@ fn G() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%Scalar.loc4_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
 // CHECK:STDOUT:   %Scalar.loc4_19.2 => constants.%GenericParam
 // CHECK:STDOUT:
@@ -319,8 +317,6 @@ fn G() {
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
 // CHECK:STDOUT:   %T.loc15_22.2 => constants.%GenericParam
 // CHECK:STDOUT:   %Generic.type.loc15_45.2 => constants.%Generic.type.769
@@ -337,10 +333,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.80f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(@PassThroughToGenericMethod.%T.loc21_31.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @CallGenericMethod(@PassThroughToGenericMethod.%T.loc21_31.2, @PassThroughToGenericMethod.%U.loc21_41.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @PassThroughToGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
 // CHECK:STDOUT:   %T.loc21_31.2 => constants.%GenericParam
 // CHECK:STDOUT:   %Generic.type.loc21_54.2 => constants.%Generic.type.769
@@ -544,8 +536,6 @@ fn G() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%Scalar.loc4_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
 // CHECK:STDOUT:   %Scalar.loc4_19.2 => constants.%GenericParam
 // CHECK:STDOUT:
@@ -572,8 +562,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc15_48 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet) {
 // CHECK:STDOUT:   %T.loc15_22.2 => constants.%GenericParam
 // CHECK:STDOUT:   %Generic.type.loc15_45.2 => constants.%Generic.type.769
@@ -747,10 +735,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -764,7 +748,3 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/facet/min_prelude/convert_class_value_to_facet_value_value.carbon

@@ -320,10 +320,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -337,7 +333,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 30
toolchain/check/testdata/facet/min_prelude/convert_class_value_to_generic_facet_value_value.carbon

@@ -339,8 +339,6 @@ fn B() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee8d8.1) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%Scalar.loc4_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
 // CHECK:STDOUT:   %Scalar.loc4_19.2 => constants.%GenericParam
 // CHECK:STDOUT:
@@ -377,12 +375,8 @@ fn B() {
 // CHECK:STDOUT:   %pattern_type.loc15_54 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc15_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Generic.facet.680) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F.1(@CallGenericMethod.%T.loc15_22.2, @CallGenericMethod.%Generic.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) {
 // CHECK:STDOUT:   %T.loc15_22.2 => constants.%GenericParam
 // CHECK:STDOUT:   %Generic.type.loc15_45.2 => constants.%Generic.type.769
@@ -583,8 +577,6 @@ fn B() {
 // CHECK:STDOUT:   %W.loc3_23.2 => constants.%W
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%V.loc3_13.2, %W.loc3_23.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%T.8b3, constants.%empty_tuple.type) {
 // CHECK:STDOUT:   %V.loc3_13.2 => constants.%T.8b3
 // CHECK:STDOUT:   %W.loc3_23.2 => constants.%empty_tuple.type
@@ -601,10 +593,6 @@ fn B() {
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.989
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc7_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_tuple.type) {
 // CHECK:STDOUT:   %V.loc3_13.2 => constants.%empty_struct_type
 // CHECK:STDOUT:   %W.loc3_23.2 => constants.%empty_tuple.type
@@ -806,8 +794,6 @@ fn B() {
 // CHECK:STDOUT:   %W.loc3_23.2 => constants.%W
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%V.loc3_13.2, %W.loc3_23.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%T.8b3, constants.%empty_tuple.type) {
 // CHECK:STDOUT:   %V.loc3_13.2 => constants.%T.8b3
 // CHECK:STDOUT:   %W.loc3_23.2 => constants.%empty_tuple.type
@@ -824,10 +810,6 @@ fn B() {
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.989
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc7_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%empty_struct_type, constants.%empty_struct_type) {
 // CHECK:STDOUT:   %V.loc3_13.2 => constants.%empty_struct_type
 // CHECK:STDOUT:   %W.loc3_23.2 => constants.%empty_struct_type
@@ -1025,10 +1007,6 @@ fn B() {
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.45b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@impl.%T.loc7_14.2, constants.%empty_tuple.type) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc7_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @A(constants.%T.826) {
 // CHECK:STDOUT:   %T.loc9_6.2 => constants.%T.826
 // CHECK:STDOUT:   %T.as_type.loc9_16.2 => constants.%T.as_type
@@ -1215,10 +1193,6 @@ fn B() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -1232,7 +1206,3 @@ fn B() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/facet/min_prelude/convert_facet_value_as_type_knows_original_type.carbon

@@ -543,10 +543,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -560,7 +556,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 10
toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_itself.carbon

@@ -157,8 +157,6 @@ fn F() {
 // CHECK:STDOUT:   %T.loc18_17.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @FeedAnimal(@HandleAnimal.%T.loc18_17.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) {
 // CHECK:STDOUT:   %T.loc18_17.2 => constants.%Animal.facet
 // CHECK:STDOUT:
@@ -334,10 +332,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -351,7 +345,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 34
toolchain/check/testdata/facet/min_prelude/convert_facet_value_to_narrowed_facet_type.carbon

@@ -324,8 +324,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T.8b3) {
 // CHECK:STDOUT:   %T => constants.%T.8b3
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -363,8 +361,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.680
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Feed(@HandleAnimal.%Eats.facet.loc8_50.3) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- bigger.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -633,8 +629,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -678,8 +672,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.40f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @FeedTame(@HandleTameAnimal.%facet_value.loc10_13.3) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- with_blanket.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -974,8 +966,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %Eats.impl_witness => constants.%Eats.impl_witness.8ab
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.e7b(%A.loc7_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.25f) {
 // CHECK:STDOUT:   %Self => constants.%Self.25f
 // CHECK:STDOUT:   %Self.as_type => constants.%Self.as_type
@@ -987,8 +977,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.f92(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -1040,8 +1028,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.ba9
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @FeedTame2(@HandleTameAnimal2.%facet_value.loc12_14.3) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- equivalent.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1186,8 +1172,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.cf45b7.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @TakesA(@WithExtraWhere.%U.loc9_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- no_interfaces_success.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1361,8 +1345,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.5eb
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @TakesTypeDeduced(@CallsWithExtraWhere.%U.as_type.loc4_60.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @TakesTypeExplicit(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_22.2 => constants.%T
 // CHECK:STDOUT: }
@@ -1377,8 +1359,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @TakesTypeExplicit(@CallsWithExtraWhereExplicit.%U.as_type.loc10_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- no_interfaces.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1559,8 +1539,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.4ae
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @TakesExtraWhereDeduced(@CallsWithType.%facet_value.loc5_27.3) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @TakesExtraWhereExplicit(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_28.2 => constants.%T
 // CHECK:STDOUT: }
@@ -1575,8 +1553,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @TakesExtraWhereExplicit(@CallsWithTypeExplicit.%facet_value.loc10_28.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/facet_types.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1855,10 +1831,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc13_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -1872,10 +1844,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
 // CHECK:STDOUT:   %Self => constants.%Self.e44
 // CHECK:STDOUT:   %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
@@ -1887,8 +1855,6 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2

+ 0 - 12
toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_blanket_impl.carbon

@@ -192,8 +192,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %Eats.impl_witness => constants.%Eats.impl_witness.8abeaf.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%A.loc17_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Feed(constants.%T.1b5) {
 // CHECK:STDOUT:   %T.loc19_9.2 => constants.%T.1b5
 // CHECK:STDOUT:   %T.as_type.loc19_22.2 => constants.%T.as_type.27d
@@ -223,8 +221,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.234
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Feed(@HandleAnimal.%Eats.facet.loc21_43.3) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/convert.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -387,10 +383,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -404,7 +396,3 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 20
toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_generic_facet_value_value.carbon

@@ -401,8 +401,6 @@ fn F() {
 // CHECK:STDOUT:   %Food.loc20_16.2 => constants.%Food.8b3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Eats(%Food.loc20_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Eats(constants.%U.as_type) {
 // CHECK:STDOUT:   %Food.loc20_16.2 => constants.%U.as_type
 // CHECK:STDOUT:
@@ -421,10 +419,6 @@ fn F() {
 // CHECK:STDOUT:   %Eats.impl_witness => constants.%Eats.impl_witness.fabf92.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Eats(@impl.009.%U.as_type.loc25_49.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.009(%T.loc25_14.2, %U.loc25_26.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Eats(constants.%Food.as_type.952) {
 // CHECK:STDOUT:   %Food.loc20_16.2 => constants.%Food.as_type.952
 // CHECK:STDOUT: }
@@ -440,8 +434,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc30_46 => constants.%pattern_type.54f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Eats(@Feed.%Food.as_type.loc30_37.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HandleAnimal(constants.%T.fd4, constants.%Food.5fe) {
 // CHECK:STDOUT:   %T.loc31_17.2 => constants.%T.fd4
 // CHECK:STDOUT:   %Food.loc31_29.2 => constants.%Food.5fe
@@ -482,10 +474,6 @@ fn F() {
 // CHECK:STDOUT:   %require_complete.loc30_50 => constants.%require_complete.444
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Eats(@HandleAnimal.%Food.as_type.loc31_56.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Feed(@HandleAnimal.%Food.loc31_29.2, @HandleAnimal.%Eats.facet.loc31_76.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet, constants.%Edible.facet) {
 // CHECK:STDOUT:   %T.loc31_17.2 => constants.%Animal.facet
 // CHECK:STDOUT:   %Food.loc31_29.2 => constants.%Edible.facet
@@ -700,10 +688,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -717,7 +701,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 10
toolchain/check/testdata/facet/min_prelude/convert_facet_value_value_to_itself.carbon

@@ -201,8 +201,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.36a
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @FeedAnimal(@HandleAnimal.%T.loc18_17.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HandleAnimal(constants.%Animal.facet) {
 // CHECK:STDOUT:   %T.loc18_17.2 => constants.%Animal.facet
 // CHECK:STDOUT:   %T.as_type.loc18_32.2 => constants.%Goat
@@ -384,10 +382,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -401,7 +395,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/facet/min_prelude/convert_interface.carbon

@@ -270,10 +270,6 @@ fn G() { F(Animal); }
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -287,7 +283,3 @@ fn G() { F(Animal); }
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 12
toolchain/check/testdata/facet/min_prelude/fail_convert_class_type_to_generic_facet_value.carbon

@@ -222,8 +222,6 @@ fn G() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%Scalar.loc14_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
 // CHECK:STDOUT:   %Scalar.loc14_19.2 => constants.%GenericParam
 // CHECK:STDOUT:
@@ -249,8 +247,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.80f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc26_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Generic(constants.%WrongGenericParam) {
 // CHECK:STDOUT:   %Scalar.loc14_19.2 => constants.%WrongGenericParam
 // CHECK:STDOUT: }
@@ -424,10 +420,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -441,7 +433,3 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/facet/min_prelude/fail_convert_facet_value_to_missing_impl.carbon

@@ -317,10 +317,6 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -334,7 +330,3 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/facet/min_prelude/fail_convert_type_erased_type_to_facet.carbon

@@ -292,10 +292,6 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -309,7 +305,3 @@ fn F() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 1 - 15
toolchain/check/testdata/facet/min_prelude/fail_deduction_uses_runtime_type_conversion.carbon

@@ -320,7 +320,7 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) {
 // CHECK:STDOUT:   %.loc40_19.3: ref %RuntimeConvertTo = temporary %.loc40_19.1, %.loc40_19.2
 // CHECK:STDOUT:   %.loc40_19.4: %RuntimeConvertTo = bind_value %.loc40_19.3
 // CHECK:STDOUT:   %F.specific_fn: <specific function> = specific_function %F.ref, @F(constants.%tuple, <error>) [concrete = <error>]
-// CHECK:STDOUT:   %F.call: init %empty_tuple.type = call %F.specific_fn(%holds_to.ref)
+// CHECK:STDOUT:   %F.call: init %empty_tuple.type = call %F.specific_fn(%holds_to.ref) [concrete = <error>]
 // CHECK:STDOUT:   return
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -334,10 +334,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert.1(constants.%Dest, constants.%Self.519) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62
@@ -377,8 +373,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) {
 // CHECK:STDOUT:   %pattern_type.loc26_29 => constants.%pattern_type.ec6
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HoldsType(@F.%T.loc26_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HoldsType(constants.%tuple) {
 // CHECK:STDOUT:   %T.loc16_17.2 => constants.%tuple
 // CHECK:STDOUT:
@@ -556,10 +550,6 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) {
 // CHECK:STDOUT:   %pattern_type.loc9_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc12_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -573,7 +563,3 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, ))) {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc12_22.2) {}
-// CHECK:STDOUT:

+ 0 - 16
toolchain/check/testdata/facet/min_prelude/runtime_value.carbon

@@ -326,8 +326,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -508,8 +506,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @X(constants.%T, constants.%Self.2bc) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Z(%T.loc2_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Z(constants.%C) {
 // CHECK:STDOUT:   %T.loc2_13.2 => constants.%C
 // CHECK:STDOUT:
@@ -527,8 +523,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc8_20.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/facet_types.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -807,10 +801,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) {
 // CHECK:STDOUT:   %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc13_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -824,10 +814,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
 // CHECK:STDOUT:   %Self => constants.%Self.e44
 // CHECK:STDOUT:   %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
@@ -839,8 +825,6 @@ fn F(T: Z(C)) -> T.(Z(C).X) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2

+ 4 - 20
toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon

@@ -499,10 +499,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
 // CHECK:STDOUT:   %pattern_type.loc12_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%T.loc11_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
 // CHECK:STDOUT:   %T.loc15_22.2 => constants.%T
 // CHECK:STDOUT: }
@@ -516,10 +512,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
 // CHECK:STDOUT:   %pattern_type.loc16_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%T.loc15_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Add.facet) {
 // CHECK:STDOUT:   %Self => constants.%Add.facet
 // CHECK:STDOUT:   %Self.as_type.loc8_15.1 => constants.%i32.builtin
@@ -702,11 +694,11 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
 // CHECK:STDOUT:   %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int]
 // CHECK:STDOUT:   %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic]
 // CHECK:STDOUT:   %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
-// CHECK:STDOUT:   %Core.import_ref.a7c = import_ref Core//default, inst87 [no loc], unloaded
+// CHECK:STDOUT:   %Core.import_ref.a7c = import_ref Core//default, inst88 [no loc], unloaded
 // CHECK:STDOUT:   %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)]
 // CHECK:STDOUT:   %Core.Convert.313 = import_ref Core//default, Convert, unloaded
 // CHECK:STDOUT:   %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
-// CHECK:STDOUT:   %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst87 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)]
+// CHECK:STDOUT:   %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst88 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)]
 // CHECK:STDOUT:   %Core.import_ref.708: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%Convert (constants.%Convert.95f)]
 // CHECK:STDOUT:   %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded
 // CHECK:STDOUT:   %Core.import_ref.07c = import_ref Core//default, inst43 [no loc], unloaded
@@ -719,14 +711,14 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
 // CHECK:STDOUT:   %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral]
 // CHECK:STDOUT:   %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d]
 // CHECK:STDOUT:   %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
-// CHECK:STDOUT:   %Core.import_ref.ff5 = import_ref Core//default, inst131 [no loc], unloaded
+// CHECK:STDOUT:   %Core.import_ref.ff5 = import_ref Core//default, inst132 [no loc], unloaded
 // CHECK:STDOUT:   %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)]
 // CHECK:STDOUT:   %Core.Convert.e69 = import_ref Core//default, Convert, unloaded
 // CHECK:STDOUT:   %Core.import_ref.c62: <witness> = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a]
 // CHECK:STDOUT:   %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral]
 // CHECK:STDOUT:   %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e]
 // CHECK:STDOUT:   %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
-// CHECK:STDOUT:   %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst131 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
+// CHECK:STDOUT:   %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst132 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
 // CHECK:STDOUT:   %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded
 // CHECK:STDOUT:   %Core.import_ref.1c752f.1: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
 // CHECK:STDOUT:   %Core.import_ref.c5f: <witness> = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5]
@@ -959,10 +951,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.65a) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %As.type => constants.%As.type.eed
@@ -1000,10 +988,6 @@ var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
 // CHECK:STDOUT:   %assoc0 => constants.%assoc0.6fd
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert.2(constants.%T, constants.%Self.519) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62

+ 1 - 9
toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon

@@ -87,7 +87,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
 // CHECK:STDOUT:   } {
 // CHECK:STDOUT:     %F.loc5_13.1: type = bind_symbolic_name F, 0 [symbolic = %F.loc5_13.2 (constants.%F.8b3)]
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %G.decl: @Inner.%G.type (%G.type) = fn_decl @G [symbolic = constants.%G] {
+// CHECK:STDOUT:   %G.decl: %G.type = fn_decl @G [symbolic = constants.%G] {
 // CHECK:STDOUT:     %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
 // CHECK:STDOUT:     %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param0 [concrete]
 // CHECK:STDOUT:   } {
@@ -213,11 +213,3 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @G(constants.%F.8b3) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(%F.loc8_19.1) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@Class.%F.loc5_13.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(@G.%F.loc13_46.1) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(@G.%F.loc13_46.1) {}
-// CHECK:STDOUT:

+ 0 - 6
toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon

@@ -286,8 +286,6 @@ fn G() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%Scalar, constants.%Self.dee8d8.1) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(%Scalar.loc11_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Generic(constants.%GenericParam) {
 // CHECK:STDOUT:   %Scalar.loc11_19.2 => constants.%GenericParam
 // CHECK:STDOUT:
@@ -325,12 +323,8 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.80f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Generic(@CallGenericMethod.%T.loc29_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Generic.facet.680) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F.1(@CallGenericMethod.%T.loc29_22.2, @CallGenericMethod.%Generic.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallGenericMethod(constants.%GenericParam, constants.%Generic.facet.8ff) {
 // CHECK:STDOUT:   %T.loc29_22.2 => constants.%GenericParam
 // CHECK:STDOUT:   %Generic.type.loc29_45.2 => constants.%Generic.type.769

+ 0 - 26
toolchain/check/testdata/function/generic/deduce.carbon

@@ -382,8 +382,6 @@ fn F() {
 // CHECK:STDOUT:   %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.c0a
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ExplicitGenericParam(%T.loc4_25.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ExplicitGenericParam(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_25.2 => constants.%i32
 // CHECK:STDOUT:   %ptr.loc4_39.2 => constants.%ptr.235
@@ -411,8 +409,6 @@ fn F() {
 // CHECK:STDOUT:   %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn.6ad
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamWithGenericArg.%struct_type.a.loc10_62.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_deduce_explicit_non_constant.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -526,14 +522,10 @@ fn F() {
 // CHECK:STDOUT:   %ExplicitGenericParam.specific_fn.loc4_50.2 => constants.%ExplicitGenericParam.specific_fn
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ExplicitGenericParam(%T.loc4_25.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallExplicitGenericParamConst(constants.%T) {
 // CHECK:STDOUT:   %T.loc6_34.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ExplicitGenericParam(@CallExplicitGenericParamConst.%T.loc6_34.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- explicit_vs_deduced.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -665,8 +657,6 @@ fn F() {
 // CHECK:STDOUT:   %ExplicitAndAlsoDeduced.specific_fn.loc7_10.2 => constants.%ExplicitAndAlsoDeduced.specific_fn.41d
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(%T.loc6_27.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ExplicitAndAlsoDeduced(constants.%A) {
 // CHECK:STDOUT:   %T.loc6_27.2 => constants.%A
 // CHECK:STDOUT:   %pattern_type.loc6_37 => constants.%pattern_type.c10
@@ -805,8 +795,6 @@ fn F() {
 // CHECK:STDOUT:   %ImplicitGenericParam.specific_fn.loc4_56.2 => constants.%ImplicitGenericParam.specific_fn.fc1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitGenericParam(%T.loc4_25.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitGenericParam(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_25.2 => constants.%i32
 // CHECK:STDOUT:   %pattern_type.loc4_35 => constants.%pattern_type.7ce
@@ -1773,10 +1761,6 @@ fn F() {
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @DD(@impl.266.%E.loc9_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.266(%E.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CC(constants.%D) {
 // CHECK:STDOUT:   %D.loc11_10.2 => constants.%D
 // CHECK:STDOUT: }
@@ -1794,12 +1778,6 @@ fn F() {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness.b58
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @DD(@impl.497.%E.loc12_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @CC(@impl.497.%Z.facet.loc12_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.497(%E.loc12_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @DD(constants.%EE) {
 // CHECK:STDOUT:   %E.loc8_10.2 => constants.%EE
 // CHECK:STDOUT: }
@@ -2047,10 +2025,6 @@ fn F() {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness.741
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @CC(@impl.562.%Y.facet.loc19_29.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.562(%E.loc19_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CC(constants.%Y.facet.268) {
 // CHECK:STDOUT:   %D.loc12_10.2 => constants.%Y.facet.268
 // CHECK:STDOUT: }

+ 0 - 8
toolchain/check/testdata/function/generic/min_prelude/call.carbon

@@ -254,8 +254,6 @@ fn CallSpecific(x: C) -> C {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Function(@CallGeneric.%T.loc8_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) {
 // CHECK:STDOUT:   %T.loc12_19.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc12_33.2 => constants.%ptr.79f
@@ -270,8 +268,6 @@ fn CallSpecific(x: C) -> C {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.6e5
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Function(@CallGenericPtr.%ptr.loc12_33.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Function(constants.%C) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%C
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.c48
@@ -475,8 +471,6 @@ fn CallSpecific(x: C) -> C {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Function(@CallGeneric.%T.loc8_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @CallGenericPtr(constants.%T) {
 // CHECK:STDOUT:   %T.loc12_19.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc12_33.2 => constants.%ptr.79f
@@ -491,8 +485,6 @@ fn CallSpecific(x: C) -> C {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.6e5
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Function(@CallGenericPtr.%ptr.loc12_33.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Function(constants.%C) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%C
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.c48

+ 0 - 4
toolchain/check/testdata/function/generic/no_prelude/import_specific.carbon

@@ -101,8 +101,6 @@ fn H() {
 // CHECK:STDOUT:   %T.loc7_6.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(@G.%T.loc7_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- user.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -196,8 +194,6 @@ fn H() {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(@G.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @G(constants.%C) {
 // CHECK:STDOUT:   %T => constants.%C
 // CHECK:STDOUT:

+ 0 - 2
toolchain/check/testdata/function/generic/redeclare.carbon

@@ -171,8 +171,6 @@ fn F(U:! type, T:! type) -> U* {
 // CHECK:STDOUT:   %F.specific_fn.loc7_10.2 => constants.%F.specific_fn
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc4_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_different_return_type.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {

+ 0 - 6
toolchain/check/testdata/function/generic/return_slot.carbon

@@ -236,12 +236,6 @@ fn G() {
 // CHECK:STDOUT:   %Make.specific_fn.loc12_27.2 => constants.%Make.specific_fn.bf1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Wrap(%T.loc11_12.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Wrap(@Make.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Make(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Wrap(constants.%i32) {
 // CHECK:STDOUT:   %T.loc11_12.2 => constants.%i32
 // CHECK:STDOUT:

+ 0 - 8
toolchain/check/testdata/generic/call_basic_depth.carbon

@@ -341,19 +341,11 @@ fn M() {
 // CHECK:STDOUT:   %F.specific_fn.loc21_3.2 => constants.%F.specific_fn.ef1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(@H.%T.loc19_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @G(constants.%T) {
 // CHECK:STDOUT:   %T.loc25_6.2 => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @H(@G.%T.loc25_6.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(@G.%T.loc25_6.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Cfn(@G.%T.loc25_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%i32) {
 // CHECK:STDOUT:   %T.loc16_6.2 => constants.%i32
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7ce

+ 0 - 2
toolchain/check/testdata/generic/complete_type.carbon

@@ -178,8 +178,6 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %T.loc6_9.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(%T.loc6_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @A(constants.%B) {
 // CHECK:STDOUT:   %T.loc6_9.2 => constants.%B
 // CHECK:STDOUT:

+ 0 - 4
toolchain/check/testdata/generic/dependent_param.carbon

@@ -226,10 +226,6 @@ var n: i32 = Outer(i32).Inner(42).Get();
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Inner(%T, %U.loc5_15.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Outer(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Outer(constants.%i32) {
 // CHECK:STDOUT:   %T.loc4_13.2 => constants.%i32
 // CHECK:STDOUT:

+ 0 - 2
toolchain/check/testdata/generic/local.carbon

@@ -174,8 +174,6 @@ class C(C:! type) {
 // CHECK:STDOUT:   %T.loc5_11.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(%T.loc5_11.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%i32) {
 // CHECK:STDOUT:   %T.loc5_11.2 => constants.%i32
 // CHECK:STDOUT:

+ 6 - 25
toolchain/check/testdata/generic/template_dependence.carbon

@@ -113,10 +113,8 @@ fn F(template T:! type, U:! type) -> (T, U) {
 // CHECK:STDOUT:   %pattern_type.65c: type = pattern_type %tuple.type.30b [template]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
-// CHECK:STDOUT:   %require_complete.fe1: <witness> = require_complete_type %tuple.type.30b [template]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %tuple.type.30b [template]
 // CHECK:STDOUT:   %F.specific_fn: <specific function> = specific_function %F, @F(%T, %U) [template]
-// CHECK:STDOUT:   %require_complete.4ae: <witness> = require_complete_type %T [template]
-// CHECK:STDOUT:   %require_complete.b54: <witness> = require_complete_type %U [symbolic]
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: imports {
@@ -156,10 +154,8 @@ fn F(template T:! type, U:! type) -> (T, U) {
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %tuple.type [template = %pattern_type (constants.%pattern_type.65c)]
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete.loc4: <witness> = require_complete_type %tuple.type [template = %require_complete.loc4 (constants.%require_complete.fe1)]
+// CHECK:STDOUT:   %require_complete: <witness> = require_complete_type %tuple.type [template = %require_complete (constants.%require_complete)]
 // CHECK:STDOUT:   %F.specific_fn.loc5_10.2: <specific function> = specific_function constants.%F, @F(%T.loc4_15.2, %U.loc4_25.2) [template = %F.specific_fn.loc5_10.2 (constants.%F.specific_fn)]
-// CHECK:STDOUT:   %require_complete.loc5_16.1: <witness> = require_complete_type %T.loc4_15.2 [template = %require_complete.loc5_16.1 (constants.%require_complete.4ae)]
-// CHECK:STDOUT:   %require_complete.loc5_16.2: <witness> = require_complete_type %U.loc4_25.2 [symbolic = %require_complete.loc5_16.2 (constants.%require_complete.b54)]
 // CHECK:STDOUT:
 // CHECK:STDOUT:   fn() -> %return.param: @F.%tuple.type (%tuple.type.30b) {
 // CHECK:STDOUT:   !entry:
@@ -167,20 +163,9 @@ fn F(template T:! type, U:! type) -> (T, U) {
 // CHECK:STDOUT:     %T.ref.loc5: type = name_ref T, %T.loc4_15.1 [template = %T.loc4_15.2 (constants.%T)]
 // CHECK:STDOUT:     %U.ref.loc5: type = name_ref U, %U.loc4_25.1 [symbolic = %U.loc4_25.2 (constants.%U)]
 // CHECK:STDOUT:     %F.specific_fn.loc5_10.1: <specific function> = specific_function %F.ref, @F(constants.%T, constants.%U) [template = %F.specific_fn.loc5_10.2 (constants.%F.specific_fn)]
-// CHECK:STDOUT:     %.loc5_16.1: ref @F.%tuple.type (%tuple.type.30b) = temporary_storage
-// CHECK:STDOUT:     %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc5_10.1() to %.loc5_16.1
-// CHECK:STDOUT:     %.loc5_16.2: ref @F.%tuple.type (%tuple.type.30b) = temporary %.loc5_16.1, %F.call
-// CHECK:STDOUT:     %tuple.elem0.loc5_16.1: ref @F.%T.loc4_15.2 (%T) = tuple_access %.loc5_16.2, element0
-// CHECK:STDOUT:     %.loc5_16.3: @F.%T.loc4_15.2 (%T) = bind_value %tuple.elem0.loc5_16.1
-// CHECK:STDOUT:     %tuple.elem0.loc5_16.2: ref @F.%T.loc4_15.2 (%T) = tuple_access %return, element0
-// CHECK:STDOUT:     %.loc5_16.4: init @F.%T.loc4_15.2 (%T) = initialize_from %.loc5_16.3 to %tuple.elem0.loc5_16.2
-// CHECK:STDOUT:     %tuple.elem1.loc5_16.1: ref @F.%U.loc4_25.2 (%U) = tuple_access %.loc5_16.2, element1
-// CHECK:STDOUT:     %.loc5_16.5: @F.%U.loc4_25.2 (%U) = bind_value %tuple.elem1.loc5_16.1
-// CHECK:STDOUT:     %tuple.elem1.loc5_16.2: ref @F.%U.loc4_25.2 (%U) = tuple_access %return, element1
-// CHECK:STDOUT:     %.loc5_16.6: init @F.%U.loc4_25.2 (%U) = initialize_from %.loc5_16.5 to %tuple.elem1.loc5_16.2
-// CHECK:STDOUT:     %.loc5_16.7: init @F.%tuple.type (%tuple.type.30b) = tuple_init (%.loc5_16.4, %.loc5_16.6) to %return
-// CHECK:STDOUT:     %.loc5_17: init @F.%tuple.type (%tuple.type.30b) = converted %F.call, %.loc5_16.7
-// CHECK:STDOUT:     return %.loc5_17 to %return
+// CHECK:STDOUT:     %.loc4_35: ref @F.%tuple.type (%tuple.type.30b) = splice_block %return {}
+// CHECK:STDOUT:     %F.call: init @F.%tuple.type (%tuple.type.30b) = call %F.specific_fn.loc5_10.1() to %.loc4_35
+// CHECK:STDOUT:     return %F.call to %return
 // CHECK:STDOUT:   }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
@@ -191,11 +176,7 @@ fn F(template T:! type, U:! type) -> (T, U) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.65c
 // CHECK:STDOUT:
 // CHECK:STDOUT: !definition:
-// CHECK:STDOUT:   %require_complete.loc4 => constants.%require_complete.fe1
+// CHECK:STDOUT:   %require_complete => constants.%require_complete
 // CHECK:STDOUT:   %F.specific_fn.loc5_10.2 => constants.%F.specific_fn
-// CHECK:STDOUT:   %require_complete.loc5_16.1 => constants.%require_complete.4ae
-// CHECK:STDOUT:   %require_complete.loc5_16.2 => constants.%require_complete.b54
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @F(%T.loc4_15.2, %U.loc4_25.2) {}
-// CHECK:STDOUT:

+ 1 - 1
toolchain/check/testdata/if_expr/fail_not_in_function.carbon

@@ -152,7 +152,7 @@ fn F() {
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT: class @B {
-// CHECK:STDOUT:   %C.ref: %C.type = name_ref C, <unexpected>.inst21.loc4_24 [concrete = constants.%C.generic]
+// CHECK:STDOUT:   %C.ref: %C.type = name_ref C, <unexpected>.inst22.loc4_24 [concrete = constants.%C.generic]
 // CHECK:STDOUT:   %true: bool = bool_literal true [concrete = constants.%true]
 // CHECK:STDOUT:   if %true br !if.expr.then else br !if.expr.else
 // CHECK:STDOUT:   complete_type_witness = invalid

+ 0 - 4
toolchain/check/testdata/impl/assoc_const_self.carbon

@@ -695,10 +695,6 @@ fn CallF() {
 // CHECK:STDOUT:   %require_complete => constants.%require_complete
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@V.%N) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%N.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%int_-1) {
 // CHECK:STDOUT:   %N.loc4_13.2 => constants.%int_-1
 // CHECK:STDOUT:

+ 0 - 18
toolchain/check/testdata/impl/extend_impl_generic.carbon

@@ -306,8 +306,6 @@ class X(U:! type) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(%T.loc4_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @HasF(constants.%Param) {
 // CHECK:STDOUT:   %T.loc4_16.2 => constants.%Param
 // CHECK:STDOUT:
@@ -539,10 +537,6 @@ class X(U:! type) {
 // CHECK:STDOUT:   %pattern_type.loc5_20 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @X(constants.%U) {
 // CHECK:STDOUT:   %U.loc8_9.2 => constants.%U
 // CHECK:STDOUT:
@@ -575,12 +569,6 @@ class X(U:! type) {
 // CHECK:STDOUT:   %F => constants.%F.b02
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(@impl.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%U) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%U) {
 // CHECK:STDOUT:   %U => constants.%U
 // CHECK:STDOUT:   %X => constants.%X
@@ -590,10 +578,6 @@ class X(U:! type) {
 // CHECK:STDOUT:   %pattern_type.loc10_22 => constants.%pattern_type.7dcd0a.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @X(@F.2.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.2.%U) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%U, constants.%I.facet) {
 // CHECK:STDOUT:   %T => constants.%U
 // CHECK:STDOUT:   %I.type => constants.%I.type.325e65.2
@@ -603,5 +587,3 @@ class X(U:! type) {
 // CHECK:STDOUT:   %pattern_type.loc5_20 => constants.%pattern_type.7dcd0a.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@X.%U.loc8_9.2) {}
-// CHECK:STDOUT:

+ 0 - 6
toolchain/check/testdata/impl/fail_extend_impl_forall.carbon

@@ -186,8 +186,6 @@ class C {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @GenericInterface(%T.loc11_28.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl(constants.%T) {
 // CHECK:STDOUT:   %T.loc20_23.2 => constants.%T
 // CHECK:STDOUT:   %GenericInterface.type.loc20_54.2 => constants.%GenericInterface.type.3fe
@@ -199,10 +197,6 @@ class C {
 // CHECK:STDOUT:   %F => constants.%F.4b1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @GenericInterface(@impl.%T.loc20_23.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc20_23.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc

+ 0 - 4
toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon

@@ -97,7 +97,3 @@ interface I {
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@impl.%Self) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%Self) {}
-// CHECK:STDOUT:

+ 0 - 2
toolchain/check/testdata/impl/fail_self_type_mismatch.carbon

@@ -235,8 +235,6 @@ impl i32 as I {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.4fb
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(constants.%I.type, @F.1.%Self) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%I.type, constants.%I.facet.e8a) {
 // CHECK:STDOUT:   %T.loc11_9.2 => constants.%I.type
 // CHECK:STDOUT:   %X.loc11_19.2 => constants.%I.facet.e8a

+ 0 - 2
toolchain/check/testdata/impl/impl_forall.carbon

@@ -110,8 +110,6 @@ impl forall [T:! type] T as Simple {
 // CHECK:STDOUT:   %F => constants.%F.4c3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc15_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%Simple.facet) {}

+ 0 - 28
toolchain/check/testdata/impl/lookup/generic.carbon

@@ -288,8 +288,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %F => constants.%F.c98
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -507,8 +505,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %F => constants.%F.c98
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -740,18 +736,12 @@ fn G(x: A) {
 // CHECK:STDOUT:   %F => constants.%F.92a
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@impl.%T.loc10_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc10_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %C => constants.%C.f2e
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.e5e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.2.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%HasF.facet.766) {
 // CHECK:STDOUT:   %Self => constants.%HasF.facet.766
 // CHECK:STDOUT:   %Self.as_type.loc5_14.1 => constants.%C.f2e
@@ -984,10 +974,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.dfb
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(@F.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(%T.loc4_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_14.2 => constants.%T
 // CHECK:STDOUT:   %HasF.type.loc8_36.2 => constants.%HasF.type.901
@@ -999,10 +985,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %F => constants.%F.008
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(@impl.%T.loc8_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%HasF.facet.566) {
@@ -1196,8 +1178,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %F => constants.%F.9b8
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc12_14.2, %U.loc12_24.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T, constants.%U) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -1417,10 +1397,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.dfb
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(@F.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(%T.loc4_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_14.2 => constants.%T
 // CHECK:STDOUT:   %HasF.type.loc8_35.2 => constants.%HasF.type.901
@@ -1432,10 +1408,6 @@ fn G(x: A) {
 // CHECK:STDOUT:   %F => constants.%F.f30
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @HasF(@impl.%T.loc8_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc

+ 0 - 14
toolchain/check/testdata/impl/lookup/min_prelude/canonical_query_self.carbon

@@ -480,8 +480,6 @@ fn G() {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.f92(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T.8b3) {
 // CHECK:STDOUT:   %T => constants.%T.8b3
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -516,8 +514,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a4f
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @JJ.1(@F.%J.facet.loc25_33.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @II.1(constants.%I.facet.98f) {
 // CHECK:STDOUT:   %Self => constants.%I.facet.98f
 // CHECK:STDOUT:   %Self.as_type.loc15_15.1 => constants.%C
@@ -824,10 +820,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc13_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -841,10 +833,6 @@ fn G() {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
 // CHECK:STDOUT:   %Self => constants.%Self.e44
 // CHECK:STDOUT:   %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
@@ -856,8 +844,6 @@ fn G() {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2

+ 0 - 20
toolchain/check/testdata/impl/lookup/min_prelude/impl_forall.carbon

@@ -404,8 +404,6 @@ fn TestSpecific(a: A({})) -> {} {
 // CHECK:STDOUT:   %T.loc3_9.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(%T.loc3_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%U) {
 // CHECK:STDOUT:   %U.loc7_13.2 => constants.%U
 // CHECK:STDOUT: }
@@ -419,10 +417,6 @@ fn TestSpecific(a: A({})) -> {} {
 // CHECK:STDOUT:   %pattern_type.loc8_22 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.1.%U) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%U.loc7_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @A(constants.%V) {
 // CHECK:STDOUT:   %T.loc3_9.2 => constants.%V
 // CHECK:STDOUT:
@@ -458,12 +452,6 @@ fn TestSpecific(a: A({})) -> {} {
 // CHECK:STDOUT:   %F => constants.%F.d6ae34.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(@impl.%V.loc11_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.%V.loc11_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%V.loc11_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.2(constants.%V) {
 // CHECK:STDOUT:   %V => constants.%V
 // CHECK:STDOUT:   %A => constants.%A.13025a.2
@@ -471,8 +459,6 @@ fn TestSpecific(a: A({})) -> {} {
 // CHECK:STDOUT:   %pattern_type.loc12_22 => constants.%pattern_type.7dcd0a.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(@F.2.%V) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%V, constants.%I.facet.de3) {
 // CHECK:STDOUT:   %U => constants.%V
 // CHECK:STDOUT:   %I.type => constants.%I.type.325e65.2
@@ -500,8 +486,6 @@ fn TestSpecific(a: A({})) -> {} {
 // CHECK:STDOUT:   %pattern_type.loc17_35 => constants.%pattern_type.7dcd0a.3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @A(@TestGeneric.%W.loc17_16.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%W) {
 // CHECK:STDOUT:   %U.loc7_13.2 => constants.%W
 // CHECK:STDOUT:
@@ -535,10 +519,6 @@ fn TestSpecific(a: A({})) -> {} {
 // CHECK:STDOUT:   %pattern_type.loc8_22 => constants.%pattern_type.7dcd0a.3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@TestGeneric.%W.loc17_16.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @F.1(@TestGeneric.%W.loc17_16.2, @TestGeneric.%I.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @A(constants.%empty_struct_type) {
 // CHECK:STDOUT:   %T.loc3_9.2 => constants.%empty_struct_type
 // CHECK:STDOUT:

+ 21 - 25
toolchain/check/testdata/impl/lookup/min_prelude/import.carbon

@@ -385,7 +385,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C]
 // CHECK:STDOUT:   %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
 // CHECK:STDOUT:   %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.import_ref.c63 = import_ref PackageA//default, loc5_21, unloaded
@@ -613,7 +613,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C]
 // CHECK:STDOUT:   %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
 // CHECK:STDOUT:   %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0]
@@ -736,7 +736,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D]
 // CHECK:STDOUT:   %PackageB.import_ref.8f2: <witness> = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageB.import_ref.cab = import_ref PackageB//default, inst44 [no loc], unloaded
+// CHECK:STDOUT:   %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.HasF: type = import_ref PackageA//default, HasF, loaded [concrete = constants.%HasF.type]
 // CHECK:STDOUT:   %PackageA.import_ref.28c = import_ref PackageA//default, inst19 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.import_ref.b36: %HasF.assoc_type = import_ref PackageA//default, loc5_21, loaded [concrete = constants.%assoc0]
@@ -745,7 +745,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %PackageA.import_ref.e73: %HasF.type = import_ref PackageA//default, inst19 [no loc], loaded [symbolic = constants.%Self.cf3]
 // CHECK:STDOUT:   %PackageA.import_ref.5cd = import_ref PackageA//default, loc11_16, unloaded
 // CHECK:STDOUT:   %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %PackageA.import_ref.29a: type = import_ref PackageA//default, loc11_6, loaded [concrete = constants.%C]
 // CHECK:STDOUT:   %PackageA.import_ref.e8c: type = import_ref PackageA//default, loc11_11, loaded [concrete = constants.%HasF.type]
 // CHECK:STDOUT:   %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded
@@ -904,7 +904,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %PackageA.C: type = import_ref PackageA//default, C, loaded [concrete = constants.%C]
 // CHECK:STDOUT:   %PackageA.import_ref.8f2: <witness> = import_ref PackageA//default, loc8_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %PackageA.import_ref.2c4 = import_ref PackageA//default, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type]
 // CHECK:STDOUT:   %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0]
@@ -922,7 +922,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type]
 // CHECK:STDOUT:   %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.8f2: <witness> = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageB.import_ref.cab = import_ref PackageB//default, inst44 [no loc], unloaded
+// CHECK:STDOUT:   %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D]
 // CHECK:STDOUT:   %PackageB.import_ref.831: type = import_ref PackageB//default, loc18_19, loaded [concrete = constants.%HasF.type]
 // CHECK:STDOUT:   %PackageB.import_ref.569 = import_ref PackageB//default, loc23_16, unloaded
@@ -1069,7 +1069,7 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   }
 // CHECK:STDOUT:   %PackageB.D: type = import_ref PackageB//default, D, loaded [concrete = constants.%D]
 // CHECK:STDOUT:   %PackageB.import_ref.8f2: <witness> = import_ref PackageB//default, loc10_10, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageB.import_ref.cab = import_ref PackageB//default, inst44 [no loc], unloaded
+// CHECK:STDOUT:   %PackageB.import_ref.cab = import_ref PackageB//default, inst45 [no loc], unloaded
 // CHECK:STDOUT:   %PackageB.HasG: type = import_ref PackageB//default, HasG, loaded [concrete = constants.%HasG.type]
 // CHECK:STDOUT:   %PackageB.import_ref.5d8 = import_ref PackageB//default, inst21 [no loc], unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.6c2: %HasG.assoc_type = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%assoc0]
@@ -1077,12 +1077,12 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %PackageB.import_ref.70a: %G.type.d9e = import_ref PackageB//default, loc7_21, loaded [concrete = constants.%G.cd6]
 // CHECK:STDOUT:   %PackageB.import_ref.ef5: %HasG.type = import_ref PackageB//default, inst21 [no loc], loaded [symbolic = constants.%Self.fcb]
 // CHECK:STDOUT:   %PackageB.import_ref.ea7 = import_ref PackageB//default, loc13_25, unloaded
-// CHECK:STDOUT:   %PackageB.import_ref.8db: <witness> = import_ref PackageB//default, inst53 [indirect], loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %PackageB.import_ref.6a9 = import_ref PackageB//default, inst54 [indirect], unloaded
+// CHECK:STDOUT:   %PackageB.import_ref.8db: <witness> = import_ref PackageB//default, inst54 [indirect], loaded [concrete = constants.%complete_type]
+// CHECK:STDOUT:   %PackageB.import_ref.6a9 = import_ref PackageB//default, inst55 [indirect], unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.dfb: type = import_ref PackageB//default, loc13_14, loaded [concrete = constants.%C]
 // CHECK:STDOUT:   %PackageB.import_ref.cee586.1: type = import_ref PackageB//default, loc13_20, loaded [concrete = constants.%HasG.type]
-// CHECK:STDOUT:   %PackageB.import_ref.96f = import_ref PackageB//default, inst79 [indirect], unloaded
-// CHECK:STDOUT:   %PackageB.import_ref.a0b = import_ref PackageB//default, inst80 [indirect], unloaded
+// CHECK:STDOUT:   %PackageB.import_ref.96f = import_ref PackageB//default, inst80 [indirect], unloaded
+// CHECK:STDOUT:   %PackageB.import_ref.a0b = import_ref PackageB//default, inst81 [indirect], unloaded
 // CHECK:STDOUT:   %PackageB.F = import_ref PackageB//default, F, unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.5ba = import_ref PackageB//default, loc18_25, unloaded
 // CHECK:STDOUT:   %PackageB.import_ref.aa9f8a.1: type = import_ref PackageB//default, loc18_6, loaded [concrete = constants.%D]
@@ -1687,8 +1687,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %U.loc6_28.2 => constants.%U
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @GenericInterface(%U.loc6_28.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @AnyParam(constants.%T, constants.%X) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %X => constants.%X
@@ -1894,8 +1892,6 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %U => constants.%U
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @GenericInterface(%U) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @AnyParam(constants.%GenericInterface.type.0da, constants.%GenericInterface.generic) {
 // CHECK:STDOUT:   %T => constants.%GenericInterface.type.0da
 // CHECK:STDOUT:   %X => constants.%GenericInterface.generic
@@ -2608,21 +2604,21 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %HasExtraInterfaces.C: %C.type = import_ref HasExtraInterfaces//default, C, loaded [concrete = constants.%C.generic]
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.5ab: type = import_ref HasExtraInterfaces//default, loc13_9, loaded [symbolic = @C.%T (constants.%T)]
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.8f2: <witness> = import_ref HasExtraInterfaces//default, loc13_20, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst58 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.4c0 = import_ref HasExtraInterfaces//default, inst66 [no loc], unloaded
 // CHECK:STDOUT:   %HasExtraInterfaces.I: type = import_ref HasExtraInterfaces//default, I, loaded [concrete = constants.%I.type]
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst65 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.e5d = import_ref HasExtraInterfaces//default, inst73 [no loc], unloaded
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.be9: %I.assoc_type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%assoc0]
 // CHECK:STDOUT:   %HasExtraInterfaces.F = import_ref HasExtraInterfaces//default, F, unloaded
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.d54: %F.type = import_ref HasExtraInterfaces//default, loc14_33, loaded [concrete = constants.%F]
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst65 [no loc], loaded [symbolic = constants.%Self.013]
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.1db: %I.type = import_ref HasExtraInterfaces//default, inst73 [no loc], loaded [symbolic = constants.%Self.013]
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.bca = import_ref HasExtraInterfaces//default, loc16_79, unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst47 [no loc], unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst43 [no loc], unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst39 [no loc], unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst35 [no loc], unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst31 [no loc], unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst27 [no loc], unloaded
-// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst23 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.9c8 = import_ref HasExtraInterfaces//default, inst54 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.dfe = import_ref HasExtraInterfaces//default, inst49 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.6b6 = import_ref HasExtraInterfaces//default, inst44 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.576 = import_ref HasExtraInterfaces//default, inst39 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.0dd = import_ref HasExtraInterfaces//default, inst34 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.f83 = import_ref HasExtraInterfaces//default, inst29 [no loc], unloaded
+// CHECK:STDOUT:   %HasExtraInterfaces.import_ref.975 = import_ref HasExtraInterfaces//default, inst24 [no loc], unloaded
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.a3c = import_ref HasExtraInterfaces//default, inst19 [no loc], unloaded
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.aa8: type = import_ref HasExtraInterfaces//default, loc16_72, loaded [concrete = constants.%C.074]
 // CHECK:STDOUT:   %HasExtraInterfaces.import_ref.301: type = import_ref HasExtraInterfaces//default, loc16_77, loaded [concrete = constants.%I.type]

+ 0 - 48
toolchain/check/testdata/impl/lookup/min_prelude/specialization_with_symbolic_rewrite.carbon

@@ -345,8 +345,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Self.2bc) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Z(%T.loc3_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Z(constants.%S) {
 // CHECK:STDOUT:   %T.loc3_13.2 => constants.%S
 // CHECK:STDOUT:
@@ -375,10 +373,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness.d59
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Z(@impl.119.%S.loc9_24.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.119(%T.loc9_14.2, %S.loc9_24.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Z(constants.%C) {
 // CHECK:STDOUT:   %T.loc3_13.2 => constants.%C
 // CHECK:STDOUT:
@@ -398,8 +392,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness.093
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.62c(%T.loc11_20.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%T.62d) {
 // CHECK:STDOUT:   %T.loc13_6.2 => constants.%T.62d
 // CHECK:STDOUT:   %T.as_type.loc13_19.2 => constants.%T.as_type
@@ -417,8 +409,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @X(constants.%C, constants.%Z.facet.2aa) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.62c(@F.%T.as_type.loc13_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_nonfinal_specialized_symbolic_rewrite.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -800,8 +790,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @X(constants.%T.8b3, constants.%Self.2bc) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Z(%T.loc3_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Z(constants.%S) {
 // CHECK:STDOUT:   %T.loc3_13.2 => constants.%S
 // CHECK:STDOUT:
@@ -830,10 +818,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness.d59
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Z(@impl.119.%S.loc10_24.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.119(%T.loc10_14.2, %S.loc10_24.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Z(constants.%C) {
 // CHECK:STDOUT:   %T.loc3_13.2 => constants.%C
 // CHECK:STDOUT:
@@ -853,8 +837,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Z.impl_witness => constants.%Z.impl_witness.093
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.62c(%T.loc12_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F(constants.%T.62d) {
 // CHECK:STDOUT:   %T.loc14_6.2 => constants.%T.62d
 // CHECK:STDOUT:   %T.as_type.loc14_19.2 => constants.%T.as_type
@@ -867,10 +849,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62
@@ -897,15 +875,11 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.f92(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op(constants.%T.8b3) {
 // CHECK:STDOUT:   %T => constants.%T.8b3
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@F.%impl.elem0.loc22_11.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_impl_lookup.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1059,8 +1033,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Ptr.impl_witness => constants.%Ptr.impl_witness.e8ce81.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl(constants.%T) {
 // CHECK:STDOUT:   %U.loc7_20.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc7_54.2 => constants.%ptr.79f131.2
@@ -1082,8 +1054,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %pattern_type.loc9_26 => constants.%pattern_type.afe
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(@F.%T.loc9_6.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_access_type.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1245,8 +1215,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Ptr.impl_witness => constants.%Ptr.impl_witness.e8c
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl(constants.%T.as_type) {
 // CHECK:STDOUT:   %U.loc7_20.2 => constants.%T.as_type
 // CHECK:STDOUT:   %ptr.loc7_54.2 => constants.%ptr.900
@@ -1268,8 +1236,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %pattern_type.loc9_25 => constants.%pattern_type.a95
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(@F.%T.as_type.loc9_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- final_impl_rewrite_of_symbolic_through_facet_value.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1430,8 +1396,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %Ptr.impl_witness => constants.%Ptr.impl_witness.e8c
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%U.loc7_20.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl(constants.%T.as_type) {
 // CHECK:STDOUT:   %U.loc7_20.2 => constants.%T.as_type
 // CHECK:STDOUT:   %ptr.loc7_54.2 => constants.%ptr.900
@@ -1453,8 +1417,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %pattern_type.loc9_25 => constants.%pattern_type.a95
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(@F.%T.as_type.loc9_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/facet_types.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1733,10 +1695,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc13_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -1750,10 +1708,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
 // CHECK:STDOUT:   %Self => constants.%Self.e44
 // CHECK:STDOUT:   %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
@@ -1765,8 +1719,6 @@ fn F[T:! Ptr](var t: T) -> T.(Ptr.Type) {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2

+ 0 - 20
toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon

@@ -174,10 +174,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.4be
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T.loc4_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%T) {
 // CHECK:STDOUT:   %T.loc5_9.2 => constants.%T
 // CHECK:STDOUT: }
@@ -316,10 +312,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %I.type => constants.%I.type.325
@@ -495,10 +487,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %I.type => constants.%I.type.325
@@ -684,10 +672,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %I.type => constants.%I.type.325
@@ -896,10 +880,6 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); }
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@F.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @F.1(constants.%T, constants.%Self.209) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %I.type => constants.%I.type.325

+ 0 - 2
toolchain/check/testdata/impl/min_prelude/fail_extend_impl_scope.carbon

@@ -304,8 +304,6 @@ fn F() {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @Zero.2(constants.%Self) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.6b5(%Self) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Zero.1(constants.%Z.facet) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/destroy.carbon

+ 0 - 2
toolchain/check/testdata/impl/min_prelude/fail_impl_as_scope.carbon

@@ -461,8 +461,6 @@ class X {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a40
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.6b5(%Self) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Zero.1(constants.%Z.facet) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @Method.1(constants.%Z.facet) {

+ 0 - 28
toolchain/check/testdata/impl/min_prelude/forward_decls.carbon

@@ -558,8 +558,6 @@ interface I {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.f92(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -1264,8 +1262,6 @@ interface I {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @T(constants.%U, constants.%Self.209) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%U.loc3_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%C) {
 // CHECK:STDOUT:   %U.loc3_13.2 => constants.%C
 // CHECK:STDOUT:
@@ -1570,8 +1566,6 @@ interface I {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness.b7b
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.f92(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
@@ -2039,12 +2033,6 @@ interface I {
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@impl.%Self) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%Self) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.%Self) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_todo_impl_in_interface_definition_with_associated.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -2191,12 +2179,6 @@ interface I {
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@impl.%Self) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%Self) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@F.%Self) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/facet_types.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -2475,10 +2457,6 @@ interface I {
 // CHECK:STDOUT:   %pattern_type.loc10_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(@Convert.1.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @As(%Dest.loc9_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @ImplicitAs(constants.%Dest) {
 // CHECK:STDOUT:   %Dest.loc13_22.2 => constants.%Dest
 // CHECK:STDOUT: }
@@ -2492,10 +2470,6 @@ interface I {
 // CHECK:STDOUT:   %pattern_type.loc14_28 => constants.%pattern_type.7dcd0a.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.2.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc13_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Self.e44) {
 // CHECK:STDOUT:   %Self => constants.%Self.e44
 // CHECK:STDOUT:   %Self.as_type.loc18_15.1 => constants.%Self.as_type.560
@@ -2507,8 +2481,6 @@ interface I {
 // CHECK:STDOUT:   %BitAnd.impl_witness => constants.%BitAnd.impl_witness
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%T.loc21_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dcd0a.2

+ 0 - 20
toolchain/check/testdata/impl/min_prelude/generic_redeclaration.carbon

@@ -332,32 +332,24 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %Interface.impl_witness => constants.%Interface.impl_witness.a14
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.c3d(%T.loc11_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.793(constants.%T.ccd) {
 // CHECK:STDOUT:   %T.loc12_14.2 => constants.%T.ccd
 // CHECK:STDOUT:   %T.as_type.loc12_21.2 => constants.%T.as_type.3df
 // CHECK:STDOUT:   %Interface.impl_witness => constants.%Interface.impl_witness.608
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.793(%T.loc12_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.c93(constants.%T.09f) {
 // CHECK:STDOUT:   %T.loc13_14.2 => constants.%T.09f
 // CHECK:STDOUT:   %T.as_type.loc13_21.2 => constants.%T.as_type.037
 // CHECK:STDOUT:   %Interface.impl_witness => constants.%Interface.impl_witness.b9e
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.c93(%T.loc13_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.9e6(constants.%T.1d2) {
 // CHECK:STDOUT:   %T.loc14_14.2 => constants.%T.1d2
 // CHECK:STDOUT:   %T.as_type.loc14_21.2 => constants.%T.as_type.0ed
 // CHECK:STDOUT:   %Interface.impl_witness => constants.%Interface.impl_witness.e9d
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.9e6(%T.loc14_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -461,16 +453,12 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.a529f4.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.bfd509.1(%T.loc7_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.bfd509.2(constants.%T) {
 // CHECK:STDOUT:   %T.loc15_14.2 => constants.%T
 // CHECK:STDOUT:   %T.as_type.loc15_21.2 => constants.%T.as_type
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.a529f4.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.bfd509.2(%T.loc15_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- same_type_different_spelling.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -721,8 +709,6 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %A => constants.%A
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.2caff2.1(%T.loc4_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @A(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.2caff2.2(constants.%T) {
@@ -738,8 +724,6 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %D => constants.%D
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.2caff2.2(%T.loc15_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @B(constants.%T) {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @C(constants.%T) {
@@ -748,10 +732,6 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:
 // CHECK:STDOUT: specific @D(constants.%T) {}
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.2caff2.2(@D.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @C(@D.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- include_files/destroy.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: file {

+ 0 - 28
toolchain/check/testdata/impl/min_prelude/interface_args.carbon

@@ -200,10 +200,6 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %pattern_type.loc4_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- action.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -401,10 +397,6 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.8db
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Action(@Op.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Action(%T.loc4_18.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Action(constants.%B) {
 // CHECK:STDOUT:   %T.loc4_18.2 => constants.%B
 // CHECK:STDOUT:
@@ -595,10 +587,6 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %assoc0 => constants.%assoc0.8a8
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Action(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Action(@Op.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.e98) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Action.type => constants.%Action.type.cca
@@ -780,10 +768,6 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %assoc0 => constants.%assoc0.338
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Action(%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Action(@Op.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op(constants.%T, constants.%Self.e98) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Action.type => constants.%Action.type.cca
@@ -1019,10 +1003,6 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %pattern_type.loc8_27 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Factory(@Method.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @Factory(%T.loc4_19.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Factory(constants.%B) {
 // CHECK:STDOUT:   %T.loc4_19.2 => constants.%B
 // CHECK:STDOUT:
@@ -1289,15 +1269,11 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %assoc1 => constants.%assoc1.a48
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Factory(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Make.1(constants.%T, constants.%Self.9ba) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Factory(@Method.1.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Method.1(constants.%T, constants.%Self.9ba) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Factory.type => constants.%Factory.type.c96
@@ -1542,15 +1518,11 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT:   %assoc1 => constants.%assoc1.535
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Factory(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Make(constants.%T, constants.%Self.9ba) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Factory(@Method.%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Method(constants.%T, constants.%Self.9ba) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %Factory.type => constants.%Factory.type.c96

+ 0 - 12
toolchain/check/testdata/impl/no_prelude/compound.carbon

@@ -210,10 +210,6 @@ fn InstanceCallFail() {
 // CHECK:STDOUT:   %pattern_type.loc4_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- non-instance_success.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -457,10 +453,6 @@ fn InstanceCallFail() {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62
@@ -645,10 +637,6 @@ fn InstanceCallFail() {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62

+ 1 - 29
toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon

@@ -386,18 +386,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.fc7
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MyInt(@impl.%N.loc15_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%N.loc15_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%N) {
 // CHECK:STDOUT:   %N => constants.%N
 // CHECK:STDOUT:   %MyInt => constants.%MyInt
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a71
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MyInt(@Op.2.%N) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Add.facet.0e5) {
 // CHECK:STDOUT:   %Self => constants.%Add.facet.0e5
 // CHECK:STDOUT:   %Self.as_type.loc5_15.1 => constants.%MyInt
@@ -410,16 +404,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a71
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MyInt(@Double.%N.loc19_11.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.1(constants.%Add.facet.5a7) {
 // CHECK:STDOUT:   %Self => constants.%Add.facet.5a7
 // CHECK:STDOUT:   %Self.as_type.loc5_15.1 => constants.%MyInt
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a71
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Op.1(@Double.%Add.facet.loc20_11) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- use_generic_impl.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -476,7 +466,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %Main.Double: %Double.type = import_ref Main//generic_impl, Double, loaded [concrete = constants.%Double]
 // CHECK:STDOUT:   %Main.import_ref.f1e294.1: Core.IntLiteral = import_ref Main//generic_impl, loc11_13, loaded [symbolic = @MyInt.%N (constants.%N)]
 // CHECK:STDOUT:   %Main.import_ref.9e9: <witness> = import_ref Main//generic_impl, loc13_1, loaded [symbolic = @MyInt.%complete_type (constants.%complete_type.a87)]
-// CHECK:STDOUT:   %Main.import_ref.697 = import_ref Main//generic_impl, inst91 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.697 = import_ref Main//generic_impl, inst92 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.07c = import_ref Main//generic_impl, inst17 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.f99: %Add.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [concrete = constants.%assoc0]
 // CHECK:STDOUT:   %Main.Op = import_ref Main//generic_impl, Op, unloaded
@@ -678,12 +668,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %require_complete => constants.%require_complete.fc7
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MyInt(@impl.%N) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl(%N) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @MyInt(@Op.2.%N) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Op.2(constants.%N) {
 // CHECK:STDOUT:   %N => constants.%N
 // CHECK:STDOUT:   %MyInt => constants.%MyInt.09f
@@ -709,8 +693,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT: !definition:
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MyInt(@Double.%N) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Double(constants.%N) {
 // CHECK:STDOUT:   %N => constants.%N
 // CHECK:STDOUT:   %MyInt => constants.%MyInt.09f
@@ -723,8 +705,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %pattern_type => constants.%pattern_type.a71
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Op.1(@Double.%Add.facet) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Double(constants.%int_64) {
 // CHECK:STDOUT:   %N => constants.%int_64
 // CHECK:STDOUT:   %MyInt => constants.%MyInt.f30
@@ -1026,8 +1006,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %Make.specific_fn.loc9_52.2 => constants.%Make.specific_fn
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Make(%N.loc9_9.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @MakeFromClass(constants.%N.335) {
 // CHECK:STDOUT:   %N.loc18_18.2 => constants.%N.335
 // CHECK:STDOUT:   %ToLiteral.bound.loc18_40.2 => constants.%ToLiteral.bound
@@ -1040,8 +1018,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %MakeFromClass.specific_fn.loc18_63.2 => constants.%MakeFromClass.specific_fn
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MakeFromClass(%N.loc18_18.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- use_convert_symbolic.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -1221,8 +1197,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %Make.specific_fn => constants.%Make.specific_fn.8ec
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @Make(%N) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Make(constants.%int_64.f82) {
 // CHECK:STDOUT:   %N => constants.%int_64.f82
 // CHECK:STDOUT:   %int.convert_checked => constants.%int_64.fab
@@ -1246,8 +1220,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt);
 // CHECK:STDOUT:   %MakeFromClass.specific_fn => constants.%MakeFromClass.specific_fn.004
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @MakeFromClass(%N) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @MakeFromClass(constants.%int_64.06b) {
 // CHECK:STDOUT:   %N => constants.%int_64.06b
 // CHECK:STDOUT:   %ToLiteral.bound => constants.%ToLiteral.bound.735

+ 7 - 19
toolchain/check/testdata/impl/no_prelude/import_compound.carbon

@@ -198,10 +198,6 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %pattern_type.loc4_28 => constants.%pattern_type.7dc
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest.loc3_22.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- lib.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -383,7 +379,7 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %Main.import_ref.a26: <witness> = import_ref Main//lib, loc7_30, loaded [concrete = constants.%NonInstance.impl_witness]
 // CHECK:STDOUT:   %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i]
 // CHECK:STDOUT:   %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type]
-// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded
 // CHECK:STDOUT:   %Main.G = import_ref Main//lib, G, unloaded
 // CHECK:STDOUT:   %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded
@@ -509,7 +505,7 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded
 // CHECK:STDOUT:   %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i]
 // CHECK:STDOUT:   %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type]
-// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded
 // CHECK:STDOUT:   %Main.G = import_ref Main//lib, G, unloaded
 // CHECK:STDOUT:   %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded
@@ -613,10 +609,6 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62
@@ -699,7 +691,7 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %Main.import_ref.eb8 = import_ref Main//lib, loc7_30, unloaded
 // CHECK:STDOUT:   %Main.import_ref.c9a3b6.1: type = import_ref Main//lib, loc7_13, loaded [concrete = constants.%struct_type.i]
 // CHECK:STDOUT:   %Main.import_ref.ef5: type = import_ref Main//lib, loc7_18, loaded [concrete = constants.%NonInstance.type]
-// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.f09 = import_ref Main//lib, loc12_21, unloaded
 // CHECK:STDOUT:   %Main.G = import_ref Main//lib, G, unloaded
 // CHECK:STDOUT:   %Main.import_ref.a9f = import_ref Main//lib, loc15_27, unloaded
@@ -805,10 +797,6 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(%Dest) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @ImplicitAs(@Convert.%Dest) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @Convert(constants.%Dest, constants.%Self.519) {
 // CHECK:STDOUT:   %Dest => constants.%Dest
 // CHECK:STDOUT:   %ImplicitAs.type => constants.%ImplicitAs.type.d62
@@ -863,11 +851,11 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT: imports {
 // CHECK:STDOUT:   %Main.NonInstance = import_ref Main//lib, NonInstance, unloaded
 // CHECK:STDOUT:   %Main.Instance: type = import_ref Main//lib, Instance, loaded [concrete = constants.%Instance.type]
-// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0]
 // CHECK:STDOUT:   %Main.G = import_ref Main//lib, G, unloaded
 // CHECK:STDOUT:   %Main.import_ref.b4d: %G.type.1e1 = import_ref Main//lib, loc12_21, loaded [concrete = constants.%G.449]
-// CHECK:STDOUT:   %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst42 [no loc], loaded [symbolic = constants.%Self.cf8]
+// CHECK:STDOUT:   %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst43 [no loc], loaded [symbolic = constants.%Self.cf8]
 // CHECK:STDOUT:   %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded
 // CHECK:STDOUT:   %Main.F = import_ref Main//lib, F, unloaded
@@ -1008,11 +996,11 @@ fn InstanceCallImportFail() {
 // CHECK:STDOUT:   %Core: <namespace> = namespace file.%Core.import, [concrete] {
 // CHECK:STDOUT:     import Core//default
 // CHECK:STDOUT:   }
-// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst42 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.dcd = import_ref Main//lib, inst43 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.124: %Instance.assoc_type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%assoc0]
 // CHECK:STDOUT:   %Main.G = import_ref Main//lib, G, unloaded
 // CHECK:STDOUT:   %Main.import_ref.b4d: %G.type = import_ref Main//lib, loc12_21, loaded [concrete = constants.%G]
-// CHECK:STDOUT:   %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst42 [no loc], loaded [symbolic = constants.%Self.cf8]
+// CHECK:STDOUT:   %Main.import_ref.0d8: %Instance.type = import_ref Main//lib, inst43 [no loc], loaded [symbolic = constants.%Self.cf8]
 // CHECK:STDOUT:   %Main.import_ref.c55 = import_ref Main//lib, inst17 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.49c = import_ref Main//lib, loc4_9, unloaded
 // CHECK:STDOUT:   %Main.F = import_ref Main//lib, F, unloaded

+ 1 - 1
toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon

@@ -136,7 +136,7 @@ fn G(c: C) {
 // CHECK:STDOUT:   %Main.I = import_ref Main//extend_impl_library, I, unloaded
 // CHECK:STDOUT:   %Main.C: type = import_ref Main//extend_impl_library, C, loaded [concrete = constants.%C]
 // CHECK:STDOUT:   %Main.import_ref.8f2: <witness> = import_ref Main//extend_impl_library, loc12_1, loaded [concrete = constants.%complete_type]
-// CHECK:STDOUT:   %Main.import_ref.2c4 = import_ref Main//extend_impl_library, inst27 [no loc], unloaded
+// CHECK:STDOUT:   %Main.import_ref.2c4 = import_ref Main//extend_impl_library, inst28 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.3019d1.1: type = import_ref Main//extend_impl_library, loc9_18, loaded [concrete = constants.%I.type]
 // CHECK:STDOUT:   %Main.import_ref.e5d = import_ref Main//extend_impl_library, inst17 [no loc], unloaded
 // CHECK:STDOUT:   %Main.import_ref.c44: %I.assoc_type = import_ref Main//extend_impl_library, loc5_9, loaded [concrete = constants.%assoc0]

+ 0 - 72
toolchain/check/testdata/impl/no_prelude/import_generic.carbon

@@ -225,18 +225,12 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %Self.2 => constants.%Self.209
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T.loc5_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.084(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_14.2 => constants.%T
 // CHECK:STDOUT:   %I.type.loc8_32.2 => constants.%I.type.325
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.1a9
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.084.%T.loc8_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.084(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%ptr) {
 // CHECK:STDOUT:   %T.loc5_13.2 => constants.%ptr
 // CHECK:STDOUT:
@@ -253,10 +247,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.6ad
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.cd2.%ptr.loc12_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.cd2(%T.loc12_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_import_generic.impl.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -460,18 +450,12 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %Self => constants.%Self.209
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.08450a.1(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %I.type => constants.%I.type.325
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.1a9ed3.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.08450a.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.08450a.1(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @I(constants.%ptr) {
 // CHECK:STDOUT:   %T => constants.%ptr
 // CHECK:STDOUT:
@@ -488,20 +472,12 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.6ad3bf.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.cd2fdc.1.%ptr) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.cd2fdc.1(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.08450a.2(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_14.2 => constants.%T
 // CHECK:STDOUT:   %I.type.loc8_32.2 => constants.%I.type.325
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.1a9ed3.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.08450a.2.%T.loc8_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.08450a.2(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.08450a.3(constants.%T) {
 // CHECK:STDOUT:   %T.loc14_14.2 => constants.%T
 // CHECK:STDOUT:   %I.type.loc14_32.2 => constants.%I.type.325
@@ -509,10 +485,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.1a9ed3.3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.08450a.3.%T.loc14_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.08450a.3(%T.loc14_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.cd2fdc.2(constants.%T) {
 // CHECK:STDOUT:   %T.loc20_14.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc20_32.2 => constants.%ptr
@@ -520,10 +492,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.6ad3bf.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.cd2fdc.2.%ptr.loc20_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.cd2fdc.2(%T.loc20_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.cd2fdc.3(constants.%T) {
 // CHECK:STDOUT:   %T.loc26_14.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc26_32.2 => constants.%ptr
@@ -532,10 +500,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %I.impl_witness => constants.%I.impl_witness.6ad3bf.3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @I(@impl.cd2fdc.3.%ptr.loc26_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.cd2fdc.3(%T.loc26_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_import_generic_decl.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -636,18 +600,12 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %T.loc5_13.2 => constants.%T
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(%T.loc5_13.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.199(constants.%T) {
 // CHECK:STDOUT:   %T.loc11_14.2 => constants.%T
 // CHECK:STDOUT:   %J.type.loc11_32.2 => constants.%J.type.b72
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.809
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.199.%T.loc11_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.199(%T.loc11_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @J(constants.%ptr) {
 // CHECK:STDOUT:   %T.loc5_13.2 => constants.%ptr
 // CHECK:STDOUT: }
@@ -659,10 +617,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.5a8
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.dfd.%ptr.loc17_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.dfd(%T.loc17_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: --- fail_import_generic_decl.impl.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
@@ -852,18 +806,12 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %Self => constants.%Self.252
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.199bba.1(constants.%T) {
 // CHECK:STDOUT:   %T => constants.%T
 // CHECK:STDOUT:   %J.type => constants.%J.type.b72
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.80964e.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.199bba.1.%T) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.199bba.1(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @J(constants.%ptr) {
 // CHECK:STDOUT:   %T => constants.%ptr
 // CHECK:STDOUT:
@@ -879,20 +827,12 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.5a859e.1
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.dfd2f7.1.%ptr) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.dfd2f7.1(%T) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.199bba.2(constants.%T) {
 // CHECK:STDOUT:   %T.loc8_14.2 => constants.%T
 // CHECK:STDOUT:   %J.type.loc8_32.2 => constants.%J.type.b72
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.80964e.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.199bba.2.%T.loc8_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.199bba.2(%T.loc8_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.199bba.3(constants.%T) {
 // CHECK:STDOUT:   %T.loc14_14.2 => constants.%T
 // CHECK:STDOUT:   %J.type.loc14_32.2 => constants.%J.type.b72
@@ -900,10 +840,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.80964e.3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.199bba.3.%T.loc14_14.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.199bba.3(%T.loc14_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.dfd2f7.2(constants.%T) {
 // CHECK:STDOUT:   %T.loc20_14.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc20_32.2 => constants.%ptr
@@ -911,10 +847,6 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.5a859e.2
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.dfd2f7.2.%ptr.loc20_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.dfd2f7.2(%T.loc20_14.2) {}
-// CHECK:STDOUT:
 // CHECK:STDOUT: specific @impl.dfd2f7.3(constants.%T) {
 // CHECK:STDOUT:   %T.loc26_14.2 => constants.%T
 // CHECK:STDOUT:   %ptr.loc26_32.2 => constants.%ptr
@@ -923,7 +855,3 @@ impl forall [T:! type] D as J(T*) {}
 // CHECK:STDOUT:   %J.impl_witness => constants.%J.impl_witness.5a859e.3
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
-// CHECK:STDOUT: specific @J(@impl.dfd2f7.3.%ptr.loc26_32.2) {}
-// CHECK:STDOUT:
-// CHECK:STDOUT: specific @impl.dfd2f7.3(%T.loc26_14.2) {}
-// CHECK:STDOUT:

Некоторые файлы не были показаны из-за большого количества измененных файлов