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

Refactor AddBindingPattern into composable pieces (#6927)

This is part of some bigger changes in pattern matching, factored out
because it causes some test churn.

Assisted-by: Gemini 3.1 Pro via Antigravity
Geoff Romer 1 месяц назад
Родитель
Сommit
08148f3a3a
100 измененных файлов с 397 добавлено и 388 удалено
  1. 12 3
      toolchain/check/handle_binding_pattern.cpp
  2. 32 32
      toolchain/check/pattern.cpp
  3. 12 11
      toolchain/check/pattern.h
  4. 3 4
      toolchain/check/pattern_match.cpp
  5. 17 17
      toolchain/check/testdata/basics/raw_sem_ir/cpp_interop.carbon
  6. 42 42
      toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon
  7. 7 7
      toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon
  8. 1 1
      toolchain/check/testdata/choice/generic.carbon
  9. 1 1
      toolchain/check/testdata/class/destroy_calls.carbon
  10. 4 4
      toolchain/check/testdata/class/generic/adapt.carbon
  11. 3 3
      toolchain/check/testdata/class/generic/base_is_generic.carbon
  12. 1 1
      toolchain/check/testdata/class/generic/basic.carbon
  13. 9 9
      toolchain/check/testdata/class/generic/call.carbon
  14. 1 1
      toolchain/check/testdata/class/generic/complete_in_conversion.carbon
  15. 1 1
      toolchain/check/testdata/class/generic/field.carbon
  16. 3 3
      toolchain/check/testdata/class/generic/generic_vs_params.carbon
  17. 1 1
      toolchain/check/testdata/class/generic/import.carbon
  18. 2 2
      toolchain/check/testdata/class/generic/init.carbon
  19. 2 2
      toolchain/check/testdata/class/generic/member_inline.carbon
  20. 3 3
      toolchain/check/testdata/class/generic/member_out_of_line.carbon
  21. 2 2
      toolchain/check/testdata/class/generic/member_type.carbon
  22. 1 1
      toolchain/check/testdata/class/generic/method_deduce.carbon
  23. 10 10
      toolchain/check/testdata/class/generic/redeclare.carbon
  24. 1 1
      toolchain/check/testdata/class/generic/self.carbon
  25. 3 3
      toolchain/check/testdata/class/generic/stringify.carbon
  26. 1 1
      toolchain/check/testdata/class/method/generic_method.carbon
  27. 12 12
      toolchain/check/testdata/class/syntactic_merge.carbon
  28. 4 4
      toolchain/check/testdata/class/syntactic_merge_literal.carbon
  29. 16 16
      toolchain/check/testdata/class/virtual_modifiers.carbon
  30. 8 8
      toolchain/check/testdata/deduce/array.carbon
  31. 3 3
      toolchain/check/testdata/deduce/binding_pattern.carbon
  32. 4 4
      toolchain/check/testdata/deduce/generic_type.carbon
  33. 2 2
      toolchain/check/testdata/deduce/int_float.carbon
  34. 4 4
      toolchain/check/testdata/deduce/tuple.carbon
  35. 4 4
      toolchain/check/testdata/deduce/type_operator.carbon
  36. 4 4
      toolchain/check/testdata/deduce/value_with_type_through_access.carbon
  37. 3 3
      toolchain/check/testdata/facet/access.carbon
  38. 1 1
      toolchain/check/testdata/facet/call_combined_impl_witness.carbon
  39. 1 1
      toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon
  40. 4 4
      toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon
  41. 1 1
      toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon
  42. 8 8
      toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon
  43. 1 1
      toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon
  44. 1 1
      toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon
  45. 12 12
      toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon
  46. 2 2
      toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon
  47. 4 4
      toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon
  48. 1 1
      toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon
  49. 2 2
      toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon
  50. 2 2
      toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon
  51. 2 2
      toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon
  52. 2 2
      toolchain/check/testdata/facet/period_self.carbon
  53. 2 2
      toolchain/check/testdata/facet/require_import.carbon
  54. 1 1
      toolchain/check/testdata/facet/self_in_interface_param.carbon
  55. 2 2
      toolchain/check/testdata/for/actual.carbon
  56. 1 1
      toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon
  57. 1 1
      toolchain/check/testdata/function/definition/syntactic_merge.carbon
  58. 2 2
      toolchain/check/testdata/function/generic/call.carbon
  59. 2 2
      toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon
  60. 14 14
      toolchain/check/testdata/function/generic/deduce.carbon
  61. 2 2
      toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon
  62. 2 2
      toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon
  63. 1 1
      toolchain/check/testdata/function/generic/forward_decl.carbon
  64. 1 1
      toolchain/check/testdata/function/generic/import_specific.carbon
  65. 1 1
      toolchain/check/testdata/function/generic/param_in_type.carbon
  66. 4 4
      toolchain/check/testdata/function/generic/redeclare.carbon
  67. 1 1
      toolchain/check/testdata/function/generic/resolve_used.carbon
  68. 1 1
      toolchain/check/testdata/function/generic/return_slot.carbon
  69. 1 1
      toolchain/check/testdata/function/generic/template_param.carbon
  70. 1 1
      toolchain/check/testdata/function/generic/type_param.carbon
  71. 1 1
      toolchain/check/testdata/generic/call_basic_depth.carbon
  72. 3 3
      toolchain/check/testdata/generic/complete_type.carbon
  73. 1 1
      toolchain/check/testdata/generic/dependent_param.carbon
  74. 3 3
      toolchain/check/testdata/generic/dot_self_symbolic_type.carbon
  75. 3 3
      toolchain/check/testdata/generic/local.carbon
  76. 2 2
      toolchain/check/testdata/generic/template/convert.carbon
  77. 3 3
      toolchain/check/testdata/generic/template/member_access.carbon
  78. 3 3
      toolchain/check/testdata/generic/template/unimplemented.carbon
  79. 2 2
      toolchain/check/testdata/generic/template_dependence.carbon
  80. 2 2
      toolchain/check/testdata/impl/assoc_const_self.carbon
  81. 1 1
      toolchain/check/testdata/impl/compound.carbon
  82. 2 2
      toolchain/check/testdata/impl/error_recovery.carbon
  83. 2 2
      toolchain/check/testdata/impl/extend_impl_generic.carbon
  84. 1 1
      toolchain/check/testdata/impl/fail_extend_impl_forall.carbon
  85. 2 2
      toolchain/check/testdata/impl/fail_self_type_mismatch.carbon
  86. 3 3
      toolchain/check/testdata/impl/forward_decls.carbon
  87. 6 6
      toolchain/check/testdata/impl/generic_redeclaration.carbon
  88. 1 1
      toolchain/check/testdata/impl/impl_forall.carbon
  89. 2 2
      toolchain/check/testdata/impl/impl_thunk.carbon
  90. 5 5
      toolchain/check/testdata/impl/import_generic.carbon
  91. 3 3
      toolchain/check/testdata/impl/import_self_specific.carbon
  92. 1 1
      toolchain/check/testdata/impl/import_thunk.carbon
  93. 1 1
      toolchain/check/testdata/impl/import_use_generic.carbon
  94. 1 1
      toolchain/check/testdata/impl/incomplete.carbon
  95. 3 3
      toolchain/check/testdata/impl/interface_args.carbon
  96. 1 1
      toolchain/check/testdata/impl/lookup/canonical_query_self.carbon
  97. 6 6
      toolchain/check/testdata/impl/lookup/generic.carbon
  98. 1 1
      toolchain/check/testdata/impl/lookup/impl_forall.carbon
  99. 5 5
      toolchain/check/testdata/impl/lookup/import.carbon
  100. 4 4
      toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon

+ 12 - 3
toolchain/check/handle_binding_pattern.cpp

@@ -180,10 +180,19 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
   auto make_binding_pattern = [&]() -> SemIR::InstId {
     // TODO: Eventually the name will need to support associations with other
     // scopes, but right now we don't support qualified names here.
+    auto form_id = pattern_inst_kind == SemIR::FormBindingPattern::Kind
+                       ? context.constant_values().Get(type_expr.inst_id)
+                       : SemIR::ConstantId::None;
+    auto phase = BindingPhase::Runtime;
+    if (pattern_inst_kind == SemIR::SymbolicBindingPattern::Kind) {
+      phase = is_template ? BindingPhase::Template : BindingPhase::Symbolic;
+    }
     auto binding = AddBindingPattern(
-        context, name_node, name_id, type_expr.type_component_id,
-        context.constant_values().Get(type_expr.inst_id), type_expr_region_id,
-        pattern_inst_kind, is_template, is_unused);
+        context, name_node, type_expr_region_id,
+        {.kind = pattern_inst_kind,
+         .type_id = GetPatternType(context, type_expr.type_component_id),
+         .entity_name_id = AddBindingEntityName(context, name_id, form_id,
+                                                is_unused, phase)});
 
     // TODO: If `is_generic`, then `binding.bind_id is a SymbolicBinding. Subst
     // the `.Self` of type `type` in the `cast_type_id` type (a `FacetType`)

+ 32 - 32
toolchain/check/pattern.cpp

@@ -46,14 +46,27 @@ auto EndSubpatternAsNonExpr(Context& context) -> void {
   context.region_stack().PopAndDiscardRegion();
 }
 
+auto AddBindingEntityName(Context& context, SemIR::NameId name_id,
+                          SemIR::ConstantId form_id, bool is_unused,
+                          BindingPhase phase) -> SemIR::EntityNameId {
+  SemIR::EntityName entity_name = {
+      .name_id = name_id,
+      .parent_scope_id = context.scope_stack().PeekNameScopeId(),
+      .is_unused = is_unused || name_id == SemIR::NameId::Underscore};
+  if (phase != BindingPhase::Runtime) {
+    entity_name.bind_index_value =
+        context.scope_stack().AddCompileTimeBinding().index;
+    entity_name.is_template = phase == BindingPhase::Template;
+  }
+  entity_name.form_id = form_id;
+  return context.entity_names().Add(entity_name);
+}
+
 auto AddBindingPattern(Context& context, SemIR::LocId name_loc,
-                       SemIR::NameId name_id, SemIR::TypeId type_id,
-                       SemIR::ConstantId form_id,
                        SemIR::ExprRegionId type_region_id,
-                       SemIR::InstKind pattern_kind, bool is_template,
-                       bool is_unused) -> BindingPatternInfo {
+                       SemIR::AnyBindingPattern pattern) -> BindingPatternInfo {
   SemIR::InstKind bind_name_kind;
-  switch (pattern_kind) {
+  switch (pattern.kind) {
     case SemIR::InstKind::FormBindingPattern:
       bind_name_kind = SemIR::InstKind::FormBinding;
       break;
@@ -68,40 +81,22 @@ auto AddBindingPattern(Context& context, SemIR::LocId name_loc,
       break;
     default:
       CARBON_FATAL("pattern_kind {0} is not a binding pattern kind",
-                   pattern_kind);
-  }
-  bool is_generic = pattern_kind == SemIR::SymbolicBindingPattern::Kind;
-
-  SemIR::EntityName entity_name = {
-      .name_id = name_id,
-      .parent_scope_id = context.scope_stack().PeekNameScopeId(),
-      .is_unused = is_unused || name_id == SemIR::NameId::Underscore};
-  if (is_generic) {
-    entity_name.bind_index_value =
-        context.scope_stack().AddCompileTimeBinding().index;
-    entity_name.is_template = is_template;
-  } else if (pattern_kind == SemIR::InstKind::FormBindingPattern) {
-    entity_name.form_id = form_id;
+                   pattern.kind);
   }
-  auto entity_name_id = context.entity_names().Add(entity_name);
+  auto type_id = SemIR::ExtractScrutineeType(context.sem_ir(), pattern.type_id);
 
   auto bind_id = AddInstInNoBlock(
       context,
       SemIR::LocIdAndInst::UncheckedLoc(
           name_loc, SemIR::AnyBinding{.kind = bind_name_kind,
                                       .type_id = type_id,
-                                      .entity_name_id = entity_name_id,
+                                      .entity_name_id = pattern.entity_name_id,
                                       .value_id = SemIR::InstId::None}));
 
-  auto pattern_type_id = GetPatternType(context, type_id);
   auto binding_pattern_id = AddPatternInst(
-      context, SemIR::LocIdAndInst::UncheckedLoc(
-                   name_loc,
-                   SemIR::AnyBindingPattern{.kind = pattern_kind,
-                                            .type_id = pattern_type_id,
-                                            .entity_name_id = entity_name_id}));
+      context, SemIR::LocIdAndInst::UncheckedLoc(name_loc, pattern));
 
-  if (is_generic) {
+  if (pattern.kind == SemIR::SymbolicBindingPattern::Kind) {
     context.scope_stack().PushCompileTimeBinding(bind_id);
   }
 
@@ -156,11 +151,16 @@ auto AddParamPattern(Context& context, SemIR::LocId loc_id,
                      SemIR::TypeId type_id, bool is_ref) -> SemIR::InstId {
   const auto& binding_pattern_kind = is_ref ? SemIR::RefBindingPattern::Kind
                                             : SemIR::ValueBindingPattern::Kind;
+  auto entity_name_id =
+      AddBindingEntityName(context, name_id,
+                           /*form_id=*/SemIR::ConstantId::None,
+                           /*is_unused=*/false,
+                           /*phase=*/BindingPhase::Runtime);
   SemIR::InstId pattern_id =
-      AddBindingPattern(context, loc_id, name_id, type_id,
-                        /*form_id=*/SemIR::ConstantId::None,
-                        type_expr_region_id, binding_pattern_kind,
-                        /*is_template=*/false, /*is_unused=*/false)
+      AddBindingPattern(context, loc_id, type_expr_region_id,
+                        {.kind = binding_pattern_kind,
+                         .type_id = GetPatternType(context, type_id),
+                         .entity_name_id = entity_name_id})
           .pattern_id;
 
   const auto& param_pattern_kind =

+ 12 - 11
toolchain/check/pattern.h

@@ -35,19 +35,20 @@ struct BindingPatternInfo {
 
 // TODO: Add EndSubpatternAsPattern, when needed.
 
-// Creates a binding pattern. Returns the binding pattern and the bind name
-// instruction.
-// - `pattern_kind` specifies the kind of instruction to create.
-// - `is_template` indicates whether this is a template binding.
-// - `is_unused` indicates whether the binding was explicitly marked `unused`.
-// TODO: remove is_template once we have a separate InstKind for template
-// bindings.
+// The phase of a binding pattern.
+enum class BindingPhase { Template, Symbolic, Runtime };
+
+// Creates an entity name for a binding pattern with the given properties.
+auto AddBindingEntityName(Context& context, SemIR::NameId name_id,
+                          SemIR::ConstantId form_id, bool is_unused,
+                          BindingPhase phase) -> SemIR::EntityNameId;
+
+// Creates a binding pattern and the associated binding inst, and returns their
+// IDs. `type_region_id` is the region representing the binding's type
+// expression.
 auto AddBindingPattern(Context& context, SemIR::LocId name_loc,
-                       SemIR::NameId name_id, SemIR::TypeId type_id,
-                       SemIR::ConstantId form_id,
                        SemIR::ExprRegionId type_region_id,
-                       SemIR::InstKind pattern_kind, bool is_template,
-                       bool is_unused) -> BindingPatternInfo;
+                       SemIR::AnyBindingPattern pattern) -> BindingPatternInfo;
 
 // Creates storage for `var` patterns nested within the given pattern at the
 // current location in the output SemIR. For a `returned var`, this

+ 3 - 4
toolchain/check/pattern_match.cpp

@@ -314,10 +314,9 @@ auto MatchContext::DoEmitPatternMatch(Context& context,
       std::exchange(context.bind_name_map().Lookup(entry.pattern_id).value(),
                     {.bind_name_id = SemIR::InstId::None,
                      .type_expr_region_id = SemIR::ExprRegionId::None});
-  // bind_name_id doesn't have a value in the case of an unused binding pattern,
-  // but type_expr_region_id should always be populated.
-  CARBON_CHECK(type_expr_region_id.has_value());
-  InsertHere(context, type_expr_region_id);
+  if (type_expr_region_id.has_value()) {
+    InsertHere(context, type_expr_region_id);
+  }
   auto value_id = SemIR::InstId::None;
   if (kind_ == MatchKind::Local) {
     auto conversion_kind = ConversionKindFor(context, binding_pattern, entry);

+ 17 - 17
toolchain/check/testdata/basics/raw_sem_ir/cpp_interop.carbon

@@ -152,10 +152,10 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:     inst50000014:    {kind: ClassDecl, arg0: class50000000, arg1: inst_block<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst50000015:    {kind: ClassType, arg0: class50000000, arg1: specific<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst50000016:    {kind: NameRef, arg0: name2, arg1: inst50000014, type: type(TypeType)}
-// CHECK:STDOUT:     inst50000017:    {kind: ValueBinding, arg0: entity_name50000000, arg1: inst5000001B, type: type(inst50000015)}
-// CHECK:STDOUT:     inst50000018:    {kind: PatternType, arg0: inst50000015, type: type(TypeType)}
-// CHECK:STDOUT:     inst50000019:    {kind: ValueBindingPattern, arg0: entity_name50000000, type: type(inst50000018)}
-// CHECK:STDOUT:     inst5000001A:    {kind: ValueParamPattern, arg0: inst50000019, type: type(inst50000018)}
+// CHECK:STDOUT:     inst50000017:    {kind: PatternType, arg0: inst50000015, type: type(TypeType)}
+// CHECK:STDOUT:     inst50000018:    {kind: ValueBinding, arg0: entity_name50000000, arg1: inst5000001B, type: type(inst50000015)}
+// CHECK:STDOUT:     inst50000019:    {kind: ValueBindingPattern, arg0: entity_name50000000, type: type(inst50000017)}
+// CHECK:STDOUT:     inst5000001A:    {kind: ValueParamPattern, arg0: inst50000019, type: type(inst50000017)}
 // CHECK:STDOUT:     inst5000001B:    {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000015)}
 // CHECK:STDOUT:     inst5000001C:    {kind: SpliceBlock, arg0: inst_block50000005, arg1: inst50000016, type: type(TypeType)}
 // CHECK:STDOUT:     inst5000001D:    {kind: FunctionDecl, arg0: function50000000, arg1: inst_block5000000A, type: type(inst5000001E)}
@@ -183,18 +183,18 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:     inst50000033:    {kind: Call, arg0: inst50000030, arg1: inst_block_empty, type: type(inst50000013)}
 // CHECK:STDOUT:     inst50000034:    {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
 // CHECK:STDOUT:     inst50000035:    {kind: NameRef, arg0: name3, arg1: inst5000002A, type: type(inst50000029)}
-// CHECK:STDOUT:     inst50000036:    {kind: NameRef, arg0: name1, arg1: inst50000017, type: type(inst50000015)}
+// CHECK:STDOUT:     inst50000036:    {kind: NameRef, arg0: name1, arg1: inst50000018, type: type(inst50000015)}
 // CHECK:STDOUT:     inst50000037:    {kind: ValueBinding, arg0: entity_name50000001, arg1: inst5000003A, type: type(inst50000015)}
-// CHECK:STDOUT:     inst50000038:    {kind: ValueBindingPattern, arg0: entity_name50000001, type: type(inst50000018)}
-// CHECK:STDOUT:     inst50000039:    {kind: ValueParamPattern, arg0: inst50000038, type: type(inst50000018)}
+// CHECK:STDOUT:     inst50000038:    {kind: ValueBindingPattern, arg0: entity_name50000001, type: type(inst50000017)}
+// CHECK:STDOUT:     inst50000039:    {kind: ValueParamPattern, arg0: inst50000038, type: type(inst50000017)}
 // CHECK:STDOUT:     inst5000003A:    {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000015)}
 // CHECK:STDOUT:     inst5000003B:    {kind: FunctionDecl, arg0: function50000003, arg1: inst_block50000012, type: type(inst5000003C)}
 // CHECK:STDOUT:     inst5000003C:    {kind: FunctionType, arg0: function50000003, arg1: specific<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst5000003D:    {kind: StructValue, arg0: inst_block_empty, type: type(inst5000003C)}
-// CHECK:STDOUT:     inst5000003E:    {kind: ValueBinding, arg0: entity_name50000002, arg1: inst50000042, type: type(inst50000020)}
-// CHECK:STDOUT:     inst5000003F:    {kind: PatternType, arg0: inst50000020, type: type(TypeType)}
-// CHECK:STDOUT:     inst50000040:    {kind: ValueBindingPattern, arg0: entity_name50000002, type: type(inst5000003F)}
-// CHECK:STDOUT:     inst50000041:    {kind: ValueParamPattern, arg0: inst50000040, type: type(inst5000003F)}
+// CHECK:STDOUT:     inst5000003E:    {kind: PatternType, arg0: inst50000020, type: type(TypeType)}
+// CHECK:STDOUT:     inst5000003F:    {kind: ValueBinding, arg0: entity_name50000002, arg1: inst50000042, type: type(inst50000020)}
+// CHECK:STDOUT:     inst50000040:    {kind: ValueBindingPattern, arg0: entity_name50000002, type: type(inst5000003E)}
+// CHECK:STDOUT:     inst50000041:    {kind: ValueParamPattern, arg0: inst50000040, type: type(inst5000003E)}
 // CHECK:STDOUT:     inst50000042:    {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000020)}
 // CHECK:STDOUT:     inst50000043:    {kind: FunctionDecl, arg0: function50000004, arg1: inst_block50000018, type: type(inst50000044)}
 // CHECK:STDOUT:     inst50000044:    {kind: FunctionType, arg0: function50000004, arg1: specific<none>, type: type(TypeType)}
@@ -205,8 +205,8 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:     inst50000049:    {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
 // CHECK:STDOUT:     inst5000004A:    {kind: NameRef, arg0: name3, arg1: inst5000002A, type: type(inst50000029)}
 // CHECK:STDOUT:     inst5000004B:    {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
-// CHECK:STDOUT:     inst5000004C:    {kind: RefBindingPattern, arg0: entity_name50000003, type: type(inst5000003F)}
-// CHECK:STDOUT:     inst5000004D:    {kind: VarPattern, arg0: inst5000004C, type: type(inst5000003F)}
+// CHECK:STDOUT:     inst5000004C:    {kind: RefBindingPattern, arg0: entity_name50000003, type: type(inst5000003E)}
+// CHECK:STDOUT:     inst5000004D:    {kind: VarPattern, arg0: inst5000004C, type: type(inst5000003E)}
 // CHECK:STDOUT:     inst5000004E:    {kind: VarStorage, arg0: inst5000004D, type: type(inst50000020)}
 // CHECK:STDOUT:     inst5000004F:    {kind: NameRef, arg0: name4, arg1: inst5000004E, type: type(inst50000020)}
 // CHECK:STDOUT:     inst50000050:    {kind: AcquireValue, arg0: inst5000004F, type: type(inst50000020)}
@@ -240,7 +240,7 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:       inst50000014:    concrete_constant(inst50000015)
 // CHECK:STDOUT:       inst50000015:    concrete_constant(inst50000015)
 // CHECK:STDOUT:       inst50000016:    concrete_constant(inst50000015)
-// CHECK:STDOUT:       inst50000018:    concrete_constant(inst50000018)
+// CHECK:STDOUT:       inst50000017:    concrete_constant(inst50000017)
 // CHECK:STDOUT:       inst50000019:    concrete_constant(inst50000019)
 // CHECK:STDOUT:       inst5000001A:    concrete_constant(inst5000001A)
 // CHECK:STDOUT:       inst5000001C:    concrete_constant(inst50000015)
@@ -273,7 +273,7 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:       inst5000003B:    concrete_constant(inst5000003D)
 // CHECK:STDOUT:       inst5000003C:    concrete_constant(inst5000003C)
 // CHECK:STDOUT:       inst5000003D:    concrete_constant(inst5000003D)
-// CHECK:STDOUT:       inst5000003F:    concrete_constant(inst5000003F)
+// CHECK:STDOUT:       inst5000003E:    concrete_constant(inst5000003E)
 // CHECK:STDOUT:       inst50000040:    concrete_constant(inst50000040)
 // CHECK:STDOUT:       inst50000041:    concrete_constant(inst50000041)
 // CHECK:STDOUT:       inst50000043:    concrete_constant(inst50000045)
@@ -319,7 +319,7 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:     inst_block5000000A:
 // CHECK:STDOUT:       0:               inst5000001B
 // CHECK:STDOUT:       1:               inst5000001C
-// CHECK:STDOUT:       2:               inst50000017
+// CHECK:STDOUT:       2:               inst50000018
 // CHECK:STDOUT:     inst_block5000000B:
 // CHECK:STDOUT:       0:               inst50000028
 // CHECK:STDOUT:       1:               inst5000002C
@@ -370,7 +370,7 @@ fn G(x: Cpp.X) {
 // CHECK:STDOUT:       1:               inst50000041
 // CHECK:STDOUT:     inst_block50000018:
 // CHECK:STDOUT:       0:               inst50000042
-// CHECK:STDOUT:       1:               inst5000003E
+// CHECK:STDOUT:       1:               inst5000003F
 // CHECK:STDOUT:     inst_block50000019:
 // CHECK:STDOUT:       0:               inst50000036
 // CHECK:STDOUT:     inst_block5000001A:

+ 42 - 42
toolchain/check/testdata/basics/raw_sem_ir/one_file.carbon

@@ -71,7 +71,7 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     import_ir_inst1F: {ir_id: import_ir58000004, inst_id: inst7000007F}
 // CHECK:STDOUT:     import_ir_inst20: {ir_id: import_ir58000004, inst_id: inst70000080}
 // CHECK:STDOUT:     import_ir_inst21: {ir_id: import_ir58000004, inst_id: inst70000081}
-// CHECK:STDOUT:     import_ir_inst22: {ir_id: import_ir58000004, inst_id: inst70000061}
+// CHECK:STDOUT:     import_ir_inst22: {ir_id: import_ir58000004, inst_id: inst70000062}
 // CHECK:STDOUT:     import_ir_inst23: {ir_id: import_ir58000004, inst_id: inst70000078}
 // CHECK:STDOUT:     import_ir_inst24: {ir_id: import_ir58000004, inst_id: inst70000079}
 // CHECK:STDOUT:     import_ir_inst25: {ir_id: import_ir58000004, inst_id: inst7000007A}
@@ -87,8 +87,8 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     import_ir_inst2F: {ir_id: import_ir58000004, inst_id: inst70000065}
 // CHECK:STDOUT:     import_ir_inst30: {ir_id: import_ir58000004, inst_id: inst7000006B}
 // CHECK:STDOUT:     import_ir_inst31: {ir_id: import_ir58000004, inst_id: inst7000006E}
-// CHECK:STDOUT:     import_ir_inst32: {ir_id: import_ir58000004, inst_id: inst70000061}
-// CHECK:STDOUT:     import_ir_inst33: {ir_id: import_ir58000004, inst_id: inst70000063}
+// CHECK:STDOUT:     import_ir_inst32: {ir_id: import_ir58000004, inst_id: inst70000062}
+// CHECK:STDOUT:     import_ir_inst33: {ir_id: import_ir58000004, inst_id: inst70000064}
 // CHECK:STDOUT:     import_ir_inst34: {ir_id: import_ir58000004, inst_id: inst70000069}
 // CHECK:STDOUT:     import_ir_inst35: {ir_id: import_ir58000004, inst_id: inst7000006D}
 // CHECK:STDOUT:     import_ir_inst36: {ir_id: import_ir58000004, inst_id: inst70000074}
@@ -467,21 +467,21 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     inst58000013:    {kind: SymbolicBinding, arg0: entity_name58000000, arg1: inst<none>, type: type(inst58000012)}
 // CHECK:STDOUT:     inst58000014:    {kind: SymbolicBinding, arg0: entity_name58000000, arg1: inst<none>, type: type(inst58000012)}
 // CHECK:STDOUT:     inst58000015:    {kind: TypeLiteral, arg0: inst(TypeType), type: type(TypeType)}
-// CHECK:STDOUT:     inst58000016:    {kind: SymbolicBinding, arg0: entity_name58000001, arg1: inst<none>, type: type(TypeType)}
+// CHECK:STDOUT:     inst58000016:    {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)}
 // CHECK:STDOUT:     inst58000017:    {kind: SymbolicBinding, arg0: entity_name58000001, arg1: inst<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst58000018:    {kind: SymbolicBinding, arg0: entity_name58000001, arg1: inst<none>, type: type(TypeType)}
-// CHECK:STDOUT:     inst58000019:    {kind: PatternType, arg0: inst(TypeType), type: type(TypeType)}
-// CHECK:STDOUT:     inst5800001A:    {kind: SymbolicBindingPattern, arg0: entity_name58000001, type: type(inst58000019)}
-// CHECK:STDOUT:     inst5800001B:    {kind: NameRef, arg0: name1, arg1: inst58000016, type: type(TypeType)}
+// CHECK:STDOUT:     inst58000019:    {kind: SymbolicBinding, arg0: entity_name58000001, arg1: inst<none>, type: type(TypeType)}
+// CHECK:STDOUT:     inst5800001A:    {kind: SymbolicBindingPattern, arg0: entity_name58000001, type: type(inst58000016)}
+// CHECK:STDOUT:     inst5800001B:    {kind: NameRef, arg0: name1, arg1: inst58000017, type: type(TypeType)}
 // CHECK:STDOUT:     inst5800001C:    {kind: PointerType, arg0: inst5800001B, type: type(TypeType)}
-// CHECK:STDOUT:     inst5800001D:    {kind: PointerType, arg0: inst58000017, type: type(TypeType)}
-// CHECK:STDOUT:     inst5800001E:    {kind: PointerType, arg0: inst58000018, type: type(TypeType)}
-// CHECK:STDOUT:     inst5800001F:    {kind: ValueBinding, arg0: entity_name58000002, arg1: inst5800003A, type: type(symbolic_constant58000004)}
-// CHECK:STDOUT:     inst58000020:    {kind: PatternType, arg0: inst5800001D, type: type(TypeType)}
+// CHECK:STDOUT:     inst5800001D:    {kind: PointerType, arg0: inst58000018, type: type(TypeType)}
+// CHECK:STDOUT:     inst5800001E:    {kind: PointerType, arg0: inst58000019, type: type(TypeType)}
+// CHECK:STDOUT:     inst5800001F:    {kind: PatternType, arg0: inst5800001D, type: type(TypeType)}
+// CHECK:STDOUT:     inst58000020:    {kind: ValueBinding, arg0: entity_name58000002, arg1: inst5800003A, type: type(symbolic_constant58000004)}
 // CHECK:STDOUT:     inst58000021:    {kind: ValueBindingPattern, arg0: entity_name58000002, type: type(symbolic_constant58000006)}
 // CHECK:STDOUT:     inst58000022:    {kind: PatternType, arg0: inst5800001E, type: type(TypeType)}
 // CHECK:STDOUT:     inst58000023:    {kind: ValueParamPattern, arg0: inst58000021, type: type(symbolic_constant58000006)}
-// CHECK:STDOUT:     inst58000024:    {kind: NameRef, arg0: name1, arg1: inst58000016, type: type(TypeType)}
+// CHECK:STDOUT:     inst58000024:    {kind: NameRef, arg0: name1, arg1: inst58000017, type: type(TypeType)}
 // CHECK:STDOUT:     inst58000025:    {kind: PointerType, arg0: inst58000024, type: type(TypeType)}
 // CHECK:STDOUT:     inst58000026:    {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
 // CHECK:STDOUT:     inst58000027:    {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst58000026)}
@@ -517,7 +517,7 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     inst58000045:    {kind: RequireCompleteType, arg0: inst5800002F, type: type(inst(WitnessType))}
 // CHECK:STDOUT:     inst58000046:    {kind: RequireCompleteType, arg0: inst5800002F, type: type(inst(WitnessType))}
 // CHECK:STDOUT:     inst58000047:    {kind: RequireCompleteType, arg0: inst58000031, type: type(inst(WitnessType))}
-// CHECK:STDOUT:     inst58000048:    {kind: NameRef, arg0: name2, arg1: inst5800001F, type: type(symbolic_constant58000004)}
+// CHECK:STDOUT:     inst58000048:    {kind: NameRef, arg0: name2, arg1: inst58000020, type: type(symbolic_constant58000004)}
 // CHECK:STDOUT:     inst58000049:    {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst58000026)}
 // CHECK:STDOUT:     inst5800004A:    {kind: TupleLiteral, arg0: inst_block5800001A, type: type(symbolic_constant5800000A)}
 // CHECK:STDOUT:     inst5800004B:    {kind: RequireCompleteType, arg0: inst5800002F, type: type(inst(WitnessType))}
@@ -630,7 +630,7 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     inst580000B6:    {kind: ImportRefUnloaded, arg0: import_ir_inst4B, arg1: entity_name<none>}
 // CHECK:STDOUT:     inst580000B7:    {kind: ImplWitnessTable, arg0: inst_block5800003C, arg1: impl58000005}
 // CHECK:STDOUT:     inst580000B8:    {kind: ImplWitness, arg0: inst580000B7, arg1: specific5800000B, type: type(inst(WitnessType))}
-// CHECK:STDOUT:     inst580000B9:    {kind: SymbolicBindingPattern, arg0: entity_name58000019, type: type(inst58000019)}
+// CHECK:STDOUT:     inst580000B9:    {kind: SymbolicBindingPattern, arg0: entity_name58000019, type: type(inst58000016)}
 // CHECK:STDOUT:     inst580000BA:    {kind: ImportRefLoaded, arg0: import_ir_inst4E, arg1: entity_name<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst580000BB:    {kind: ImportRefLoaded, arg0: import_ir_inst4F, arg1: entity_name<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst580000BC:    {kind: ImportRefLoaded, arg0: import_ir_inst50, arg1: entity_name<none>, type: type(TypeType)}
@@ -848,16 +848,16 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       inst58000013:    symbolic_constant58000000
 // CHECK:STDOUT:       inst58000014:    symbolic_constant58000000
 // CHECK:STDOUT:       inst58000015:    concrete_constant(inst(TypeType))
-// CHECK:STDOUT:       inst58000016:    symbolic_constant58000002
-// CHECK:STDOUT:       inst58000017:    symbolic_constant58000001
-// CHECK:STDOUT:       inst58000018:    symbolic_constant58000002
-// CHECK:STDOUT:       inst58000019:    concrete_constant(inst58000019)
+// CHECK:STDOUT:       inst58000016:    concrete_constant(inst58000016)
+// CHECK:STDOUT:       inst58000017:    symbolic_constant58000002
+// CHECK:STDOUT:       inst58000018:    symbolic_constant58000001
+// CHECK:STDOUT:       inst58000019:    symbolic_constant58000002
 // CHECK:STDOUT:       inst5800001A:    concrete_constant(inst5800001A)
 // CHECK:STDOUT:       inst5800001B:    symbolic_constant58000002
 // CHECK:STDOUT:       inst5800001C:    symbolic_constant58000004
 // CHECK:STDOUT:       inst5800001D:    symbolic_constant58000003
 // CHECK:STDOUT:       inst5800001E:    symbolic_constant58000004
-// CHECK:STDOUT:       inst58000020:    symbolic_constant58000005
+// CHECK:STDOUT:       inst5800001F:    symbolic_constant58000005
 // CHECK:STDOUT:       inst58000021:    concrete_constant(inst58000021)
 // CHECK:STDOUT:       inst58000022:    symbolic_constant58000006
 // CHECK:STDOUT:       inst58000023:    concrete_constant(inst58000023)
@@ -1208,12 +1208,12 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       inst58000187:    concrete_constant(inst58000028)
 // CHECK:STDOUT:     symbolic_constants:
 // CHECK:STDOUT:       symbolic_constant58000000: {inst: inst58000014, kind: self, attached: null}
-// CHECK:STDOUT:       symbolic_constant58000001: {inst: inst58000017, kind: checked, attached: null}
-// CHECK:STDOUT:       symbolic_constant58000002: {inst: inst58000017, kind: checked, attached: {generic: generic58000000, index: generic_inst_in_decl0}}
+// CHECK:STDOUT:       symbolic_constant58000001: {inst: inst58000018, kind: checked, attached: null}
+// CHECK:STDOUT:       symbolic_constant58000002: {inst: inst58000018, kind: checked, attached: {generic: generic58000000, index: generic_inst_in_decl0}}
 // CHECK:STDOUT:       symbolic_constant58000003: {inst: inst5800001D, kind: checked, attached: null}
 // CHECK:STDOUT:       symbolic_constant58000004: {inst: inst5800001D, kind: checked, attached: {generic: generic58000000, index: generic_inst_in_decl1}}
-// CHECK:STDOUT:       symbolic_constant58000005: {inst: inst58000020, kind: checked, attached: null}
-// CHECK:STDOUT:       symbolic_constant58000006: {inst: inst58000020, kind: checked, attached: {generic: generic58000000, index: generic_inst_in_decl2}}
+// CHECK:STDOUT:       symbolic_constant58000005: {inst: inst5800001F, kind: checked, attached: null}
+// CHECK:STDOUT:       symbolic_constant58000006: {inst: inst5800001F, kind: checked, attached: {generic: generic58000000, index: generic_inst_in_decl2}}
 // CHECK:STDOUT:       symbolic_constant58000007: {inst: inst5800002B, kind: checked, attached: null}
 // CHECK:STDOUT:       symbolic_constant58000008: {inst: inst5800002B, kind: checked, attached: {generic: generic58000000, index: generic_inst_in_decl3}}
 // CHECK:STDOUT:       symbolic_constant58000009: {inst: inst5800002F, kind: checked, attached: null}
@@ -1313,9 +1313,9 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       symbolic_constant58000067: {inst: inst580000B8, kind: checked, attached: null}
 // CHECK:STDOUT:       symbolic_constant58000068: {inst: inst580000B8, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl2}}
 // CHECK:STDOUT:       symbolic_constant58000069: {inst: inst5800001D, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl1}}
-// CHECK:STDOUT:       symbolic_constant5800006A: {inst: inst58000017, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl0}}
-// CHECK:STDOUT:       symbolic_constant5800006B: {inst: inst58000017, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl0}}
-// CHECK:STDOUT:       symbolic_constant5800006C: {inst: inst58000017, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl0}}
+// CHECK:STDOUT:       symbolic_constant5800006A: {inst: inst58000018, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl0}}
+// CHECK:STDOUT:       symbolic_constant5800006B: {inst: inst58000018, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl0}}
+// CHECK:STDOUT:       symbolic_constant5800006C: {inst: inst58000018, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl0}}
 // CHECK:STDOUT:       symbolic_constant5800006D: {inst: inst5800001D, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl1}}
 // CHECK:STDOUT:       symbolic_constant5800006E: {inst: inst580000B8, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_decl2}}
 // CHECK:STDOUT:       symbolic_constant5800006F: {inst: inst58000042, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_def2}}
@@ -1323,16 +1323,16 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       symbolic_constant58000071: {inst: inst580000C2, kind: checked, attached: null}
 // CHECK:STDOUT:       symbolic_constant58000072: {inst: inst580000C2, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_def1}}
 // CHECK:STDOUT:       symbolic_constant58000073: {inst: inst580000C1, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_def0}}
-// CHECK:STDOUT:       symbolic_constant58000074: {inst: inst58000020, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl2}}
+// CHECK:STDOUT:       symbolic_constant58000074: {inst: inst5800001F, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl2}}
 // CHECK:STDOUT:       symbolic_constant58000075: {inst: inst580000C7, kind: checked, attached: null}
 // CHECK:STDOUT:       symbolic_constant58000076: {inst: inst580000C7, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl3}}
 // CHECK:STDOUT:       symbolic_constant58000077: {inst: inst5800001D, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl1}}
-// CHECK:STDOUT:       symbolic_constant58000078: {inst: inst58000017, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl0}}
+// CHECK:STDOUT:       symbolic_constant58000078: {inst: inst58000018, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl0}}
 // CHECK:STDOUT:       symbolic_constant58000079: {inst: inst580000C7, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl3}}
 // CHECK:STDOUT:       symbolic_constant5800007A: {inst: inst5800001D, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl1}}
-// CHECK:STDOUT:       symbolic_constant5800007B: {inst: inst58000017, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl0}}
+// CHECK:STDOUT:       symbolic_constant5800007B: {inst: inst58000018, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl0}}
 // CHECK:STDOUT:       symbolic_constant5800007C: {inst: inst5800001D, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl1}}
-// CHECK:STDOUT:       symbolic_constant5800007D: {inst: inst58000020, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl2}}
+// CHECK:STDOUT:       symbolic_constant5800007D: {inst: inst5800001F, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl2}}
 // CHECK:STDOUT:       symbolic_constant5800007E: {inst: inst580000C7, kind: checked, attached: {generic: generic58000006, index: generic_inst_in_decl3}}
 // CHECK:STDOUT:       symbolic_constant5800007F: {inst: inst580000C2, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_def1}}
 // CHECK:STDOUT:       symbolic_constant58000080: {inst: inst580000C1, kind: checked, attached: {generic: generic58000005, index: generic_inst_in_def0}}
@@ -1716,18 +1716,18 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       5:               inst58000030
 // CHECK:STDOUT:       6:               inst58000032
 // CHECK:STDOUT:       7:               inst58000039
-// CHECK:STDOUT:       8:               inst58000016
+// CHECK:STDOUT:       8:               inst58000017
 // CHECK:STDOUT:       9:               inst5800003A
 // CHECK:STDOUT:       10:              inst5800003B
-// CHECK:STDOUT:       11:              inst5800001F
+// CHECK:STDOUT:       11:              inst58000020
 // CHECK:STDOUT:       12:              inst5800003C
 // CHECK:STDOUT:       13:              inst5800003D
 // CHECK:STDOUT:     inst_block58000015:
-// CHECK:STDOUT:       0:               inst58000016
-// CHECK:STDOUT:     inst_block58000016:
 // CHECK:STDOUT:       0:               inst58000017
-// CHECK:STDOUT:     inst_block58000017:
+// CHECK:STDOUT:     inst_block58000016:
 // CHECK:STDOUT:       0:               inst58000018
+// CHECK:STDOUT:     inst_block58000017:
+// CHECK:STDOUT:       0:               inst58000019
 // CHECK:STDOUT:       1:               inst5800001E
 // CHECK:STDOUT:       2:               inst58000022
 // CHECK:STDOUT:       3:               inst5800002C
@@ -1735,9 +1735,9 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       5:               inst58000034
 // CHECK:STDOUT:       6:               inst58000037
 // CHECK:STDOUT:     inst_block58000018:
-// CHECK:STDOUT:       0:               inst58000017
+// CHECK:STDOUT:       0:               inst58000018
 // CHECK:STDOUT:       1:               inst5800001D
-// CHECK:STDOUT:       2:               inst58000020
+// CHECK:STDOUT:       2:               inst5800001F
 // CHECK:STDOUT:       3:               inst5800002B
 // CHECK:STDOUT:       4:               inst5800002F
 // CHECK:STDOUT:       5:               inst58000033
@@ -1870,7 +1870,7 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     inst_block5800003C:
 // CHECK:STDOUT:       0:               inst580000B6
 // CHECK:STDOUT:     inst_block5800003D:
-// CHECK:STDOUT:       0:               inst58000017
+// CHECK:STDOUT:       0:               inst58000018
 // CHECK:STDOUT:       1:               inst5800001D
 // CHECK:STDOUT:       2:               inst580000B8
 // CHECK:STDOUT:     inst_block5800003E:
@@ -1898,9 +1898,9 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       2:               inst580000CD
 // CHECK:STDOUT:       3:               inst580000CE
 // CHECK:STDOUT:     inst_block58000047:
-// CHECK:STDOUT:       0:               inst58000017
+// CHECK:STDOUT:       0:               inst58000018
 // CHECK:STDOUT:       1:               inst5800001D
-// CHECK:STDOUT:       2:               inst58000020
+// CHECK:STDOUT:       2:               inst5800001F
 // CHECK:STDOUT:       3:               inst580000C7
 // CHECK:STDOUT:     inst_block58000048:
 // CHECK:STDOUT:       0:               inst580000BD
@@ -2168,7 +2168,7 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:       1:               inst580000C2
 // CHECK:STDOUT:       2:               inst58000042
 // CHECK:STDOUT:     inst_block58000087:
-// CHECK:STDOUT:       0:               inst58000018
+// CHECK:STDOUT:       0:               inst58000019
 // CHECK:STDOUT:     inst_block58000088:
 // CHECK:STDOUT:       0:               inst58000172
 // CHECK:STDOUT:     inst_block58000089:
@@ -2184,7 +2184,7 @@ fn Foo[T:! type](p: T*) -> (T*, ()) {
 // CHECK:STDOUT:     inst_block5800008D:
 // CHECK:STDOUT:       0:               inst58000174
 // CHECK:STDOUT:       1:               inst5800001D
-// CHECK:STDOUT:       2:               inst58000020
+// CHECK:STDOUT:       2:               inst5800001F
 // CHECK:STDOUT:       3:               inst580000C7
 // CHECK:STDOUT:     inst_block5800008E:
 // CHECK:STDOUT:       0:               inst5800017A

+ 7 - 7
toolchain/check/testdata/basics/raw_sem_ir/one_file_with_textual_ir.carbon

@@ -68,10 +68,10 @@ fn Foo(n: ()) -> ((), ()) {
 // CHECK:STDOUT:     inst50000011:    {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
 // CHECK:STDOUT:     inst50000012:    {kind: TupleValue, arg0: inst_block_empty, type: type(inst50000010)}
 // CHECK:STDOUT:     inst50000013:    {kind: Converted, arg0: inst50000011, arg1: inst50000010, type: type(TypeType)}
-// CHECK:STDOUT:     inst50000014:    {kind: ValueBinding, arg0: entity_name50000000, arg1: inst50000026, type: type(inst50000010)}
-// CHECK:STDOUT:     inst50000015:    {kind: PatternType, arg0: inst50000010, type: type(TypeType)}
-// CHECK:STDOUT:     inst50000016:    {kind: ValueBindingPattern, arg0: entity_name50000000, type: type(inst50000015)}
-// CHECK:STDOUT:     inst50000017:    {kind: ValueParamPattern, arg0: inst50000016, type: type(inst50000015)}
+// CHECK:STDOUT:     inst50000014:    {kind: PatternType, arg0: inst50000010, type: type(TypeType)}
+// CHECK:STDOUT:     inst50000015:    {kind: ValueBinding, arg0: entity_name50000000, arg1: inst50000026, type: type(inst50000010)}
+// CHECK:STDOUT:     inst50000016:    {kind: ValueBindingPattern, arg0: entity_name50000000, type: type(inst50000014)}
+// CHECK:STDOUT:     inst50000017:    {kind: ValueParamPattern, arg0: inst50000016, type: type(inst50000014)}
 // CHECK:STDOUT:     inst50000018:    {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
 // CHECK:STDOUT:     inst50000019:    {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
 // CHECK:STDOUT:     inst5000001A:    {kind: TupleType, arg0: inst_block50000008, type: type(TypeType)}
@@ -93,7 +93,7 @@ fn Foo(n: ()) -> ((), ()) {
 // CHECK:STDOUT:     inst5000002A:    {kind: FunctionDecl, arg0: function50000000, arg1: inst_block5000000F, type: type(inst5000002B)}
 // CHECK:STDOUT:     inst5000002B:    {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
 // CHECK:STDOUT:     inst5000002C:    {kind: StructValue, arg0: inst_block_empty, type: type(inst5000002B)}
-// CHECK:STDOUT:     inst5000002D:    {kind: NameRef, arg0: name1, arg1: inst50000014, type: type(inst50000010)}
+// CHECK:STDOUT:     inst5000002D:    {kind: NameRef, arg0: name1, arg1: inst50000015, type: type(inst50000010)}
 // CHECK:STDOUT:     inst5000002E:    {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
 // CHECK:STDOUT:     inst5000002F:    {kind: TupleLiteral, arg0: inst_block50000011, type: type(inst5000001A)}
 // CHECK:STDOUT:     inst50000030:    {kind: TupleAccess, arg0: inst50000028, arg1: element0, type: type(inst50000010)}
@@ -112,7 +112,7 @@ fn Foo(n: ()) -> ((), ()) {
 // CHECK:STDOUT:       inst50000011:    concrete_constant(inst50000012)
 // CHECK:STDOUT:       inst50000012:    concrete_constant(inst50000012)
 // CHECK:STDOUT:       inst50000013:    concrete_constant(inst50000010)
-// CHECK:STDOUT:       inst50000015:    concrete_constant(inst50000015)
+// CHECK:STDOUT:       inst50000014:    concrete_constant(inst50000014)
 // CHECK:STDOUT:       inst50000016:    concrete_constant(inst50000016)
 // CHECK:STDOUT:       inst50000017:    concrete_constant(inst50000017)
 // CHECK:STDOUT:       inst50000018:    concrete_constant(inst50000012)
@@ -188,7 +188,7 @@ fn Foo(n: ()) -> ((), ()) {
 // CHECK:STDOUT:       6:               inst50000021
 // CHECK:STDOUT:       7:               inst50000026
 // CHECK:STDOUT:       8:               inst50000027
-// CHECK:STDOUT:       9:               inst50000014
+// CHECK:STDOUT:       9:               inst50000015
 // CHECK:STDOUT:       10:              inst50000028
 // CHECK:STDOUT:       11:              inst50000029
 // CHECK:STDOUT:     inst_block50000010:

+ 1 - 1
toolchain/check/testdata/choice/generic.carbon

@@ -19,8 +19,8 @@ choice Always(T:! type) {
 // CHECK:STDOUT: --- generic.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Always.type: type = generic_class_type @Always [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Always.generic: %Always.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/class/destroy_calls.carbon

@@ -321,8 +321,8 @@ fn G() { F({}); }
 // CHECK:STDOUT: --- generic_use_inside_generic.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]

+ 4 - 4
toolchain/check/testdata/class/generic/adapt.carbon

@@ -130,8 +130,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%T.67d) [symbolic]
@@ -439,8 +439,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%T) [symbolic]
@@ -580,8 +580,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%T) [symbolic]
@@ -814,8 +814,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Adapter.type: type = generic_class_type @Adapter [concrete]
 // CHECK:STDOUT:   %Adapter.generic: %Adapter.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Adapter.562: type = class_type @Adapter, @Adapter(%T.67d) [symbolic]

+ 3 - 3
toolchain/check/testdata/class/generic/base_is_generic.carbon

@@ -94,8 +94,8 @@ fn H() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base.d0c: type = class_type @Base, @Base(%T.67d) [symbolic]
@@ -444,8 +444,8 @@ fn H() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%T) [symbolic]
@@ -549,8 +549,8 @@ fn H() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %X.type: type = generic_class_type @X [concrete]
 // CHECK:STDOUT:   %X.generic: %X.type = struct_value () [concrete]
 // CHECK:STDOUT:   %X.03b463.1: type = class_type @X, @X(%U) [symbolic]

+ 1 - 1
toolchain/check/testdata/class/generic/basic.carbon

@@ -34,8 +34,8 @@ class Declaration(T:! type);
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T.035) [symbolic]

+ 9 - 9
toolchain/check/testdata/class/generic/call.carbon

@@ -95,15 +95,15 @@ class Outer(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class.e86: type = class_type @Class, @Class(%T, %N.6f3) [symbolic]
@@ -255,14 +255,14 @@ class Outer(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T, %N.6f3) [symbolic]
@@ -340,14 +340,14 @@ class Outer(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T, %N.6f3) [symbolic]
@@ -429,14 +429,14 @@ class Outer(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.6f3: %i32 = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T, %N.6f3) [symbolic]
@@ -521,8 +521,8 @@ class Outer(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Outer.387: type = class_type @Outer, @Outer(%T) [symbolic]

+ 1 - 1
toolchain/check/testdata/class/generic/complete_in_conversion.carbon

@@ -54,8 +54,8 @@ fn F(a: A(0)*) {
 // CHECK:STDOUT:   %Int.type.878: type = generic_class_type @Int.1 [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type.878 = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int.1, @Int.1(%int_32) [concrete]
-// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %A.type: type = generic_class_type @A [concrete]
 // CHECK:STDOUT:   %A.generic: %A.type = struct_value () [concrete]
 // CHECK:STDOUT:   %A.54d: type = class_type @A, @A(%N.5de) [symbolic]

+ 1 - 1
toolchain/check/testdata/class/generic/field.carbon

@@ -35,8 +35,8 @@ fn H(U:! Core.Copy, c: Class(U)) -> U {
 // CHECK:STDOUT: --- field.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class.0db: type = class_type @Class, @Class(%T.67d) [symbolic]

+ 3 - 3
toolchain/check/testdata/class/generic/generic_vs_params.carbon

@@ -89,8 +89,8 @@ class Foo[T:! type];
 // CHECK:STDOUT:   %NotGenericButParams: type = class_type @NotGenericButParams [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %GenericAndParams.type.fa0: type = generic_class_type @GenericAndParams.loc6 [concrete]
 // CHECK:STDOUT:   %GenericAndParams.generic.e6f: %GenericAndParams.type.fa0 = struct_value () [concrete]
 // CHECK:STDOUT:   %GenericAndParams.2b4: type = class_type @GenericAndParams.loc6, @GenericAndParams.loc6(%T) [symbolic]
@@ -406,8 +406,8 @@ class Foo[T:! type];
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT: }
@@ -476,8 +476,8 @@ class Foo[T:! type];
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT: }

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

@@ -94,8 +94,8 @@ class Class(U:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %CompleteClass.type: type = generic_class_type @CompleteClass [concrete]

+ 2 - 2
toolchain/check/testdata/class/generic/init.carbon

@@ -55,8 +55,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %.076a48.2: Core.Form = init_form %T.binding.as_type [symbolic]
@@ -290,8 +290,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 {
 // CHECK:STDOUT:   %Adapt.type: type = generic_class_type @Adapt [concrete]
 // CHECK:STDOUT:   %Adapt.generic: %Adapt.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %.076a48.2: Core.Form = init_form %T.binding.as_type [symbolic]

+ 2 - 2
toolchain/check/testdata/class/generic/member_inline.carbon

@@ -49,8 +49,8 @@ class C(T:! Core.Copy) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T.035) [symbolic]
@@ -264,8 +264,8 @@ class C(T:! Core.Copy) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C: type = class_type @C, @C(%T) [symbolic]

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

@@ -116,8 +116,8 @@ fn Generic(unused T:! ()).WrongType() {}
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T.035) [symbolic]
@@ -381,13 +381,13 @@ fn Generic(unused T:! ()).WrongType() {}
 // CHECK:STDOUT: --- nested.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %A.type: type = generic_class_type @A [concrete]
 // CHECK:STDOUT:   %A.generic: %A.type = struct_value () [concrete]
 // CHECK:STDOUT:   %A: type = class_type @A, @A(%T) [symbolic]
-// CHECK:STDOUT:   %_: %T = symbolic_binding _, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
+// CHECK:STDOUT:   %_: %T = symbolic_binding _, 1 [symbolic]
 // CHECK:STDOUT:   %B.type: type = generic_class_type @B, @A(%T) [symbolic]
 // CHECK:STDOUT:   %B.generic: %B.type = struct_value () [symbolic]
 // CHECK:STDOUT:   %B: type = class_type @B, @B(%T, %_) [symbolic]

+ 2 - 2
toolchain/check/testdata/class/generic/member_type.carbon

@@ -63,8 +63,8 @@ fn Test() -> i32 {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Outer.4b9: type = class_type @Outer, @Outer(%T.035) [symbolic]
@@ -417,8 +417,8 @@ fn Test() -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/class/generic/method_deduce.carbon

@@ -37,8 +37,8 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) {
 // CHECK:STDOUT:   %B: type = class_type @B [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]

+ 10 - 10
toolchain/check/testdata/class/generic/redeclare.carbon

@@ -102,8 +102,8 @@ class E(U:! type) {}
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type: type = generic_class_type @Generic [concrete]
 // CHECK:STDOUT:   %Generic.generic: %Generic.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Generic: type = class_type @Generic, @Generic(%T) [symbolic]
@@ -168,8 +168,8 @@ class E(U:! type) {}
 // CHECK:STDOUT:   %A.f82: type = class_type @A.loc4 [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %A.type: type = generic_class_type @A.loc12 [concrete]
 // CHECK:STDOUT:   %A.generic: %A.type = struct_value () [concrete]
 // CHECK:STDOUT:   %A.95c: type = class_type @A.loc12, @A.loc12(%T) [symbolic]
@@ -230,14 +230,14 @@ class E(U:! type) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %N.bad: %A = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.1ab: type = pattern_type %A [concrete]
+// CHECK:STDOUT:   %N.bad: %A = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %B.type.f7e62c.1: type = generic_class_type @B.loc6 [concrete]
 // CHECK:STDOUT:   %B.generic.8bc1c8.1: %B.type.f7e62c.1 = struct_value () [concrete]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
-// CHECK:STDOUT:   %N.bd9: %T = symbolic_binding N, 1 [symbolic]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
+// CHECK:STDOUT:   %N.bd9: %T = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %B.type.f7e62c.2: type = generic_class_type @B.loc14 [concrete]
 // CHECK:STDOUT:   %B.generic.8bc1c8.2: %B.type.f7e62c.2 = struct_value () [concrete]
 // CHECK:STDOUT:   %B.87e: type = class_type @B.loc14, @B.loc14(%T, %N.bd9) [symbolic]
@@ -332,12 +332,12 @@ class E(U:! type) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type.e297ae.1: type = generic_class_type @C.loc6 [concrete]
 // CHECK:STDOUT:   %C.generic.65f314.1: %C.type.e297ae.1 = struct_value () [concrete]
-// CHECK:STDOUT:   %U: %A = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.1ab: type = pattern_type %A [concrete]
+// CHECK:STDOUT:   %U: %A = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %C.type.e297ae.2: type = generic_class_type @C.loc14 [concrete]
 // CHECK:STDOUT:   %C.generic.65f314.2: %C.type.e297ae.2 = struct_value () [concrete]
 // CHECK:STDOUT:   %C.74f: type = class_type @C.loc14, @C.loc14(%T, %U) [symbolic]
@@ -430,12 +430,12 @@ class E(U:! type) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %D.type.6dc267.1: type = generic_class_type @D.loc6 [concrete]
 // CHECK:STDOUT:   %D.generic.3c4a9e.1: %D.type.6dc267.1 = struct_value () [concrete]
-// CHECK:STDOUT:   %T.bad: %A = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.1ab: type = pattern_type %A [concrete]
+// CHECK:STDOUT:   %T.bad: %A = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %D.type.6dc267.2: type = generic_class_type @D.loc14 [concrete]
 // CHECK:STDOUT:   %D.generic.3c4a9e.2: %D.type.6dc267.2 = struct_value () [concrete]
 // CHECK:STDOUT:   %D.d48: type = class_type @D.loc14, @D.loc14(%T.bad) [symbolic]
@@ -517,8 +517,8 @@ class E(U:! type) {}
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %E.type.97c458.1: type = generic_class_type @E.loc4 [concrete]
 // CHECK:STDOUT:   %E.generic.e80795.1: %E.type.97c458.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]

+ 1 - 1
toolchain/check/testdata/class/generic/self.carbon

@@ -28,8 +28,8 @@ class Class(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]

+ 3 - 3
toolchain/check/testdata/class/generic/stringify.carbon

@@ -175,8 +175,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Outer.387: type = class_type @Outer, @Outer(%T) [symbolic]
@@ -346,8 +346,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.ad6: type = class_type @C, @C(%N.5de) [symbolic]
@@ -469,8 +469,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D);
 // CHECK:STDOUT:   %complete_type.705: <witness> = complete_type_witness %struct_type.a.b.501 [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %F: %D = symbolic_binding F, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9c8: type = pattern_type %D [concrete]
+// CHECK:STDOUT:   %F: %D = symbolic_binding F, 0 [symbolic]
 // CHECK:STDOUT:   %E.type: type = generic_class_type @E [concrete]
 // CHECK:STDOUT:   %E.generic: %E.type = struct_value () [concrete]
 // CHECK:STDOUT:   %E: type = class_type @E, @E(%F) [symbolic]

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

@@ -24,8 +24,8 @@ fn Class(T:! type).F[unused self: Self](unused n: T) {}
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%T) [symbolic]

+ 12 - 12
toolchain/check/testdata/class/syntactic_merge.carbon

@@ -192,8 +192,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
@@ -302,8 +302,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
@@ -369,8 +369,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type.337be0.1: type = generic_class_type @Foo.loc6 [concrete]
 // CHECK:STDOUT:   %Foo.generic.6e878d.1: %Foo.type.337be0.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo.type.337be0.2: type = generic_class_type @Foo.loc14 [concrete]
@@ -448,8 +448,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
@@ -515,8 +515,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Bar.type: type = generic_class_type @Bar [concrete]
@@ -589,8 +589,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %C: type = class_type @C [concrete]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
@@ -688,8 +688,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type.337be0.1: type = generic_class_type @Foo.loc7 [concrete]
 // CHECK:STDOUT:   %Foo.generic.6e878d.1: %Foo.type.337be0.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %b: %C = symbolic_binding b, 0 [symbolic]
@@ -771,8 +771,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type.337be0.1: type = generic_class_type @Foo.loc7 [concrete]
 // CHECK:STDOUT:   %Foo.generic.6e878d.1: %Foo.type.337be0.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo.type.337be0.2: type = generic_class_type @Foo.loc15 [concrete]
@@ -853,8 +853,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type.337be0.1: type = generic_class_type @Foo.loc7 [concrete]
 // CHECK:STDOUT:   %Foo.generic.6e878d.1: %Foo.type.337be0.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo.type.337be0.2: type = generic_class_type @Foo.loc15 [concrete]
@@ -935,8 +935,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT: }
@@ -984,8 +984,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type: type = generic_class_type @Foo [concrete]
 // CHECK:STDOUT:   %Foo.generic: %Foo.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo: type = class_type @Foo, @Foo(%a) [symbolic]
@@ -1053,8 +1053,8 @@ fn Base.F[ref self: Base]() {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %const: type = const_type %C [concrete]
-// CHECK:STDOUT:   %a: %const = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %const [concrete]
+// CHECK:STDOUT:   %a: %const = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type.337be0.1: type = generic_class_type @Foo.loc6 [concrete]
 // CHECK:STDOUT:   %Foo.generic.6e878d.1: %Foo.type.337be0.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %Foo.type.337be0.2: type = generic_class_type @Foo.loc18 [concrete]

+ 4 - 4
toolchain/check/testdata/class/syntactic_merge_literal.carbon

@@ -44,8 +44,8 @@ class D(b:! C(1_000)) {}
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %a: %i32 = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %a: %i32 = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.ad6: type = class_type @C, @C(%a) [symbolic]
@@ -69,8 +69,8 @@ class D(b:! C(1_000)) {}
 // CHECK:STDOUT:   %bound_method: <bound method> = bound_method %int_1000.ff9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
 // CHECK:STDOUT:   %int_1000.1b6: %i32 = int_value 1000 [concrete]
 // CHECK:STDOUT:   %C.a39: type = class_type @C, @C(%int_1000.1b6) [concrete]
-// CHECK:STDOUT:   %b: %C.a39 = symbolic_binding b, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.f44: type = pattern_type %C.a39 [concrete]
+// CHECK:STDOUT:   %b: %C.a39 = symbolic_binding b, 0 [symbolic]
 // CHECK:STDOUT:   %D.type: type = generic_class_type @D [concrete]
 // CHECK:STDOUT:   %D.generic: %D.type = struct_value () [concrete]
 // CHECK:STDOUT:   %D: type = class_type @D, @D(%b) [symbolic]
@@ -192,8 +192,8 @@ class D(b:! C(1_000)) {}
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %a: %i32 = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %a: %i32 = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.ad6: type = class_type @C, @C(%a) [symbolic]
@@ -217,8 +217,8 @@ class D(b:! C(1_000)) {}
 // CHECK:STDOUT:   %bound_method: <bound method> = bound_method %int_1000.ff9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
 // CHECK:STDOUT:   %int_1000.1b6: %i32 = int_value 1000 [concrete]
 // CHECK:STDOUT:   %C.a39: type = class_type @C, @C(%int_1000.1b6) [concrete]
-// CHECK:STDOUT:   %b: %C.a39 = symbolic_binding b, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.f44: type = pattern_type %C.a39 [concrete]
+// CHECK:STDOUT:   %b: %C.a39 = symbolic_binding b, 0 [symbolic]
 // CHECK:STDOUT:   %D.type.6dc267.1: type = generic_class_type @D.loc5 [concrete]
 // CHECK:STDOUT:   %D.generic.3c4a9e.1: %D.type.6dc267.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %D.type.6dc267.2: type = generic_class_type @D.loc13 [concrete]

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

@@ -2182,8 +2182,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base: type = class_type @Base, @Base(%T) [symbolic]
@@ -2283,8 +2283,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base.d0c: type = class_type @Base, @Base(%T) [symbolic]
@@ -2661,8 +2661,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT:   %pattern_type.818: type = pattern_type %T1 [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T1.F.type: type = fn_type @T1.F [concrete]
 // CHECK:STDOUT:   %T1.F: %T1.F.type = struct_value () [concrete]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
@@ -2723,8 +2723,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T1.type: type = generic_class_type @T1 [concrete]
 // CHECK:STDOUT:   %T1.generic: %T1.type = struct_value () [concrete]
 // CHECK:STDOUT:   %T1: type = class_type @T1, @T1(%T.67d) [symbolic]
@@ -2819,8 +2819,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T1.type: type = generic_class_type @T1 [concrete]
 // CHECK:STDOUT:   %T1.generic: %T1.type = struct_value () [concrete]
 // CHECK:STDOUT:   %T1: type = class_type @T1, @T1(%T) [symbolic]
@@ -2932,8 +2932,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T1.type: type = generic_class_type @T1 [concrete]
 // CHECK:STDOUT:   %T1.generic: %T1.type = struct_value () [concrete]
 // CHECK:STDOUT:   %T1: type = class_type @T1, @T1(%T) [symbolic]
@@ -3127,8 +3127,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT:   %complete_type.513: <witness> = complete_type_witness %struct_type.vptr [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %GenericDerived.type: type = generic_class_type @GenericDerived [concrete]
 // CHECK:STDOUT:   %GenericDerived.generic: %GenericDerived.type = struct_value () [concrete]
 // CHECK:STDOUT:   %GenericDerived: type = class_type @GenericDerived, @GenericDerived(%T) [symbolic]
@@ -3341,8 +3341,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %GenericBase.type: type = generic_class_type @GenericBase [concrete]
 // CHECK:STDOUT:   %GenericBase.generic: %GenericBase.type = struct_value () [concrete]
 // CHECK:STDOUT:   %GenericBase.5e3: type = class_type @GenericBase, @GenericBase(%T) [symbolic]
@@ -3607,8 +3607,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base.d0c: type = class_type @Base, @Base(%T) [symbolic]
@@ -3834,8 +3834,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT:   %T2: type = class_type @T2 [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base.d0c: type = class_type @Base, @Base(%T) [symbolic]
@@ -4047,8 +4047,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base: type = class_type @Base, @Base(%T) [symbolic]
@@ -4303,8 +4303,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base.d0c: type = class_type @Base, @Base(%T) [symbolic]
@@ -4588,8 +4588,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base.d0c: type = class_type @Base, @Base(%T) [symbolic]
@@ -4757,8 +4757,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Base.type: type = generic_class_type @Base [concrete]
 // CHECK:STDOUT:   %Base.generic: %Base.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Base: type = class_type @Base, @Base(%T) [symbolic]
@@ -5020,8 +5020,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %G1: type = symbolic_binding G1, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %G1: type = symbolic_binding G1, 0 [symbolic]
 // CHECK:STDOUT:   %T1.type: type = generic_class_type @T1 [concrete]
 // CHECK:STDOUT:   %T1.generic: %T1.type = struct_value () [concrete]
 // CHECK:STDOUT:   %T1.6d4458.1: type = class_type @T1, @T1(%G1) [symbolic]
@@ -5217,8 +5217,8 @@ class T2(G2:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %G1: type = symbolic_binding G1, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %G1: type = symbolic_binding G1, 0 [symbolic]
 // CHECK:STDOUT:   %T1.type: type = generic_class_type @T1 [concrete]
 // CHECK:STDOUT:   %T1.generic: %T1.type = struct_value () [concrete]
 // CHECK:STDOUT:   %T1.6d4458.1: type = class_type @T1, @T1(%G1) [symbolic]

+ 8 - 8
toolchain/check/testdata/deduce/array.carbon

@@ -153,8 +153,8 @@ fn G() {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_3: Core.IntLiteral = int_value 3 [concrete]
 // CHECK:STDOUT:   %array_type.3ec: type = array_type %int_3, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.b3f: type = pattern_type %array_type.3ec [symbolic]
@@ -349,8 +349,8 @@ fn G() {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %array_type.c79: type = array_type %N, %C [symbolic]
 // CHECK:STDOUT:   %pattern_type.cc9: type = pattern_type %array_type.c79 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
@@ -568,13 +568,13 @@ fn G() {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 1 [symbolic]
 // CHECK:STDOUT:   %array_type.6d2: type = array_type %N, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.4d8: type = pattern_type %array_type.6d2 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
@@ -743,8 +743,8 @@ fn G() {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_2: Core.IntLiteral = int_value 2 [concrete]
 // CHECK:STDOUT:   %array_type.a0b: type = array_type %int_2, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.b42: type = pattern_type %array_type.a0b [symbolic]
@@ -946,8 +946,8 @@ fn G() {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %array_type.c79: type = array_type %N, %C [symbolic]
 // CHECK:STDOUT:   %pattern_type.cc9: type = pattern_type %array_type.c79 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
@@ -1183,8 +1183,8 @@ fn G() {
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
 // CHECK:STDOUT:   %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
 // CHECK:STDOUT:   %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
@@ -1402,8 +1402,8 @@ fn G() {
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
 // CHECK:STDOUT:   %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
 // CHECK:STDOUT:   %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]

+ 3 - 3
toolchain/check/testdata/deduce/binding_pattern.carbon

@@ -62,8 +62,8 @@ fn F(unused U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
@@ -258,8 +258,8 @@ fn F(unused U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
@@ -283,8 +283,8 @@ fn F(unused U:! type, V:! type where {} impls Core.ImplicitAs(.Self)) {
 // CHECK:STDOUT:   %ImplicitAs.WithSelf.Convert.1de: %ImplicitAs.WithSelf.Convert.type.b3a = struct_value () [symbolic]
 // CHECK:STDOUT:   %ImplicitAs.type.f60: type = facet_type <@ImplicitAs, @ImplicitAs(%.Self.16f)> [symbolic_self]
 // CHECK:STDOUT:   %type_where: type = facet_type <type where TODO> [concrete]
-// CHECK:STDOUT:   %V: %type_where = symbolic_binding V, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.354: type = pattern_type %type_where [concrete]
+// CHECK:STDOUT:   %V: %type_where = symbolic_binding V, 1 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT:   %V.binding.as_type: type = symbolic_binding_type V, 1, %V [symbolic]

+ 4 - 4
toolchain/check/testdata/deduce/generic_type.carbon

@@ -74,8 +74,8 @@ fn G() -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%T) [symbolic]
@@ -267,8 +267,8 @@ fn G() -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type: type = generic_class_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type = struct_value () [concrete]
 // CHECK:STDOUT:   %I.3cf: type = class_type @I, @I(%T) [symbolic]
@@ -448,8 +448,8 @@ fn G() -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Outer.387: type = class_type @Outer, @Outer(%T) [symbolic]
@@ -755,8 +755,8 @@ fn G() -> i32 {
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %N.fe9: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %WithNontype.type: type = generic_class_type @WithNontype [concrete]
 // CHECK:STDOUT:   %WithNontype.generic: %WithNontype.type = struct_value () [concrete]
 // CHECK:STDOUT:   %WithNontype.205: type = class_type @WithNontype, @WithNontype(%N.5de) [symbolic]

+ 2 - 2
toolchain/check/testdata/deduce/int_float.carbon

@@ -43,8 +43,8 @@ fn G(a: f64) -> Core.IntLiteral() {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Int: type = class_type @Int, @Int(%N) [symbolic]
@@ -198,8 +198,8 @@ fn G(a: f64) -> Core.IntLiteral() {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %Float.type: type = generic_class_type @Float [concrete]
 // CHECK:STDOUT:   %Float.generic: %Float.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Float: type = class_type @Float, @Float(%N) [symbolic]

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

@@ -66,8 +66,8 @@ fn G(pair: (C, D)) -> D {
 // CHECK:STDOUT:   %D: type = class_type @D [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %tuple.type.24b: type = tuple_type (type, type) [concrete]
 // CHECK:STDOUT:   %tuple.4b9: %tuple.type.24b = tuple_value (%T, %U) [symbolic]
@@ -251,15 +251,15 @@ fn G(pair: (C, D)) -> D {
 // CHECK:STDOUT:   %tuple.type.24b: type = tuple_type (type, type) [concrete]
 // CHECK:STDOUT:   %tuple.95a: %tuple.type.24b = tuple_value (%i32, %i32) [concrete]
 // CHECK:STDOUT:   %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete]
-// CHECK:STDOUT:   %Pair: %tuple.type.d07 = symbolic_binding Pair, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.511: type = pattern_type %tuple.type.d07 [concrete]
+// CHECK:STDOUT:   %Pair: %tuple.type.d07 = symbolic_binding Pair, 0 [symbolic]
 // CHECK:STDOUT:   %HasPair.type: type = generic_class_type @HasPair [concrete]
 // CHECK:STDOUT:   %HasPair.generic: %HasPair.type = struct_value () [concrete]
 // CHECK:STDOUT:   %HasPair.7cc: type = class_type @HasPair, @HasPair(%Pair) [symbolic]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
-// CHECK:STDOUT:   %A: %i32 = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %A: %i32 = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %B: %i32 = symbolic_binding B, 1 [symbolic]
 // CHECK:STDOUT:   %tuple.9c9: %tuple.type.d07 = tuple_value (%A, %B) [symbolic]
 // CHECK:STDOUT:   %HasPair.2e7: type = class_type @HasPair, @HasPair(%tuple.9c9) [symbolic]
@@ -515,8 +515,8 @@ fn G(pair: (C, D)) -> D {
 // CHECK:STDOUT:   %D: type = class_type @D [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %tuple.type.24b: type = tuple_type (type, type) [concrete]
 // CHECK:STDOUT:   %tuple.11e: %tuple.type.24b = tuple_value (%T, %T) [symbolic]
 // CHECK:STDOUT:   %tuple.type.07a: type = tuple_type (%T, %T) [symbolic]

+ 4 - 4
toolchain/check/testdata/deduce/type_operator.carbon

@@ -75,8 +75,8 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
 // CHECK:STDOUT:   %.184: Core.Form = init_form %T [symbolic]
@@ -229,8 +229,8 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %const.4ff: type = const_type %T [symbolic]
 // CHECK:STDOUT:   %ptr.a15: type = ptr_type %const.4ff [symbolic]
 // CHECK:STDOUT:   %pattern_type.26f: type = pattern_type %ptr.a15 [symbolic]
@@ -390,8 +390,8 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
 // CHECK:STDOUT:   %.184: Core.Form = init_form %T [symbolic]
@@ -547,8 +547,8 @@ fn G(p: C*) -> const C {
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %const.4ff: type = const_type %T [symbolic]
 // CHECK:STDOUT:   %ptr.a15: type = ptr_type %const.4ff [symbolic]
 // CHECK:STDOUT:   %pattern_type.26f: type = pattern_type %ptr.a15 [symbolic]

+ 4 - 4
toolchain/check/testdata/deduce/value_with_type_through_access.carbon

@@ -119,8 +119,8 @@ fn G() {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %tuple.type: type = tuple_type (type) [concrete]
 // CHECK:STDOUT:   %tuple.0d2: %tuple.type = tuple_value (type) [concrete]
-// CHECK:STDOUT:   %T: %tuple.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.f1e: type = pattern_type %tuple.type [concrete]
+// CHECK:STDOUT:   %T: %tuple.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HoldsType.type: type = generic_class_type @HoldsType [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HoldsType.generic: %HoldsType.type = struct_value () [concrete]
@@ -326,8 +326,8 @@ fn G() {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %struct_type.t: type = struct_type {.t: type} [concrete]
-// CHECK:STDOUT:   %T: %struct_type.t = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7f2: type = pattern_type %struct_type.t [concrete]
+// CHECK:STDOUT:   %T: %struct_type.t = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HoldsType.type: type = generic_class_type @HoldsType [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HoldsType.generic: %HoldsType.type = struct_value () [concrete]
@@ -532,8 +532,8 @@ fn G() {
 // CHECK:STDOUT:   %complete_type.509: <witness> = complete_type_witness %struct_type.t [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.d7d: %Class = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.904: type = pattern_type %Class [concrete]
+// CHECK:STDOUT:   %T.d7d: %Class = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HoldsType.type: type = generic_class_type @HoldsType [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HoldsType.generic: %HoldsType.type = struct_value () [concrete]
@@ -768,8 +768,8 @@ fn G() {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %int_1: Core.IntLiteral = int_value 1 [concrete]
 // CHECK:STDOUT:   %array_type: type = array_type %int_1, type [concrete]
-// CHECK:STDOUT:   %T.9b7: %array_type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dcb: type = pattern_type %array_type [concrete]
+// CHECK:STDOUT:   %T.9b7: %array_type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HoldsType.type: type = generic_class_type @HoldsType [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HoldsType.generic: %HoldsType.type = struct_value () [concrete]

+ 3 - 3
toolchain/check/testdata/facet/access.carbon

@@ -509,8 +509,8 @@ fn F2(U:! Z) {
 // CHECK:STDOUT:   %I.type: type = facet_type <@I> [concrete]
 // CHECK:STDOUT:   %I.assoc_type: type = assoc_entity_type @I [concrete]
 // CHECK:STDOUT:   %assoc0: %I.assoc_type = assoc_entity element0, @I.WithSelf.%I.WithSelf.Copy.decl [concrete]
-// CHECK:STDOUT:   %T: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9d9: type = pattern_type %I.type [concrete]
+// CHECK:STDOUT:   %T: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.422: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %.ff7: Core.Form = init_form %T.binding.as_type [symbolic]
@@ -699,8 +699,8 @@ fn F2(U:! Z) {
 // CHECK:STDOUT:   %impl.elem0: type = impl_witness_access %A.lookup_impl_witness.6a5, element0 [symbolic_self]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %A_where.type: type = facet_type <@A where %impl.elem0 = %empty_tuple.type> [concrete]
-// CHECK:STDOUT:   %AA: %A_where.type = symbolic_binding AA, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc8: type = pattern_type %A_where.type [concrete]
+// CHECK:STDOUT:   %AA: %A_where.type = symbolic_binding AA, 0 [symbolic]
 // CHECK:STDOUT:   %AA.binding.as_type: type = symbolic_binding_type AA, 0, %AA [symbolic]
 // CHECK:STDOUT:   %A.lookup_impl_witness.6c3: <witness> = lookup_impl_witness %AA, @A [symbolic]
 // CHECK:STDOUT:   %A.facet: %A.type = facet_value %AA.binding.as_type, (%A.lookup_impl_witness.6c3) [symbolic]
@@ -829,8 +829,8 @@ fn F2(U:! Z) {
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
 // CHECK:STDOUT:   %empty_struct: %empty_struct_type = struct_value () [concrete]
 // CHECK:STDOUT:   %facet_type.82c: type = facet_type <@A & @B where %impl.elem0.eb8 = %empty_tuple.type and %impl.elem0.11d = %empty_struct_type> [concrete]
-// CHECK:STDOUT:   %AB: %facet_type.82c = symbolic_binding AB, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.77e: type = pattern_type %facet_type.82c [concrete]
+// CHECK:STDOUT:   %AB: %facet_type.82c = symbolic_binding AB, 0 [symbolic]
 // CHECK:STDOUT:   %AB.binding.as_type: type = symbolic_binding_type AB, 0, %AB [symbolic]
 // CHECK:STDOUT:   %A.lookup_impl_witness.1b9: <witness> = lookup_impl_witness %AB, @A [symbolic]
 // CHECK:STDOUT:   %.262: Core.Form = init_form %empty_tuple.type [concrete]

+ 1 - 1
toolchain/check/testdata/facet/call_combined_impl_witness.carbon

@@ -95,8 +95,8 @@ fn F() {
 // CHECK:STDOUT:   %facet_type.902: type = facet_type <@Empty & @A> [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound.ab2: <bound method> = bound_method %facet_type.902, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type.dc7: type = facet_type <@Empty & @A & @B> [concrete]
-// CHECK:STDOUT:   %T: %facet_type.dc7 = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.773: type = pattern_type %facet_type.dc7 [concrete]
+// CHECK:STDOUT:   %T: %facet_type.dc7 = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.2ee: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %G.type: type = fn_type @G [concrete]

+ 1 - 1
toolchain/check/testdata/facet/convert_class_type_to_facet_type.carbon

@@ -35,8 +35,8 @@ fn F() {
 // CHECK:STDOUT:   %Animal.facet: %Animal.type = facet_value %Goat, (%Animal.impl_witness) [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %A: %Animal.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %A: %Animal.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %WalkAnimal.type: type = fn_type @WalkAnimal [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %WalkAnimal: %WalkAnimal.type = struct_value () [concrete]

+ 4 - 4
toolchain/check/testdata/facet/convert_class_type_to_generic_facet_value.carbon

@@ -67,8 +67,8 @@ fn G() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.835: type = generic_interface_type @Generic [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Generic.generic: %Generic.type.835 = struct_value () [concrete]
@@ -96,8 +96,8 @@ fn G() {
 // CHECK:STDOUT:   %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete]
 // CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
-// CHECK:STDOUT:   %U.0f2266.1: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.c49: type = pattern_type %Generic.type.03dff7.2 [symbolic]
+// CHECK:STDOUT:   %U.0f2266.1: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete]
 // CHECK:STDOUT:   %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete]
 // CHECK:STDOUT:   %G.type: type = fn_type @G [concrete]
@@ -415,8 +415,8 @@ fn G() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.835: type = generic_interface_type @Generic [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Generic.generic: %Generic.type.835 = struct_value () [concrete]
@@ -444,8 +444,8 @@ fn G() {
 // CHECK:STDOUT:   %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete]
 // CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
-// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.c49: type = pattern_type %Generic.type.03dff7.2 [symbolic]
+// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete]
 // CHECK:STDOUT:   %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/facet/convert_class_value_to_facet_value_value.carbon

@@ -30,8 +30,8 @@ fn F() {
 // CHECK:STDOUT:   %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e10: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %T: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.892: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %WalkAnimal.type: type = fn_type @WalkAnimal [concrete]

+ 8 - 8
toolchain/check/testdata/facet/convert_class_value_to_generic_facet_value_value.carbon

@@ -99,8 +99,8 @@ fn B() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.835: type = generic_interface_type @Generic [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Generic.generic: %Generic.type.835 = struct_value () [concrete]
@@ -128,8 +128,8 @@ fn B() {
 // CHECK:STDOUT:   %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete]
 // CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
-// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.c49: type = pattern_type %Generic.type.03dff7.2 [symbolic]
+// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %Self.15d2d5.2: %Generic.type.03dff7.2 = symbolic_binding Self, 1 [symbolic]
 // CHECK:STDOUT:   %Generic.WithSelf.F.type.74390a.2: type = fn_type @Generic.WithSelf.F, @Generic.WithSelf(%T, %Self.15d2d5.1) [symbolic]
 // CHECK:STDOUT:   %Generic.WithSelf.F.baf95a.2: %Generic.WithSelf.F.type.74390a.2 = struct_value () [symbolic]
@@ -472,8 +472,8 @@ fn B() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %V: type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %V: type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %W: type = symbolic_binding W, 1 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
@@ -492,8 +492,8 @@ fn B() {
 // CHECK:STDOUT:   %I.facet.a6e: %I.type.eb9 = facet_value %C, (%I.impl_witness.1cb) [symbolic]
 // CHECK:STDOUT:   %empty_struct: %empty_struct_type = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.5f7: type = facet_type <@I, @I(%empty_struct_type, %empty_tuple.type)> [concrete]
-// CHECK:STDOUT:   %T.bc3: %I.type.5f7 = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.eee: type = pattern_type %I.type.5f7 [concrete]
+// CHECK:STDOUT:   %T.bc3: %I.type.5f7 = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Self.2a6: %I.type.5f7 = symbolic_binding Self, 2 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.bc3 [symbolic]
 // CHECK:STDOUT:   %pattern_type.826: type = pattern_type %T.binding.as_type [symbolic]
@@ -740,8 +740,8 @@ fn B() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %V: type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %V: type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %W: type = symbolic_binding W, 1 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
@@ -760,8 +760,8 @@ fn B() {
 // CHECK:STDOUT:   %I.facet: %I.type.eb9 = facet_value %C, (%I.impl_witness) [symbolic]
 // CHECK:STDOUT:   %empty_struct: %empty_struct_type = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.7b9: type = facet_type <@I, @I(%empty_struct_type, %empty_struct_type)> [concrete]
-// CHECK:STDOUT:   %T.274: %I.type.7b9 = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.24a: type = pattern_type %I.type.7b9 [concrete]
+// CHECK:STDOUT:   %T.274: %I.type.7b9 = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Self.c70: %I.type.7b9 = symbolic_binding Self, 2 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.274 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ced: type = pattern_type %T.binding.as_type [symbolic]
@@ -972,8 +972,8 @@ fn B() {
 // CHECK:STDOUT:   %Self: %I.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %V: type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %V: type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %W: type = symbolic_binding W, 1 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
@@ -986,8 +986,8 @@ fn B() {
 // CHECK:STDOUT:   %C.13c: type = class_type @C, @C(%T.67d, %empty_tuple.type) [symbolic]
 // CHECK:STDOUT:   %I.impl_witness: <witness> = impl_witness @C.as.I.impl.%I.impl_witness_table, @C.as.I.impl(%T.67d) [symbolic]
 // CHECK:STDOUT:   %I.facet: %I.type = facet_value %C.13c, (%I.impl_witness) [symbolic]
-// CHECK:STDOUT:   %T.651: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9d9: type = pattern_type %I.type [concrete]
+// CHECK:STDOUT:   %T.651: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.651 [symbolic]
 // CHECK:STDOUT:   %pattern_type.422: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %A.type: type = fn_type @A [concrete]

+ 1 - 1
toolchain/check/testdata/facet/convert_facet_value_as_type_knows_original_type.carbon

@@ -225,8 +225,8 @@ fn F[A:! J, B:! A](x: C(A, B)) {
 // CHECK:STDOUT:   %J.type: type = facet_type <@J> [concrete]
 // CHECK:STDOUT:   %A: %J.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic]
-// CHECK:STDOUT:   %B: %A.binding.as_type = symbolic_binding B, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.14f: type = pattern_type %A.binding.as_type [symbolic]
+// CHECK:STDOUT:   %B: %A.binding.as_type = symbolic_binding B, 1 [symbolic]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %C: type = class_type @C, @C(%A, %B) [symbolic]
 // CHECK:STDOUT:   %pattern_type.e04: type = pattern_type %C [symbolic]

+ 1 - 1
toolchain/check/testdata/facet/convert_facet_value_to_itself.carbon

@@ -32,8 +32,8 @@ fn F() {
 // CHECK:STDOUT:   %Self: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.99815a.1: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %T.99815a.1: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %FeedAnimal.type: type = fn_type @FeedAnimal [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %FeedAnimal: %FeedAnimal.type = struct_value () [concrete]

+ 12 - 12
toolchain/check/testdata/facet/convert_facet_value_to_narrowed_facet_type.carbon

@@ -98,8 +98,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %Eats.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.0dc: type = pattern_type %Eats.type [concrete]
+// CHECK:STDOUT:   %T: %Eats.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.93e: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %Feed.type: type = fn_type @Feed [concrete]
@@ -117,8 +117,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %Animal.type, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type: type = facet_type <@Eats & @Animal> [concrete]
-// CHECK:STDOUT:   %U: %facet_type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.37f: type = pattern_type %facet_type [concrete]
+// CHECK:STDOUT:   %U: %facet_type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %U.binding.as_type: type = symbolic_binding_type U, 0, %U [symbolic]
 // CHECK:STDOUT:   %pattern_type.256: type = pattern_type %U.binding.as_type [symbolic]
 // CHECK:STDOUT:   %HandleAnimal.type: type = fn_type @HandleAnimal [concrete]
@@ -306,8 +306,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound.a5f: <bound method> = bound_method %Tame.type, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type.2db: type = facet_type <@Eats & @Tame> [concrete]
-// CHECK:STDOUT:   %V: %facet_type.2db = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.fa7: type = pattern_type %facet_type.2db [concrete]
+// CHECK:STDOUT:   %V: %facet_type.2db = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic]
 // CHECK:STDOUT:   %pattern_type.795: type = pattern_type %V.binding.as_type [symbolic]
 // CHECK:STDOUT:   %FeedTame.type: type = fn_type @FeedTame [concrete]
@@ -317,8 +317,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %facet_type.a63: type = facet_type <@Eats & @Animal> [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound.986: <bound method> = bound_method %facet_type.a63, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type.206: type = facet_type <@Eats & @Animal & @Tame> [concrete]
-// CHECK:STDOUT:   %W: %facet_type.206 = symbolic_binding W, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.fb4: type = pattern_type %facet_type.206 [concrete]
+// CHECK:STDOUT:   %W: %facet_type.206 = symbolic_binding W, 0 [symbolic]
 // CHECK:STDOUT:   %W.binding.as_type: type = symbolic_binding_type W, 0, %W [symbolic]
 // CHECK:STDOUT:   %pattern_type.e8e: type = pattern_type %W.binding.as_type [symbolic]
 // CHECK:STDOUT:   %HandleTameAnimal.type: type = fn_type @HandleTameAnimal [concrete]
@@ -525,8 +525,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %Self.ab8: %Tame.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %A: %Animal.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e10: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %A: %Animal.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic]
 // CHECK:STDOUT:   %Eats.impl_witness.760: <witness> = impl_witness @A.binding.as_type.as.Eats.impl.%Eats.impl_witness_table, @A.binding.as_type.as.Eats.impl(%A) [symbolic]
 // CHECK:STDOUT:   %Eats.facet: %Eats.type = facet_value %A.binding.as_type, (%Eats.impl_witness.760) [symbolic]
@@ -542,8 +542,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound.a5f: <bound method> = bound_method %Tame.type, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type.2db: type = facet_type <@Eats & @Tame> [concrete]
-// CHECK:STDOUT:   %V: %facet_type.2db = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.fa7: type = pattern_type %facet_type.2db [concrete]
+// CHECK:STDOUT:   %V: %facet_type.2db = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %V.binding.as_type: type = symbolic_binding_type V, 0, %V [symbolic]
 // CHECK:STDOUT:   %pattern_type.795: type = pattern_type %V.binding.as_type [symbolic]
 // CHECK:STDOUT:   %FeedTame2.type: type = fn_type @FeedTame2 [concrete]
@@ -551,8 +551,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %require_complete.12d: <witness> = require_complete_type %V.binding.as_type [symbolic]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound.92c: <bound method> = bound_method %Animal.type, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type.afc: type = facet_type <@Animal & @Tame> [concrete]
-// CHECK:STDOUT:   %W: %facet_type.afc = symbolic_binding W, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.310: type = pattern_type %facet_type.afc [concrete]
+// CHECK:STDOUT:   %W: %facet_type.afc = symbolic_binding W, 0 [symbolic]
 // CHECK:STDOUT:   %W.binding.as_type: type = symbolic_binding_type W, 0, %W [symbolic]
 // CHECK:STDOUT:   %pattern_type.da7: type = pattern_type %W.binding.as_type [symbolic]
 // CHECK:STDOUT:   %HandleTameAnimal2.type: type = fn_type @HandleTameAnimal2 [concrete]
@@ -803,8 +803,8 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %Self: %A.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %A.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.faf: type = pattern_type %A.type [concrete]
+// CHECK:STDOUT:   %T: %A.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.057cf4.1: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %TakesA.type: type = fn_type @TakesA [concrete]
@@ -960,16 +960,16 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T.67db0b.1 [symbolic]
 // CHECK:STDOUT:   %TakesTypeDeduced.type: type = fn_type @TakesTypeDeduced [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %TakesTypeDeduced: %TakesTypeDeduced.type = struct_value () [concrete]
 // CHECK:STDOUT:   %require_complete.944: <witness> = require_complete_type %T.67db0b.1 [symbolic]
 // CHECK:STDOUT:   %.Self.16f: type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %U: %type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9a5: type = pattern_type %type [concrete]
+// CHECK:STDOUT:   %U: %type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %U.binding.as_type: type = symbolic_binding_type U, 0, %U [symbolic]
 // CHECK:STDOUT:   %pattern_type.349: type = pattern_type %U.binding.as_type [symbolic]
 // CHECK:STDOUT:   %CallsWithExtraWhere.type: type = fn_type @CallsWithExtraWhere [concrete]
@@ -1170,16 +1170,16 @@ fn CallsWithTypeExplicit(U:! type) {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %.Self.16f: type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.f45530.1: %type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9a5: type = pattern_type %type [concrete]
+// CHECK:STDOUT:   %T.f45530.1: %type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.f45530.1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.349: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %TakesExtraWhereDeduced.type: type = fn_type @TakesExtraWhereDeduced [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %TakesExtraWhereDeduced: %TakesExtraWhereDeduced.type = struct_value () [concrete]
 // CHECK:STDOUT:   %require_complete.d55: <witness> = require_complete_type %T.binding.as_type [symbolic]
-// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %U [symbolic]
 // CHECK:STDOUT:   %CallsWithType.type: type = fn_type @CallsWithType [concrete]
 // CHECK:STDOUT:   %CallsWithType: %CallsWithType.type = struct_value () [concrete]

+ 2 - 2
toolchain/check/testdata/facet/convert_facet_value_value_to_blanket_impl.carbon

@@ -30,13 +30,13 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %A: %Animal.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e10: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %A: %Animal.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic]
 // CHECK:STDOUT:   %Eats.impl_witness.760d13.1: <witness> = impl_witness @A.binding.as_type.as.Eats.impl.%Eats.impl_witness_table, @A.binding.as_type.as.Eats.impl(%A) [symbolic]
 // CHECK:STDOUT:   %Eats.facet.6e5: %Eats.type = facet_value %A.binding.as_type, (%Eats.impl_witness.760d13.1) [symbolic]
-// CHECK:STDOUT:   %T.f11: %Eats.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.0dc: type = pattern_type %Eats.type [concrete]
+// CHECK:STDOUT:   %T.f11: %Eats.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.265: type = symbolic_binding_type T, 0, %T.f11 [symbolic]
 // CHECK:STDOUT:   %pattern_type.93e: type = pattern_type %T.binding.as_type.265 [symbolic]
 // CHECK:STDOUT:   %Feed.type: type = fn_type @Feed [concrete]

+ 4 - 4
toolchain/check/testdata/facet/convert_facet_value_value_to_generic_facet_value_value.carbon

@@ -49,17 +49,17 @@ fn F() {
 // CHECK:STDOUT:   %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Food.67d: type = symbolic_binding Food, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Food.67d: type = symbolic_binding Food, 0 [symbolic]
 // CHECK:STDOUT:   %Eats.type.321: type = generic_interface_type @Eats [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Eats.generic: %Eats.type.321 = struct_value () [concrete]
 // CHECK:STDOUT:   %Eats.type.394: type = facet_type <@Eats, @Eats(%Food.67d)> [symbolic]
 // CHECK:STDOUT:   %Self.857: %Eats.type.394 = symbolic_binding Self, 1 [symbolic]
-// CHECK:STDOUT:   %T.998: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e10: type = pattern_type %Animal.type [concrete]
-// CHECK:STDOUT:   %U: %Edible.type = symbolic_binding U, 1 [symbolic]
+// CHECK:STDOUT:   %T.998: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.b51: type = pattern_type %Edible.type [concrete]
+// CHECK:STDOUT:   %U: %Edible.type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.e4f: type = symbolic_binding_type T, 0, %T.998 [symbolic]
 // CHECK:STDOUT:   %U.binding.as_type: type = symbolic_binding_type U, 1, %U [symbolic]
 // CHECK:STDOUT:   %Eats.type.bb4cf6.1: type = facet_type <@Eats, @Eats(%U.binding.as_type)> [symbolic]
@@ -73,8 +73,8 @@ fn F() {
 // CHECK:STDOUT:   %Food.d1c: %Edible.type = symbolic_binding Food, 0 [symbolic]
 // CHECK:STDOUT:   %Food.binding.as_type.8cc: type = symbolic_binding_type Food, 0, %Food.d1c [symbolic]
 // CHECK:STDOUT:   %Eats.type.570: type = facet_type <@Eats, @Eats(%Food.binding.as_type.8cc)> [symbolic]
-// CHECK:STDOUT:   %T.2b9: %Eats.type.570 = symbolic_binding T, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.350: type = pattern_type %Eats.type.570 [symbolic]
+// CHECK:STDOUT:   %T.2b9: %Eats.type.570 = symbolic_binding T, 1 [symbolic]
 // CHECK:STDOUT:   %Self.a66: %Eats.type.570 = symbolic_binding Self, 1 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.8ae: type = symbolic_binding_type T, 1, %T.2b9 [symbolic]
 // CHECK:STDOUT:   %pattern_type.2b9: type = pattern_type %T.binding.as_type.8ae [symbolic]

+ 1 - 1
toolchain/check/testdata/facet/convert_facet_value_value_to_itself.carbon

@@ -32,8 +32,8 @@ fn F() {
 // CHECK:STDOUT:   %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e10: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %T: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.892: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %FeedAnimal.type: type = fn_type @FeedAnimal [concrete]

+ 2 - 2
toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon

@@ -42,8 +42,8 @@ fn G() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.835: type = generic_interface_type @Generic [concrete]
 // CHECK:STDOUT:   %Generic.generic: %Generic.type.835 = struct_value () [concrete]
 // CHECK:STDOUT:   %Generic.type.03dff7.1: type = facet_type <@Generic, @Generic(%Scalar)> [symbolic]
@@ -71,8 +71,8 @@ fn G() {
 // CHECK:STDOUT:   %Generic.WithSelf.F.1fd: %Generic.WithSelf.F.type.c86 = struct_value () [concrete]
 // CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
-// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.c49: type = pattern_type %Generic.type.03dff7.2 [symbolic]
+// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete]
 // CHECK:STDOUT:   %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete]
 // CHECK:STDOUT:   %G.type: type = fn_type @G [concrete]

+ 2 - 2
toolchain/check/testdata/facet/fail_convert_facet_value_to_missing_impl.carbon

@@ -35,15 +35,15 @@ fn HandleAnimal[T:! Animal](a: T) { Feed(a); }
 // CHECK:STDOUT:   %Self.c49: %Animal.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.f11: %Eats.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.0dc: type = pattern_type %Eats.type [concrete]
+// CHECK:STDOUT:   %T.f11: %Eats.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.265: type = symbolic_binding_type T, 0, %T.f11 [symbolic]
 // CHECK:STDOUT:   %pattern_type.93e: type = pattern_type %T.binding.as_type.265 [symbolic]
 // CHECK:STDOUT:   %Feed.type: type = fn_type @Feed [concrete]
 // CHECK:STDOUT:   %Feed: %Feed.type = struct_value () [concrete]
 // CHECK:STDOUT:   %require_complete.9d9: <witness> = require_complete_type %T.binding.as_type.265 [symbolic]
-// CHECK:STDOUT:   %T.998: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e10: type = pattern_type %Animal.type [concrete]
+// CHECK:STDOUT:   %T.998: %Animal.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.e4f: type = symbolic_binding_type T, 0, %T.998 [symbolic]
 // CHECK:STDOUT:   %pattern_type.892: type = pattern_type %T.binding.as_type.e4f [symbolic]
 // CHECK:STDOUT:   %HandleAnimal.type: type = fn_type @HandleAnimal [concrete]

+ 2 - 2
toolchain/check/testdata/facet/fail_deduction_uses_runtime_type_conversion.carbon

@@ -47,8 +47,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %tuple.type: type = tuple_type (type) [concrete]
 // CHECK:STDOUT:   %tuple.0d2: %tuple.type = tuple_value (type) [concrete]
-// CHECK:STDOUT:   %T: %tuple.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.f1e: type = pattern_type %tuple.type [concrete]
+// CHECK:STDOUT:   %T: %tuple.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HoldsType.type: type = generic_class_type @HoldsType [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HoldsType.generic: %HoldsType.type = struct_value () [concrete]
@@ -72,8 +72,8 @@ fn G(holds_to: HoldsType((RuntimeConvertTo, )), from:! RuntimeConvertFrom) {
 // CHECK:STDOUT:   %RuntimeConvertTo.val: %RuntimeConvertTo = struct_value () [concrete]
 // CHECK:STDOUT:   %int_0: Core.IntLiteral = int_value 0 [concrete]
 // CHECK:STDOUT:   %tuple.elem0: type = tuple_access %T, element0 [symbolic]
-// CHECK:STDOUT:   %A: %tuple.elem0 = symbolic_binding A, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e66: type = pattern_type %tuple.elem0 [symbolic]
+// CHECK:STDOUT:   %A: %tuple.elem0 = symbolic_binding A, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.17d: type = pattern_type %HoldsType.f6a [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 2 - 2
toolchain/check/testdata/facet/period_self.carbon

@@ -354,8 +354,8 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
@@ -374,8 +374,8 @@ fn F[U:! Core.Destroy where .Self impls I(.Self)](u: U) {
 // CHECK:STDOUT:   %impl.elem0: type = impl_witness_access %I.lookup_impl_witness.3fc, element0 [symbolic_self]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %I_where.type: type = facet_type <@I, @I(%.Self.binding.as_type.8db) where %impl.elem0 = %empty_tuple.type> [symbolic_self]
-// CHECK:STDOUT:   %T.706: %I_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.033: type = pattern_type %I_where.type [symbolic_self]
+// CHECK:STDOUT:   %T.706: %I_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.706 [symbolic]
 // CHECK:STDOUT:   %I.lookup_impl_witness.94d: <witness> = lookup_impl_witness %T.706, @I, @I(%.Self.binding.as_type.8db) [symbolic]
 // CHECK:STDOUT:   %I.facet: %I.type.bee = facet_value %T.binding.as_type, (%I.lookup_impl_witness.94d) [symbolic]

+ 2 - 2
toolchain/check/testdata/facet/require_import.carbon

@@ -68,15 +68,15 @@ fn F(B:! Y) {
 // CHECK:STDOUT:   %Z.type.9f3244.1: type = facet_type <@Z, @Z(%Self.binding.as_type.f60)> [symbolic]
 // CHECK:STDOUT:   %Self.fcd60c.1: %Z.type.9f3244.1 = symbolic_binding Self, 1 [symbolic]
 // CHECK:STDOUT:   %require_complete.18ce0f.1: <witness> = require_complete_type %Z.type.9f3244.1 [symbolic]
-// CHECK:STDOUT:   %A: %X.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9a5: type = pattern_type %X.type [concrete]
+// CHECK:STDOUT:   %A: %X.type = symbolic_binding A, 0 [symbolic]
 // CHECK:STDOUT:   %Y.type: type = facet_type <@Y> [concrete]
 // CHECK:STDOUT:   %Self.d4d: %Y.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %Self.binding.as_type.63e: type = symbolic_binding_type Self, 0, %Self.d4d [symbolic]
 // CHECK:STDOUT:   %Z.type.d16: type = facet_type <@Z, @Z(%Self.binding.as_type.63e)> [symbolic]
 // CHECK:STDOUT:   %Self.890: %Z.type.d16 = symbolic_binding Self, 1 [symbolic]
-// CHECK:STDOUT:   %B: %Y.type = symbolic_binding B, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.95b: type = pattern_type %Y.type [concrete]
+// CHECK:STDOUT:   %B: %Y.type = symbolic_binding B, 1 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT:   %A.binding.as_type: type = symbolic_binding_type A, 0, %A [symbolic]

+ 1 - 1
toolchain/check/testdata/facet/self_in_interface_param.carbon

@@ -40,8 +40,8 @@ fn G(_:! I(.Self) where .I1 = ()) {}
 // CHECK:STDOUT:   %impl.elem0: type = impl_witness_access %I.lookup_impl_witness.3fc, element0 [symbolic_self]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %I_where.type: type = facet_type <@I, @I(%.Self.binding.as_type.8db) where %impl.elem0 = %empty_tuple.type> [symbolic_self]
-// CHECK:STDOUT:   %T.706: %I_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.033: type = pattern_type %I_where.type [symbolic_self]
+// CHECK:STDOUT:   %T.706: %I_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.706 [symbolic]
 // CHECK:STDOUT:   %I.lookup_impl_witness.94d: <witness> = lookup_impl_witness %T.706, @I, @I(%.Self.binding.as_type.8db) [symbolic]
 // CHECK:STDOUT:   %.262: Core.Form = init_form %empty_tuple.type [concrete]

+ 2 - 2
toolchain/check/testdata/for/actual.carbon

@@ -57,8 +57,8 @@ fn Read(y:! Core.IntLiteral()) {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %IntRange.type: type = generic_class_type @IntRange [concrete]
 // CHECK:STDOUT:   %IntRange.generic: %IntRange.type = struct_value () [concrete]
 // CHECK:STDOUT:   %IntRange.265: type = class_type @IntRange, @IntRange(%N) [symbolic]
@@ -856,8 +856,8 @@ fn Read(y:! Core.IntLiteral()) {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %y: Core.IntLiteral = symbolic_binding y, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %y: Core.IntLiteral = symbolic_binding y, 0 [symbolic]
 // CHECK:STDOUT:   %Read.type: type = fn_type @Read [concrete]
 // CHECK:STDOUT:   %Read: %Read.type = struct_value () [concrete]
 // CHECK:STDOUT:   %IntRange.type: type = generic_class_type @IntRange [concrete]

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

@@ -32,8 +32,8 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); }
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %F: type = symbolic_binding F, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %F: type = symbolic_binding F, 0 [symbolic]
 // CHECK:STDOUT:   %Class.type: type = generic_class_type @Class [concrete]
 // CHECK:STDOUT:   %Class.generic: %Class.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Class: type = class_type @Class, @Class(%F) [symbolic]

+ 1 - 1
toolchain/check/testdata/function/definition/syntactic_merge.carbon

@@ -693,8 +693,8 @@ fn Foo(unused a: const (const C)) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %a.9daf47.1: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %a.9daf47.1: %C = symbolic_binding a, 0 [symbolic]
 // CHECK:STDOUT:   %Foo.type.47530a.1: type = fn_type @Foo.loc7 [concrete]
 // CHECK:STDOUT:   %Foo.9ec12f.1: %Foo.type.47530a.1 = struct_value () [concrete]
 // CHECK:STDOUT:   %a.9daf47.2: %C = symbolic_binding a, 0 [symbolic]

+ 2 - 2
toolchain/check/testdata/function/generic/call.carbon

@@ -74,8 +74,8 @@ fn CallSpecific(x: C*) -> C* {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %.076a48.2: Core.Form = init_form %T.binding.as_type [symbolic]
@@ -310,8 +310,8 @@ fn CallSpecific(x: C*) -> C* {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %T.035: %Copy.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %.076a48.2: Core.Form = init_form %T.binding.as_type [symbolic]

+ 2 - 2
toolchain/check/testdata/function/generic/call_method_on_generic_facet.carbon

@@ -43,8 +43,8 @@ fn G() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Scalar: type = symbolic_binding Scalar, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.835: type = generic_interface_type @Generic [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Generic.generic: %Generic.type.835 = struct_value () [concrete]
@@ -84,8 +84,8 @@ fn G() {
 // CHECK:STDOUT:   %Other.WithSelf.G.13d: %Other.WithSelf.G.type.1df = struct_value () [concrete]
 // CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Generic.type.03dff7.2: type = facet_type <@Generic, @Generic(%T)> [symbolic]
-// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.c49: type = pattern_type %Generic.type.03dff7.2 [symbolic]
+// CHECK:STDOUT:   %U: %Generic.type.03dff7.2 = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %CallGenericMethod.type: type = fn_type @CallGenericMethod [concrete]
 // CHECK:STDOUT:   %CallGenericMethod: %CallGenericMethod.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Self.15d2d5.2: %Generic.type.03dff7.2 = symbolic_binding Self, 1 [symbolic]

+ 14 - 14
toolchain/check/testdata/function/generic/deduce.carbon

@@ -218,8 +218,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr.e8f [symbolic]
 // CHECK:STDOUT:   %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
@@ -407,8 +407,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %ptr: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr [symbolic]
 // CHECK:STDOUT:   %pattern_type.4f4: type = pattern_type %ptr [symbolic]
@@ -539,8 +539,8 @@ fn F() {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr.e8f [symbolic]
@@ -698,8 +698,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr.e8f [symbolic]
@@ -841,8 +841,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
@@ -984,8 +984,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
@@ -1120,8 +1120,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
@@ -1211,8 +1211,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
@@ -1303,8 +1303,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
@@ -1393,8 +1393,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
@@ -1483,8 +1483,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %.822: Core.Form = init_form %U [symbolic]
@@ -1569,8 +1569,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %.184: Core.Form = init_form %T [symbolic]
 // CHECK:STDOUT:   %ImplicitNotDeducible.type: type = fn_type @ImplicitNotDeducible [concrete]
@@ -1660,15 +1660,15 @@ fn F() {
 // CHECK:STDOUT:   %Z.facet.5dc: %Z.type = facet_value %EE, (%Z.impl_witness.c05) [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %E: type = symbolic_binding E, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %E: type = symbolic_binding E, 0 [symbolic]
 // CHECK:STDOUT:   %DD.type: type = generic_class_type @DD [concrete]
 // CHECK:STDOUT:   %DD.generic: %DD.type = struct_value () [concrete]
 // CHECK:STDOUT:   %DD.a29: type = class_type @DD, @DD(%E) [symbolic]
 // CHECK:STDOUT:   %Z.impl_witness.437: <witness> = impl_witness @DD.as.Z.impl.%Z.impl_witness_table, @DD.as.Z.impl(%E) [symbolic]
 // CHECK:STDOUT:   %Z.facet.dc0: %Z.type = facet_value %DD.a29, (%Z.impl_witness.437) [symbolic]
-// CHECK:STDOUT:   %D: %Z.type = symbolic_binding D, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.22b: type = pattern_type %Z.type [concrete]
+// CHECK:STDOUT:   %D: %Z.type = symbolic_binding D, 0 [symbolic]
 // CHECK:STDOUT:   %CC.type: type = generic_class_type @CC [concrete]
 // CHECK:STDOUT:   %CC.generic: %CC.type = struct_value () [concrete]
 // CHECK:STDOUT:   %CC.a1b: type = class_type @CC, @CC(%D) [symbolic]

+ 2 - 2
toolchain/check/testdata/function/generic/deduce_nested_facet_value.carbon

@@ -53,8 +53,8 @@ fn F() {
 // CHECK:STDOUT:   %W.facet: %W.type = facet_value %DD, (%W.impl_witness) [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %D: %Y.type = symbolic_binding D, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.95b: type = pattern_type %Y.type [concrete]
+// CHECK:STDOUT:   %D: %Y.type = symbolic_binding D, 0 [symbolic]
 // CHECK:STDOUT:   %CC.type: type = generic_class_type @CC [concrete]
 // CHECK:STDOUT:   %CC.generic: %CC.type = struct_value () [concrete]
 // CHECK:STDOUT:   %CC.fe5: type = class_type @CC, @CC(%D) [symbolic]
@@ -71,8 +71,8 @@ fn F() {
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %Y.type, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type: type = facet_type <@Y & @W> [concrete]
-// CHECK:STDOUT:   %E: %facet_type = symbolic_binding E, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.935: type = pattern_type %facet_type [concrete]
+// CHECK:STDOUT:   %E: %facet_type = symbolic_binding E, 0 [symbolic]
 // CHECK:STDOUT:   %E.binding.as_type: type = symbolic_binding_type E, 0, %E [symbolic]
 // CHECK:STDOUT:   %Y.lookup_impl_witness: <witness> = lookup_impl_witness %E, @Y [symbolic]
 // CHECK:STDOUT:   %Y.facet.9df: %Y.type = facet_value %E.binding.as_type, (%Y.lookup_impl_witness) [symbolic]

+ 2 - 2
toolchain/check/testdata/function/generic/fail_deduce_imported_function.carbon

@@ -52,8 +52,8 @@ fn B() {
 // CHECK:STDOUT:   %Self: %Z.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %Z.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.473: type = pattern_type %Z.type [concrete]
+// CHECK:STDOUT:   %T: %Z.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %struct_type.a: type = struct_type {.a: %T.binding.as_type} [symbolic]
 // CHECK:STDOUT:   %pattern_type.3fc: type = pattern_type %struct_type.a [symbolic]
@@ -133,8 +133,8 @@ fn B() {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %Z.type: type = facet_type <@Z> [concrete]
 // CHECK:STDOUT:   %Self: %Z.type = symbolic_binding Self, 0 [symbolic]
-// CHECK:STDOUT:   %T: %Z.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.e5e: type = pattern_type %Z.type [concrete]
+// CHECK:STDOUT:   %T: %Z.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %struct_type.a: type = struct_type {.a: %T.binding.as_type} [symbolic]
 // CHECK:STDOUT:   %pattern_type.857: type = pattern_type %struct_type.a [symbolic]

+ 1 - 1
toolchain/check/testdata/function/generic/forward_decl.carbon

@@ -19,8 +19,8 @@ fn F(T:! type);
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT: }

+ 1 - 1
toolchain/check/testdata/function/generic/import_specific.carbon

@@ -43,8 +43,8 @@ fn H() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/function/generic/param_in_type.carbon

@@ -23,8 +23,8 @@ fn F(N:! i32, a: array(i32, N)*);
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
 // CHECK:STDOUT:   %Int.generic: %Int.type = struct_value () [concrete]
 // CHECK:STDOUT:   %i32: type = class_type @Int, @Int(%int_32) [concrete]
-// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
+// CHECK:STDOUT:   %N.5de: %i32 = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
 // CHECK:STDOUT:   %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
 // CHECK:STDOUT:   %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]

+ 4 - 4
toolchain/check/testdata/function/generic/redeclare.carbon

@@ -99,8 +99,8 @@ fn F(U:! type, T:! type) -> U* {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %ptr: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr [symbolic]
 // CHECK:STDOUT:   %pattern_type.4f4: type = pattern_type %ptr [symbolic]
@@ -193,8 +193,8 @@ fn F(U:! type, T:! type) -> U* {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr.e8f [symbolic]
@@ -317,8 +317,8 @@ fn F(U:! type, T:! type) -> U* {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %U.091: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T.67d [symbolic]
 // CHECK:STDOUT:   %.cb6: Core.Form = init_form %ptr.e8f [symbolic]
@@ -443,8 +443,8 @@ fn F(U:! type, T:! type) -> U* {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %U.091: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f8f9.1: type = ptr_type %T.67d [symbolic]
 // CHECK:STDOUT:   %.cb6cb9.1: Core.Form = init_form %ptr.e8f8f9.1 [symbolic]

+ 1 - 1
toolchain/check/testdata/function/generic/resolve_used.carbon

@@ -46,8 +46,8 @@ fn CallNegative() {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %ErrorIfNIsZero.type: type = fn_type @ErrorIfNIsZero [concrete]
 // CHECK:STDOUT:   %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]

+ 1 - 1
toolchain/check/testdata/function/generic/return_slot.carbon

@@ -29,8 +29,8 @@ fn G() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Wrap.type: type = generic_class_type @Wrap [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Wrap.generic: %Wrap.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/function/generic/template_param.carbon

@@ -28,8 +28,8 @@ fn G() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/function/generic/type_param.carbon

@@ -22,8 +22,8 @@ fn F(T:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/generic/call_basic_depth.carbon

@@ -50,8 +50,8 @@ fn M() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %C: type = class_type @C [concrete]
 // CHECK:STDOUT:   %pattern_type.7c7: type = pattern_type %C [concrete]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %C.Cfn.type: type = fn_type @C.Cfn [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]

+ 3 - 3
toolchain/check/testdata/generic/complete_type.carbon

@@ -88,8 +88,8 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %B: type = class_type @B [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %A.type: type = generic_class_type @A [concrete]
 // CHECK:STDOUT:   %A.generic: %A.type = struct_value () [concrete]
 // CHECK:STDOUT:   %A.95c: type = class_type @A, @A(%T) [symbolic]
@@ -205,8 +205,8 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %B: type = class_type @B [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
@@ -349,8 +349,8 @@ fn G() { F(B); }
 // CHECK:STDOUT:   %B: type = class_type @B [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/generic/dependent_param.carbon

@@ -35,8 +35,8 @@ var n: i32 = Outer(i32).Inner(42).Get();
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
 // CHECK:STDOUT:   %Outer.4b9: type = class_type @Outer, @Outer(%T.035) [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T.035 [symbolic]
-// CHECK:STDOUT:   %U.959: %T.binding.as_type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %T.binding.as_type [symbolic]
+// CHECK:STDOUT:   %U.959: %T.binding.as_type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %Inner.type.af4: type = generic_class_type @Inner, @Outer(%T.035) [symbolic]
 // CHECK:STDOUT:   %Inner.generic.994: %Inner.type.af4 = struct_value () [symbolic]
 // CHECK:STDOUT:   %Inner.c23: type = class_type @Inner, @Inner(%T.035, %U.959) [symbolic]

+ 3 - 3
toolchain/check/testdata/generic/dot_self_symbolic_type.carbon

@@ -92,8 +92,8 @@ fn H(T:! type) {
 // CHECK:STDOUT:   %A.lookup_impl_witness.04abbb.1: <witness> = lookup_impl_witness %.Self.660472.1, @A, @A(%CC) [symbolic]
 // CHECK:STDOUT:   %impl.elem0.f51d29.1: type = impl_witness_access %A.lookup_impl_witness.04abbb.1, element0 [symbolic]
 // CHECK:STDOUT:   %A_where.type.4028e0.1: type = facet_type <@A, @A(%CC) where %impl.elem0.f51d29.1 = %CC> [symbolic]
-// CHECK:STDOUT:   %T.6c0: %A_where.type.4028e0.1 = symbolic_binding T, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.1d5: type = pattern_type %A_where.type.4028e0.1 [symbolic]
+// CHECK:STDOUT:   %T.6c0: %A_where.type.4028e0.1 = symbolic_binding T, 1 [symbolic]
 // CHECK:STDOUT:   %C.F.type.1f899e.1: type = fn_type @C.F, @C(%CC) [symbolic]
 // CHECK:STDOUT:   %C.F.faeec9.1: %C.F.type.1f899e.1 = struct_value () [symbolic]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
@@ -308,8 +308,8 @@ fn H(T:! type) {
 // CHECK:STDOUT: --- dot_self_symbolic_in_impl_lookup.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %AA: type = symbolic_binding AA, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %AA: type = symbolic_binding AA, 0 [symbolic]
 // CHECK:STDOUT:   %A.type.464: type = generic_interface_type @A [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %A.generic: %A.type.464 = struct_value () [concrete]
@@ -325,8 +325,8 @@ fn H(T:! type) {
 // CHECK:STDOUT:   %impl.elem0.f51d29.1: type = impl_witness_access %A.lookup_impl_witness.04abbb.1, element0 [symbolic]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %A_where.type.29f165.1: type = facet_type <@A, @A(%AA) where %impl.elem0.f51d29.1 = %empty_tuple.type> [symbolic]
-// CHECK:STDOUT:   %BB.0b1: %A_where.type.29f165.1 = symbolic_binding BB, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.12a: type = pattern_type %A_where.type.29f165.1 [symbolic]
+// CHECK:STDOUT:   %BB.0b1: %A_where.type.29f165.1 = symbolic_binding BB, 1 [symbolic]
 // CHECK:STDOUT:   %BB.binding.as_type: type = symbolic_binding_type BB, 1, %BB.0b1 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f8f9.1: type = ptr_type %AA [symbolic]
 // CHECK:STDOUT:   %B.type.abcc5d.1: type = facet_type <@B, @B(%ptr.e8f8f9.1)> [symbolic]

+ 3 - 3
toolchain/check/testdata/generic/local.carbon

@@ -55,8 +55,8 @@ class C(C:! type) {
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5d4: type = class_type @C, @C(%T) [symbolic]
@@ -211,8 +211,8 @@ class C(C:! type) {
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %C.67d: type = symbolic_binding C, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %C.67d: type = symbolic_binding C, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5d4: type = class_type @C, @C(%C.67d) [symbolic]
@@ -273,8 +273,8 @@ class C(C:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %C.67d: type = symbolic_binding C, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %C.67d: type = symbolic_binding C, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%C.67d) [symbolic]

+ 2 - 2
toolchain/check/testdata/generic/template/convert.carbon

@@ -66,8 +66,8 @@ fn Test(d: D) -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.51d1c4.1: type = pattern_type %T.67db0b.1 [template]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
@@ -338,8 +338,8 @@ fn Test(d: D) -> i32 {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.51d1c4.1: type = pattern_type %T.67db0b.1 [template]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]

+ 3 - 3
toolchain/check/testdata/generic/template/member_access.carbon

@@ -90,8 +90,8 @@ fn Test(e: E) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T.67db0b.1 [template]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
@@ -311,8 +311,8 @@ fn Test(e: E) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T.67db0b.1 [template]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
@@ -480,8 +480,8 @@ fn Test(e: E) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.51d1c4.1: type = pattern_type %T.67db0b.1 [template]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]

+ 3 - 3
toolchain/check/testdata/generic/template/unimplemented.carbon

@@ -75,8 +75,8 @@ fn F[template T:! Core.Destroy](x: T) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.51d1c4.1: type = pattern_type %T [template]
 // CHECK:STDOUT:   %int_32: Core.IntLiteral = int_value 32 [concrete]
 // CHECK:STDOUT:   %Int.type: type = generic_class_type @Int [concrete]
@@ -169,8 +169,8 @@ fn F[template T:! Core.Destroy](x: T) {
 // CHECK:STDOUT:   %complete_type.54b: <witness> = complete_type_witness %struct_type.n [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %c: %C = symbolic_binding c, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.7c7: type = pattern_type %C [concrete]
+// CHECK:STDOUT:   %c: %C = symbolic_binding c, 0, template [template]
 // CHECK:STDOUT:   %.ff5: Core.Form = init_form %i32 [concrete]
 // CHECK:STDOUT:   %pattern_type.7ce: type = pattern_type %i32 [concrete]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
@@ -254,8 +254,8 @@ fn F[template T:! Core.Destroy](x: T) {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Destroy.type: type = facet_type <@Destroy> [concrete]
-// CHECK:STDOUT:   %T.765: %Destroy.type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.cac: type = pattern_type %Destroy.type [concrete]
+// CHECK:STDOUT:   %T.765: %Destroy.type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %T.binding.as_type.140: type = symbolic_binding_type T, 0, template, %T.765 [template]
 // CHECK:STDOUT:   %pattern_type.a64db1.2: type = pattern_type %T.binding.as_type.140 [template]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]

+ 2 - 2
toolchain/check/testdata/generic/template_dependence.carbon

@@ -33,8 +33,8 @@ fn F(template T:! type, U:! type) -> (T, U) {
 // CHECK:STDOUT: --- type.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67db0b.1: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %ptr.e8f8f9.1: type = ptr_type %T.67db0b.1 [template]
 // CHECK:STDOUT:   %ptr.125: type = ptr_type %ptr.e8f8f9.1 [template]
 // CHECK:STDOUT:   %pattern_type.8bb: type = pattern_type %ptr.125 [template]
@@ -127,8 +127,8 @@ fn F(template T:! type, U:! type) -> (T, U) {
 // CHECK:STDOUT: --- mixed.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0, template [template]
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %tuple.type.24b: type = tuple_type (type, type) [concrete]
 // CHECK:STDOUT:   %tuple: %tuple.type.24b = tuple_value (%T, %U) [template]

+ 2 - 2
toolchain/check/testdata/impl/assoc_const_self.carbon

@@ -580,8 +580,8 @@ fn CallF() {
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %IntLiteral.type: type = fn_type @IntLiteral [concrete]
 // CHECK:STDOUT:   %IntLiteral: %IntLiteral.type = struct_value () [concrete]
-// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
+// CHECK:STDOUT:   %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.68b: type = facet_type <@I, @I(%N)> [symbolic]
@@ -745,8 +745,8 @@ fn CallF() {
 // CHECK:STDOUT:   %I.lookup_impl_witness: <witness> = lookup_impl_witness %.Self.1dc, @I [symbolic_self]
 // CHECK:STDOUT:   %impl.elem0: %.Self.binding.as_type = impl_witness_access %I.lookup_impl_witness, element0 [symbolic_self]
 // CHECK:STDOUT:   %I_where.type: type = facet_type <@I where %impl.elem0 = %empty_struct and TODO> [concrete]
-// CHECK:STDOUT:   %T: %I_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.d53: type = pattern_type %I_where.type [concrete]
+// CHECK:STDOUT:   %T: %I_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT:   %CallF.type: type = fn_type @CallF [concrete]

+ 1 - 1
toolchain/check/testdata/impl/compound.carbon

@@ -125,8 +125,8 @@ fn InstanceCallFail() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Dest: type = symbolic_binding Dest, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Dest: type = symbolic_binding Dest, 0 [symbolic]
 // CHECK:STDOUT:   %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete]
 // CHECK:STDOUT:   %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete]
 // CHECK:STDOUT:   %ImplicitAs.type.9fe: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]

+ 2 - 2
toolchain/check/testdata/impl/error_recovery.carbon

@@ -157,8 +157,8 @@ impl C as I {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Z.type: type = facet_type <@Z> [concrete]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
@@ -211,8 +211,8 @@ impl C as I {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Z.type: type = facet_type <@Z> [concrete]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 2 - 2
toolchain/check/testdata/impl/extend_impl_generic.carbon

@@ -56,8 +56,8 @@ class X(U:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
@@ -414,8 +414,8 @@ class X(U:! type) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.1ab3e4.1: type = facet_type <@I, @I(%T)> [symbolic]

+ 1 - 1
toolchain/check/testdata/impl/fail_extend_impl_forall.carbon

@@ -31,8 +31,8 @@ class C {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %GenericInterface.type.21d: type = generic_interface_type @GenericInterface [concrete]
 // CHECK:STDOUT:   %GenericInterface.generic: %GenericInterface.type.21d = struct_value () [concrete]
 // CHECK:STDOUT:   %GenericInterface.type.8bc: type = facet_type <@GenericInterface, @GenericInterface(%T)> [symbolic]

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

@@ -48,10 +48,10 @@ impl i32 as I {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
-// CHECK:STDOUT:   %X: %T = symbolic_binding X, 1 [symbolic]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d1c4.1: type = pattern_type %T [symbolic]
+// CHECK:STDOUT:   %X: %T = symbolic_binding X, 1 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]

+ 3 - 3
toolchain/check/testdata/impl/forward_decls.carbon

@@ -1135,8 +1135,8 @@ interface I {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.1ab: type = facet_type <@I, @I(%U)> [symbolic]
@@ -1320,8 +1320,8 @@ interface I {
 // CHECK:STDOUT:   %I.impl_witness: <witness> = impl_witness @D.as.I.impl.%I.impl_witness_table [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9d9: type = pattern_type %I.type [concrete]
+// CHECK:STDOUT:   %T: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.bba: type = class_type @C, @C(%T) [symbolic]
@@ -1685,8 +1685,8 @@ interface I {
 // CHECK:STDOUT:   %X.type: type = facet_type <@X> [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %_: %X.type = symbolic_binding _, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.b4b: type = pattern_type %X.type [concrete]
+// CHECK:STDOUT:   %_: %X.type = symbolic_binding _, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]

+ 6 - 6
toolchain/check/testdata/impl/generic_redeclaration.carbon

@@ -133,20 +133,20 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %Self.cbc: %L.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.651: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9d9: type = pattern_type %I.type [concrete]
+// CHECK:STDOUT:   %T.651: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.3af: type = symbolic_binding_type T, 0, %T.651 [symbolic]
 // CHECK:STDOUT:   %Interface.impl_witness.779: <witness> = impl_witness @T.binding.as_type.as.Interface.impl.973.%Interface.impl_witness_table, @T.binding.as_type.as.Interface.impl.973(%T.651) [symbolic]
-// CHECK:STDOUT:   %T.612: %J.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.f76: type = pattern_type %J.type [concrete]
+// CHECK:STDOUT:   %T.612: %J.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.50b: type = symbolic_binding_type T, 0, %T.612 [symbolic]
 // CHECK:STDOUT:   %Interface.impl_witness.8e2: <witness> = impl_witness @T.binding.as_type.as.Interface.impl.5eb.%Interface.impl_witness_table, @T.binding.as_type.as.Interface.impl.5eb(%T.612) [symbolic]
-// CHECK:STDOUT:   %T.9b2: %K.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.250: type = pattern_type %K.type [concrete]
+// CHECK:STDOUT:   %T.9b2: %K.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.bec: type = symbolic_binding_type T, 0, %T.9b2 [symbolic]
 // CHECK:STDOUT:   %Interface.impl_witness.84e: <witness> = impl_witness @T.binding.as_type.as.Interface.impl.edf.%Interface.impl_witness_table, @T.binding.as_type.as.Interface.impl.edf(%T.9b2) [symbolic]
-// CHECK:STDOUT:   %T.0fc: %L.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.88f: type = pattern_type %L.type [concrete]
+// CHECK:STDOUT:   %T.0fc: %L.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type.29d: type = symbolic_binding_type T, 0, %T.0fc [symbolic]
 // CHECK:STDOUT:   %Interface.impl_witness.8e9: <witness> = impl_witness @T.binding.as_type.as.Interface.impl.410.%Interface.impl_witness_table, @T.binding.as_type.as.Interface.impl.410(%T.0fc) [symbolic]
 // CHECK:STDOUT:   %Interface.facet.9bb: %Interface.type = facet_value %T.binding.as_type.3af, (%Interface.impl_witness.779) [symbolic]
@@ -471,8 +471,8 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %Self.8a1: %J.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %I.type [concrete]
+// CHECK:STDOUT:   %T: %I.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %J.impl_witness: <witness> = impl_witness @T.binding.as_type.as.J.impl.c4ee06.1.%J.impl_witness_table, @T.binding.as_type.as.J.impl.c4ee06.1(%T) [symbolic]
 // CHECK:STDOUT:   %J.facet: %J.type = facet_value %T.binding.as_type, (%J.impl_witness) [symbolic]
@@ -690,8 +690,8 @@ impl forall [T:! type] T as I {
 // CHECK:STDOUT:   %Self: %I.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.impl_witness: <witness> = impl_witness @T.as.I.impl.f7b5a3.1.%I.impl_witness_table, @T.as.I.impl.f7b5a3.1(%T) [symbolic]
 // CHECK:STDOUT:   %T.as.I.impl.A.type: type = fn_type @T.as.I.impl.A, @T.as.I.impl.f7b5a3.1(%T) [symbolic]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]

+ 1 - 1
toolchain/check/testdata/impl/impl_forall.carbon

@@ -31,8 +31,8 @@ impl forall [T:! type] T as Simple {
 // CHECK:STDOUT:   %assoc0: %Simple.assoc_type = assoc_entity element0, @Simple.WithSelf.%Simple.WithSelf.F.decl [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Simple.impl_witness: <witness> = impl_witness @T.as.Simple.impl.%Simple.impl_witness_table, @T.as.Simple.impl(%T) [symbolic]
 // CHECK:STDOUT:   %T.as.Simple.impl.F.type: type = fn_type @T.as.Simple.impl.F, @T.as.Simple.impl(%T) [symbolic]
 // CHECK:STDOUT:   %T.as.Simple.impl.F: %T.as.Simple.impl.F.type = struct_value () [symbolic]

+ 2 - 2
toolchain/check/testdata/impl/impl_thunk.carbon

@@ -817,8 +817,8 @@ impl () as I({}) {
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %U.035: %Copy.type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %U.035: %Copy.type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %U.binding.as_type.14b: type = symbolic_binding_type U, 0, %U.035 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %U.binding.as_type.14b [symbolic]
 // CHECK:STDOUT:   %.076a48.2: Core.Form = init_form %U.binding.as_type.14b [symbolic]
@@ -982,8 +982,8 @@ impl () as I({}) {
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
 // CHECK:STDOUT:   %Copy.type: type = facet_type <@Copy> [concrete]
-// CHECK:STDOUT:   %U.035: %Copy.type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.ce2: type = pattern_type %Copy.type [concrete]
+// CHECK:STDOUT:   %U.035: %Copy.type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %U.binding.as_type.14b: type = symbolic_binding_type U, 0, %U.035 [symbolic]
 // CHECK:STDOUT:   %pattern_type.9b9f0c.2: type = pattern_type %U.binding.as_type.14b [symbolic]
 // CHECK:STDOUT:   %.076a48.2: Core.Form = init_form %U.binding.as_type.14b [symbolic]

+ 5 - 5
toolchain/check/testdata/impl/import_generic.carbon

@@ -190,8 +190,8 @@ impl forall [T:! type] D as N(T*) {}
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
@@ -540,8 +540,8 @@ impl forall [T:! type] D as N(T*) {}
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
@@ -865,8 +865,8 @@ impl forall [T:! type] D as N(T*) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
@@ -1545,8 +1545,8 @@ impl forall [T:! type] D as N(T*) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %I.type.609: type = generic_interface_type @I [concrete]
 // CHECK:STDOUT:   %I.generic: %I.type.609 = struct_value () [concrete]
 // CHECK:STDOUT:   %I.type.1ab: type = facet_type <@I, @I(%T)> [symbolic]
@@ -2035,8 +2035,8 @@ impl forall [T:! type] D as N(T*) {}
 // CHECK:STDOUT:   %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %J.type.885: type = generic_interface_type @J [concrete]
 // CHECK:STDOUT:   %J.generic: %J.type.885 = struct_value () [concrete]
 // CHECK:STDOUT:   %J.type.04e: type = facet_type <@J, @J(%T)> [symbolic]

+ 3 - 3
toolchain/check/testdata/impl/import_self_specific.carbon

@@ -69,8 +69,8 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
 // CHECK:STDOUT:   %Self.162: %Y.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Y.impl_witness: <witness> = impl_witness @T.as.Y.impl.%Y.impl_witness_table, @T.as.Y.impl(%T) [symbolic]
 // CHECK:STDOUT:   %Y.facet: %Y.type = facet_value %T, (%Y.impl_witness) [symbolic]
 // CHECK:STDOUT:   %Z.type: type = facet_type <@Z> [concrete]
@@ -78,8 +78,8 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %Z.impl_witness.856: <witness> = impl_witness @U.as.Z.impl.%Z.impl_witness_table, @U.as.Z.impl(%U) [symbolic]
 // CHECK:STDOUT:   %Z.facet.f2d: %Z.type = facet_value %U, (%Z.impl_witness.856) [symbolic]
-// CHECK:STDOUT:   %V: %Z.type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.22b: type = pattern_type %Z.type [concrete]
+// CHECK:STDOUT:   %V: %Z.type = symbolic_binding V, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
@@ -332,8 +332,8 @@ impl forall [N:! E] D(N) as I where .Assoc = () {
 // CHECK:STDOUT:   %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %N: %E = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.99f: type = pattern_type %E [concrete]
+// CHECK:STDOUT:   %N: %E = symbolic_binding N, 0 [symbolic]
 // CHECK:STDOUT:   %D.type: type = generic_class_type @D [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %D.generic: %D.type = struct_value () [concrete]

+ 1 - 1
toolchain/check/testdata/impl/import_thunk.carbon

@@ -112,8 +112,8 @@ fn G() {
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
-// CHECK:STDOUT:   %X: %empty_tuple.type = symbolic_binding X, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
+// CHECK:STDOUT:   %X: %empty_tuple.type = symbolic_binding X, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.c8540f.1: type = class_type @C, @C(%X) [symbolic]

+ 1 - 1
toolchain/check/testdata/impl/import_use_generic.carbon

@@ -58,8 +58,8 @@ fn H() -> C({}).(I.F)() {}
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C: type = class_type @C, @C(%T) [symbolic]

+ 1 - 1
toolchain/check/testdata/impl/incomplete.carbon

@@ -784,8 +784,8 @@ interface B {
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
 // CHECK:STDOUT:   %empty_struct: %empty_struct_type = struct_value () [concrete]
 // CHECK:STDOUT:   %X_where.type: type = facet_type <@X where %impl.elem0 = %empty_struct_type> [concrete]
-// CHECK:STDOUT:   %T: %X_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type: type = pattern_type %X_where.type [concrete]
+// CHECK:STDOUT:   %T: %X_where.type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]
 // CHECK:STDOUT:   %F: %F.type = struct_value () [concrete]
 // CHECK:STDOUT: }

+ 3 - 3
toolchain/check/testdata/impl/interface_args.carbon

@@ -112,8 +112,8 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %Dest: type = symbolic_binding Dest, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %Dest: type = symbolic_binding Dest, 0 [symbolic]
 // CHECK:STDOUT:   %ImplicitAs.type.595: type = generic_interface_type @ImplicitAs [concrete]
 // CHECK:STDOUT:   %ImplicitAs.generic: %ImplicitAs.type.595 = struct_value () [concrete]
 // CHECK:STDOUT:   %ImplicitAs.type.9fe: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic]
@@ -220,8 +220,8 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Action.type.85c: type = generic_interface_type @Action [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Action.generic: %Action.type.85c = struct_value () [concrete]
@@ -852,8 +852,8 @@ fn InstanceC(a: A) -> C {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %Factory.type.2e5: type = generic_interface_type @Factory [concrete]
 // CHECK:STDOUT:   %Factory.generic: %Factory.type.2e5 = struct_value () [concrete]
 // CHECK:STDOUT:   %Factory.type.142: type = facet_type <@Factory, @Factory(%T)> [symbolic]

+ 1 - 1
toolchain/check/testdata/impl/lookup/canonical_query_self.carbon

@@ -79,8 +79,8 @@ fn G() {
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op: %type.as.BitAndWith.impl.Op.type = struct_value () [concrete]
 // CHECK:STDOUT:   %type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %I.type, %type.as.BitAndWith.impl.Op [concrete]
 // CHECK:STDOUT:   %facet_type: type = facet_type <@I & @J> [concrete]
-// CHECK:STDOUT:   %T: %facet_type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.840: type = pattern_type %facet_type [concrete]
+// CHECK:STDOUT:   %T: %facet_type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %T.binding.as_type: type = symbolic_binding_type T, 0, %T [symbolic]
 // CHECK:STDOUT:   %pattern_type.bd7: type = pattern_type %T.binding.as_type [symbolic]
 // CHECK:STDOUT:   %F.type: type = fn_type @F [concrete]

+ 6 - 6
toolchain/check/testdata/impl/lookup/generic.carbon

@@ -141,8 +141,8 @@ fn G(x: A) {
 // CHECK:STDOUT:   %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HasF.impl_witness.c31: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T) [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
 // CHECK:STDOUT:   %T.as.HasF.impl.F.type.12d: type = fn_type @T.as.HasF.impl.F, @T.as.HasF.impl(%T) [symbolic]
@@ -371,8 +371,8 @@ fn G(x: A) {
 // CHECK:STDOUT:   %assoc0.a7f: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %ptr.e8f: type = ptr_type %T.67d [symbolic]
 // CHECK:STDOUT:   %HasF.impl_witness.e63: <witness> = impl_witness @ptr.as.HasF.impl.%HasF.impl_witness_table, @ptr.as.HasF.impl(%T.67d) [symbolic]
 // CHECK:STDOUT:   %pattern_type.4f4: type = pattern_type %ptr.e8f [symbolic]
@@ -685,8 +685,8 @@ fn G(x: A) {
 // CHECK:STDOUT:   %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.5a3: type = class_type @C, @C(%T) [symbolic]
@@ -956,8 +956,8 @@ fn G(x: A) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
@@ -1265,8 +1265,8 @@ fn G(x: A) {
 // CHECK:STDOUT:   %assoc0: %HasF.assoc_type = assoc_entity element0, @HasF.WithSelf.%HasF.WithSelf.F.decl [concrete]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %U: type = symbolic_binding U, 1 [symbolic]
 // CHECK:STDOUT:   %HasF.impl_witness: <witness> = impl_witness @T.as.HasF.impl.%HasF.impl_witness_table, @T.as.HasF.impl(%T, %U) [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
@@ -1441,8 +1441,8 @@ fn G(x: A) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %HasF.type.ee1: type = generic_interface_type @HasF [concrete]
 // CHECK:STDOUT:   %HasF.generic: %HasF.type.ee1 = struct_value () [concrete]
 // CHECK:STDOUT:   %HasF.type.8a4: type = facet_type <@HasF, @HasF(%T)> [symbolic]

+ 1 - 1
toolchain/check/testdata/impl/lookup/impl_forall.carbon

@@ -44,8 +44,8 @@ fn TestSpecific(a: A({})*) -> {}* {
 // CHECK:STDOUT: --- impl_forall.carbon
 // CHECK:STDOUT:
 // CHECK:STDOUT: constants {
-// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T.67d: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %A.type: type = generic_class_type @A [concrete]
 // CHECK:STDOUT:   %A.generic: %A.type = struct_value () [concrete]
 // CHECK:STDOUT:   %U.67d: type = symbolic_binding U, 0 [symbolic]

+ 5 - 5
toolchain/check/testdata/impl/lookup/import.carbon

@@ -1506,10 +1506,10 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
-// CHECK:STDOUT:   %X: %T = symbolic_binding X, 1 [symbolic]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.51d: type = pattern_type %T [symbolic]
+// CHECK:STDOUT:   %X: %T = symbolic_binding X, 1 [symbolic]
 // CHECK:STDOUT:   %AnyParam.type: type = generic_class_type @AnyParam [concrete]
 // CHECK:STDOUT:   %AnyParam.generic: %AnyParam.type = struct_value () [concrete]
 // CHECK:STDOUT:   %AnyParam: type = class_type @AnyParam, @AnyParam(%T, %X) [symbolic]
@@ -1639,8 +1639,8 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %GenericInterface.type.9e8: type = generic_interface_type @GenericInterface [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %GenericInterface.generic: %GenericInterface.type.9e8 = struct_value () [concrete]
@@ -2121,8 +2121,8 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %U: type = symbolic_binding U, 0 [symbolic]
 // CHECK:STDOUT:   %GenericClass.type: type = generic_class_type @GenericClass [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %GenericClass.generic: %GenericClass.type = struct_value () [concrete]
@@ -2605,8 +2605,8 @@ fn Test(c: HasExtraInterfaces.C(type)) {
 // CHECK:STDOUT:   %Self.8a2: %Extra8.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %T: type = symbolic_binding T, 0 [symbolic]
 // CHECK:STDOUT:   %C.type: type = generic_class_type @C [concrete]
 // CHECK:STDOUT:   %C.generic: %C.type = struct_value () [concrete]
 // CHECK:STDOUT:   %C.ebb: type = class_type @C, @C(%T) [symbolic]

+ 4 - 4
toolchain/check/testdata/impl/lookup/lookup_interface_with_enclosing_generic_inside_rewrite_constraint.carbon

@@ -105,8 +105,8 @@ fn F() {
 // CHECK:STDOUT: constants {
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %OuterParam: type = symbolic_binding OuterParam, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.98f: type = pattern_type type [concrete]
+// CHECK:STDOUT:   %OuterParam: type = symbolic_binding OuterParam, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
@@ -122,8 +122,8 @@ fn F() {
 // CHECK:STDOUT:   %impl.elem0.284: type = impl_witness_access %Y.lookup_impl_witness.3b9, element0 [symbolic]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %Y_where.type.7c7: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.284 = %empty_tuple.type> [symbolic]
-// CHECK:STDOUT:   %H: %Y_where.type.7c7 = symbolic_binding H, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.b97: type = pattern_type %Y_where.type.7c7 [symbolic]
+// CHECK:STDOUT:   %H: %Y_where.type.7c7 = symbolic_binding H, 1 [symbolic]
 // CHECK:STDOUT:   %Outer.G.type.20d: type = fn_type @Outer.G, @Outer(%OuterParam) [symbolic]
 // CHECK:STDOUT:   %Outer.G.b44: %Outer.G.type.20d = struct_value () [symbolic]
 // CHECK:STDOUT:   %empty_struct_type: type = struct_type {} [concrete]
@@ -425,8 +425,8 @@ fn F() {
 // CHECK:STDOUT:   %Self.cde: %Z2.type = symbolic_binding Self, 0 [symbolic]
 // CHECK:STDOUT:   %type: type = facet_type <type> [concrete]
 // CHECK:STDOUT:   %.Self.c39: %type = symbolic_binding .Self [symbolic_self]
-// CHECK:STDOUT:   %OuterParam: %Z1.type = symbolic_binding OuterParam, 0 [symbolic]
 // CHECK:STDOUT:   %pattern_type.62d: type = pattern_type %Z1.type [concrete]
+// CHECK:STDOUT:   %OuterParam: %Z1.type = symbolic_binding OuterParam, 0 [symbolic]
 // CHECK:STDOUT:   %Outer.type: type = generic_class_type @Outer [concrete]
 // CHECK:STDOUT:   %empty_tuple.type: type = tuple_type () [concrete]
 // CHECK:STDOUT:   %Outer.generic: %Outer.type = struct_value () [concrete]
@@ -442,8 +442,8 @@ fn F() {
 // CHECK:STDOUT:   %impl.elem0.63e: type = impl_witness_access %Y.lookup_impl_witness.5bf, element0 [symbolic]
 // CHECK:STDOUT:   %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
 // CHECK:STDOUT:   %Y_where.type.b0f: type = facet_type <@Y, @Y(%OuterParam) where %impl.elem0.63e = %empty_tuple.type> [symbolic]
-// CHECK:STDOUT:   %H: %Y_where.type.b0f = symbolic_binding H, 1 [symbolic]
 // CHECK:STDOUT:   %pattern_type.6bf: type = pattern_type %Y_where.type.b0f [symbolic]
+// CHECK:STDOUT:   %H: %Y_where.type.b0f = symbolic_binding H, 1 [symbolic]
 // CHECK:STDOUT:   %Outer.G.type.e0a: type = fn_type @Outer.G, @Outer(%OuterParam) [symbolic]
 // CHECK:STDOUT:   %Outer.G.dc4: %Outer.G.type.e0a = struct_value () [symbolic]
 // CHECK:STDOUT:   %C.521: type = class_type @C, @C(%OuterParam) [symbolic]

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