diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index 1ce4ffe4df8b..97ea8fd7a383 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -1134,9 +1134,10 @@ class TypeCompleter { template requires(InstT::Kind.template IsAnyOf< - SemIR::AssociatedEntityType, SemIR::FacetType, SemIR::FunctionType, - SemIR::GenericClassType, SemIR::GenericInterfaceType, - SemIR::UnboundElementType, SemIR::WhereExpr>()) + SemIR::AssociatedEntityType, SemIR::FacetAccessType, + SemIR::FacetType, SemIR::FunctionType, SemIR::GenericClassType, + SemIR::GenericInterfaceType, SemIR::UnboundElementType, + SemIR::WhereExpr>()) auto BuildValueReprForInst(SemIR::TypeId /*type_id*/, InstT /*inst*/) const -> SemIR::ValueRepr { // These types have no runtime operations, so we use an empty value diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 7b245836695c..3092d83533a1 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -891,12 +891,12 @@ static auto PerformBuiltinConversion(Context& context, SemIR::LocId loc_id, // converted to facet type F2 if T satisfies the requirements of F2. // // TODO: Support this conversion in general. For now we only support it in - // the case where F1 is an interface type and F2 is `type`. + // the case where F1 is a facet type and F2 is `type`. // TODO: Support converting tuple and struct values to facet types, // combining the above conversions and this one in a single conversion. if (sem_ir.types().Is(value_type_id)) { - return context.AddInst( - loc_id, {.type_id = target.type_id, .facet_id = value_id}); + return context.AddInst( + loc_id, {.type_id = target.type_id, .facet_value_inst_id = value_id}); } } diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index 280462d6a22b..eedb0fa7c009 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -1330,6 +1330,11 @@ static auto TryEvalInstInContext(EvalContext& eval_context, case SemIR::CompleteTypeWitness::Kind: return RebuildIfFieldsAreConstant( eval_context, inst, &SemIR::CompleteTypeWitness::object_repr_id); + case SemIR::FacetValue::Kind: + return RebuildIfFieldsAreConstant(eval_context, inst, + &SemIR::FacetValue::type_id, + &SemIR::FacetValue::type_inst_id, + &SemIR::FacetValue::witness_inst_id); case SemIR::FunctionType::Kind: return RebuildIfFieldsAreConstant(eval_context, inst, &SemIR::FunctionType::specific_id); @@ -1608,11 +1613,21 @@ static auto TryEvalInstInContext(EvalContext& eval_context, case CARBON_KIND(SemIR::ValueOfInitializer typed_inst): { return eval_context.GetConstantValue(typed_inst.init_id); } - case CARBON_KIND(SemIR::FacetTypeAccess typed_inst): { - // TODO: Once we start tracking the witness in the facet value, remove it - // here. For now, we model a facet value as just a type. - return eval_context.GetConstantValue(typed_inst.facet_id); + case CARBON_KIND(SemIR::FacetAccessType typed_inst): { + Phase phase = Phase::Template; + if (ReplaceFieldWithConstantValue( + eval_context, &typed_inst, + &SemIR::FacetAccessType::facet_value_inst_id, &phase)) { + if (auto facet_value = eval_context.insts().TryGetAs( + typed_inst.facet_value_inst_id)) { + return eval_context.constant_values().Get(facet_value->type_inst_id); + } + return MakeConstantResult(eval_context.context(), typed_inst, phase); + } else { + return MakeNonConstantResult(phase); + } } + case CARBON_KIND(SemIR::WhereExpr typed_inst): { Phase phase = Phase::Template; SemIR::TypeId base_facet_type_id = diff --git a/toolchain/check/impl.cpp b/toolchain/check/impl.cpp index b62deebcdc4c..24006ef82b18 100644 --- a/toolchain/check/impl.cpp +++ b/toolchain/check/impl.cpp @@ -6,6 +6,7 @@ #include "toolchain/base/kind_switch.h" #include "toolchain/check/context.h" +#include "toolchain/check/eval.h" #include "toolchain/check/function.h" #include "toolchain/check/generic.h" #include "toolchain/check/import_ref.h" @@ -51,16 +52,27 @@ static auto GetSelfSpecificForInterfaceMemberWithSelfType( enclosing_specific_args.end()); } - // Add the `Self` argument. + // Add the `Self` argument. First find the `Self` binding. + auto self_binding = + context.insts().GetAs(bindings[arg_ids.size()]); CARBON_CHECK( - context.entity_names() - .Get(context.insts() - .GetAs(bindings[arg_ids.size()]) - .entity_name_id) - .name_id == SemIR::NameId::SelfType, - "Expected a Self binding, found {0}", - context.insts().Get(bindings[arg_ids.size()])); - arg_ids.push_back(context.types().GetInstId(self_type_id)); + context.entity_names().Get(self_binding.entity_name_id).name_id == + SemIR::NameId::SelfType, + "Expected a Self binding, found {0}", self_binding); + // Create a facet value to be the value of `Self` in the interface. + // This facet value consists of the type `self_type_id` and a witness that the + // type implements `self_binding.type_id`. The witness needs to be symbolic + // since we haven't finished defining the implementation here. + auto type_inst_id = context.types().GetInstId(self_type_id); + // TODO: Make a symbolic interface witness here. For the moment, the witness + // is never used. + auto witness_inst_id = type_inst_id; + auto facet_value_const_id = + TryEvalInst(context, SemIR::InstId::Invalid, + SemIR::FacetValue{.type_id = self_binding.type_id, + .type_inst_id = type_inst_id, + .witness_inst_id = witness_inst_id}); + arg_ids.push_back(context.constant_values().GetInstId(facet_value_const_id)); // Take any trailing argument values from the self specific. // TODO: If these refer to outer arguments, for example in their types, we may diff --git a/toolchain/check/import_ref.cpp b/toolchain/check/import_ref.cpp index c62b9d862f66..a30820399e44 100644 --- a/toolchain/check/import_ref.cpp +++ b/toolchain/check/import_ref.cpp @@ -1197,9 +1197,15 @@ class ImportRefResolver { case CARBON_KIND(SemIR::ExportDecl inst): { return TryResolveTypedInst(inst); } + case CARBON_KIND(SemIR::FacetAccessType inst): { + return TryResolveTypedInst(inst); + } case CARBON_KIND(SemIR::FacetType inst): { return TryResolveTypedInst(inst); } + case CARBON_KIND(SemIR::FacetValue inst): { + return TryResolveTypedInst(inst); + } case CARBON_KIND(SemIR::FieldDecl inst): { return TryResolveTypedInst(inst, inst_id); } @@ -2072,6 +2078,17 @@ class ImportRefResolver { return ResolveAsConstant(interface_const_id); } + auto TryResolveTypedInst(SemIR::FacetAccessType inst) -> ResolveResult { + auto facet_value_inst_id = GetLocalConstantInstId(inst.facet_value_inst_id); + if (HasNewWork()) { + return Retry(); + } + + return ResolveAs( + {.type_id = SemIR::TypeId::TypeType, + .facet_value_inst_id = facet_value_inst_id}); + } + auto TryResolveTypedInst(SemIR::FacetType inst) -> ResolveResult { CARBON_CHECK(inst.type_id == SemIR::TypeId::TypeType); @@ -2124,6 +2141,20 @@ class ImportRefResolver { {.type_id = SemIR::TypeId::TypeType, .facet_type_id = facet_type_id}); } + auto TryResolveTypedInst(SemIR::FacetValue inst) -> ResolveResult { + auto type_id = GetLocalConstantId(inst.type_id); + auto type_inst_id = GetLocalConstantInstId(inst.type_inst_id); + auto witness_inst_id = GetLocalConstantInstId(inst.witness_inst_id); + if (HasNewWork()) { + return Retry(); + } + + return ResolveAs( + {.type_id = context_.GetTypeIdForTypeConstant(type_id), + .type_inst_id = type_inst_id, + .witness_inst_id = witness_inst_id}); + } + auto TryResolveTypedInst(SemIR::InterfaceWitness inst) -> ResolveResult { auto elements = GetLocalInstBlockContents(inst.elements_id); if (HasNewWork()) { diff --git a/toolchain/check/merge.cpp b/toolchain/check/merge.cpp index 066b3756363c..44e50bf89033 100644 --- a/toolchain/check/merge.cpp +++ b/toolchain/check/merge.cpp @@ -203,6 +203,10 @@ static auto CheckRedeclParam(Context& context, bool is_implicit_param, // TODO: Consider differentiating between type and name mistakes. For now, // taking the simpler approach because I also think we may want to refactor // params. + CARBON_DIAGNOSTIC( + RedeclParamPrevious, Note, + "previous declaration's corresponding {0:implicit |}parameter here", + BoolAsSelect); auto emit_diagnostic = [&]() { if (!diagnose) { return; @@ -210,10 +214,6 @@ static auto CheckRedeclParam(Context& context, bool is_implicit_param, CARBON_DIAGNOSTIC(RedeclParamDiffers, Error, "redeclaration differs at {0:implicit |}parameter {1}", BoolAsSelect, int32_t); - CARBON_DIAGNOSTIC( - RedeclParamPrevious, Note, - "previous declaration's corresponding {0:implicit |}parameter here", - BoolAsSelect); context.emitter() .Build(new_param_pattern_id, RedeclParamDiffers, is_implicit_param, param_index + 1) @@ -223,15 +223,30 @@ static auto CheckRedeclParam(Context& context, bool is_implicit_param, auto new_param_pattern = context.insts().Get(new_param_pattern_id); auto prev_param_pattern = context.insts().Get(prev_param_pattern_id); - if (new_param_pattern.kind() != prev_param_pattern.kind() || - !context.types().AreEqualAcrossDeclarations( - new_param_pattern.type_id(), - SemIR::GetTypeInSpecific(context.sem_ir(), prev_specific_id, - prev_param_pattern.type_id()))) { + if (new_param_pattern.kind() != prev_param_pattern.kind()) { emit_diagnostic(); return false; } + auto prev_param_type_id = SemIR::GetTypeInSpecific( + context.sem_ir(), prev_specific_id, prev_param_pattern.type_id()); + if (!context.types().AreEqualAcrossDeclarations(new_param_pattern.type_id(), + prev_param_type_id)) { + if (!diagnose) { + return false; + } + CARBON_DIAGNOSTIC(RedeclParamDiffersType, Error, + "type {3} of {0:implicit |}parameter {1} in " + "redeclaration differs from previous parameter type {2}", + BoolAsSelect, int32_t, SemIR::TypeId, SemIR::TypeId); + context.emitter() + .Build(new_param_pattern_id, RedeclParamDiffersType, is_implicit_param, + param_index + 1, prev_param_type_id, new_param_pattern.type_id()) + .Note(prev_param_pattern_id, RedeclParamPrevious, is_implicit_param) + .Emit(); + return false; + } + if (new_param_pattern.Is()) { new_param_pattern = context.insts().Get( new_param_pattern.As().inner_id); diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index 00a6339c2143..f3b0d6b18d85 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -32,20 +32,20 @@ fn G() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.30, %.33, %.36) [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32, %i32) [template] -// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.30, %.33, %.36) [template] +// CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.34, %.37, %.40) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,30 +80,30 @@ fn G() { // CHECK:STDOUT: %.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc13_28: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28) -// CHECK:STDOUT: %.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.3: = bound_method %.loc13_22, %.loc13_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_29.4: = specific_function %.loc13_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %.loc13_29.4(%.loc13_22) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_29.5: init %i32 = converted %.loc13_22, %int.convert_checked.loc13_29.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_29.3: = bound_method %.loc13_22, %.loc13_29.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc13_29.4: = specific_function %.loc13_29.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %.loc13_29.4(%.loc13_22) [template = constants.%.34] +// CHECK:STDOUT: %.loc13_29.5: init %i32 = converted %.loc13_22, %int.convert_checked.loc13_29.1 [template = constants.%.34] // CHECK:STDOUT: %.loc13_29.6: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc13_29.7: ref %i32 = array_index %a.var, %.loc13_29.6 -// CHECK:STDOUT: %.loc13_29.8: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_29.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.10: = bound_method %.loc13_25, %.loc13_29.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_29.11: = specific_function %.loc13_29.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %.loc13_29.11(%.loc13_25) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_29.12: init %i32 = converted %.loc13_25, %int.convert_checked.loc13_29.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_29.8: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_29.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_29.10: = bound_method %.loc13_25, %.loc13_29.9 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_29.11: = specific_function %.loc13_29.10, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %.loc13_29.11(%.loc13_25) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_29.12: init %i32 = converted %.loc13_25, %int.convert_checked.loc13_29.2 [template = constants.%.37] // CHECK:STDOUT: %.loc13_29.13: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc13_29.14: ref %i32 = array_index %a.var, %.loc13_29.13 -// CHECK:STDOUT: %.loc13_29.15: init %i32 = initialize_from %.loc13_29.12 to %.loc13_29.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_29.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.17: = bound_method %.loc13_28, %.loc13_29.16 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_29.18: = specific_function %.loc13_29.17, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %.loc13_29.18(%.loc13_28) [template = constants.%.36] -// CHECK:STDOUT: %.loc13_29.19: init %i32 = converted %.loc13_28, %int.convert_checked.loc13_29.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_29.15: init %i32 = initialize_from %.loc13_29.12 to %.loc13_29.14 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_29.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_29.17: = bound_method %.loc13_28, %.loc13_29.16 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_29.18: = specific_function %.loc13_29.17, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %.loc13_29.18(%.loc13_28) [template = constants.%.40] +// CHECK:STDOUT: %.loc13_29.19: init %i32 = converted %.loc13_28, %int.convert_checked.loc13_29.3 [template = constants.%.40] // CHECK:STDOUT: %.loc13_29.20: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc13_29.21: ref %i32 = array_index %a.var, %.loc13_29.20 -// CHECK:STDOUT: %.loc13_29.22: init %i32 = initialize_from %.loc13_29.19 to %.loc13_29.21 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_29.22: init %i32 = initialize_from %.loc13_29.19 to %.loc13_29.21 [template = constants.%.40] // CHECK:STDOUT: %.loc13_29.23: init %.3 = array_init (%.loc13_29.8, %.loc13_29.15, %.loc13_29.22) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc13_30: init %.3 = converted %.loc13_29.1, %.loc13_29.23 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_30 @@ -127,27 +127,27 @@ fn G() { // CHECK:STDOUT: %.loc14_32: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc14_35: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%.loc14_29, %.loc14_32, %.loc14_35) -// CHECK:STDOUT: %.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_36.3: = bound_method %.loc14_29, %.loc14_36.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_36.4: = specific_function %.loc14_36.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %.loc14_36.4(%.loc14_29) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_36.5: init %i32 = converted %.loc14_29, %int.convert_checked.loc14_36.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_36.3: = bound_method %.loc14_29, %.loc14_36.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_36.4: = specific_function %.loc14_36.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %.loc14_36.4(%.loc14_29) [template = constants.%.34] +// CHECK:STDOUT: %.loc14_36.5: init %i32 = converted %.loc14_29, %int.convert_checked.loc14_36.1 [template = constants.%.34] // CHECK:STDOUT: %.loc14_36.6: ref %i32 = tuple_access %b.var, element0 -// CHECK:STDOUT: %.loc14_36.7: init %i32 = initialize_from %.loc14_36.5 to %.loc14_36.6 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_36.8: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_36.9: = bound_method %.loc14_32, %.loc14_36.8 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_36.10: = specific_function %.loc14_36.9, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %.loc14_36.10(%.loc14_32) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_36.11: init %i32 = converted %.loc14_32, %int.convert_checked.loc14_36.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_36.7: init %i32 = initialize_from %.loc14_36.5 to %.loc14_36.6 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_36.8: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_36.9: = bound_method %.loc14_32, %.loc14_36.8 [template = constants.%.35] +// CHECK:STDOUT: %.loc14_36.10: = specific_function %.loc14_36.9, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %.loc14_36.10(%.loc14_32) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_36.11: init %i32 = converted %.loc14_32, %int.convert_checked.loc14_36.2 [template = constants.%.37] // CHECK:STDOUT: %.loc14_36.12: ref %i32 = tuple_access %b.var, element1 -// CHECK:STDOUT: %.loc14_36.13: init %i32 = initialize_from %.loc14_36.11 to %.loc14_36.12 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_36.14: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_36.15: = bound_method %.loc14_35, %.loc14_36.14 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_36.16: = specific_function %.loc14_36.15, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %.loc14_36.16(%.loc14_35) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_36.17: init %i32 = converted %.loc14_35, %int.convert_checked.loc14_36.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_36.13: init %i32 = initialize_from %.loc14_36.11 to %.loc14_36.12 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_36.14: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_36.15: = bound_method %.loc14_35, %.loc14_36.14 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_36.16: = specific_function %.loc14_36.15, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %.loc14_36.16(%.loc14_35) [template = constants.%.40] +// CHECK:STDOUT: %.loc14_36.17: init %i32 = converted %.loc14_35, %int.convert_checked.loc14_36.3 [template = constants.%.40] // CHECK:STDOUT: %.loc14_36.18: ref %i32 = tuple_access %b.var, element2 -// CHECK:STDOUT: %.loc14_36.19: init %i32 = initialize_from %.loc14_36.17 to %.loc14_36.18 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_36.19: init %i32 = initialize_from %.loc14_36.17 to %.loc14_36.18 [template = constants.%.40] // CHECK:STDOUT: %.loc14_36.20: init %tuple.type.3 = tuple_init (%.loc14_36.7, %.loc14_36.13, %.loc14_36.19) to %b.var [template = constants.%tuple] // CHECK:STDOUT: %.loc14_37: init %tuple.type.3 = converted %.loc14_36.1, %.loc14_36.20 [template = constants.%tuple] // CHECK:STDOUT: assign %b.var, %.loc14_37 diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index e1526a12f0a0..99c0fd26e2d6 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -30,15 +30,15 @@ fn Run() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.25) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.27: type = array_type %.26, %i32 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.31: type = array_type %.30, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,12 +77,12 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%.loc11_28) -// CHECK:STDOUT: %.loc11_30.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_30.3: = bound_method %.loc11_28, %.loc11_30.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_30.4: = specific_function %.loc11_30.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_30.4(%.loc11_28) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_30.6: %i32 = converted %.loc11_28, %.loc11_30.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_30.3: = bound_method %.loc11_28, %.loc11_30.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_30.4: = specific_function %.loc11_30.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_30.4(%.loc11_28) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_30.6: %i32 = converted %.loc11_28, %.loc11_30.5 [template = constants.%.29] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_30.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_31: %tuple.type.2 = converted %.loc11_30.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: return %.loc11_31 @@ -92,12 +92,12 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 1 [template = constants.%.26] +// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 1 [template = constants.%.30] // CHECK:STDOUT: %.loc14_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc14_11.3: type = converted %int.make_type_signed, %.loc14_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, %i32 [template = constants.%.27] -// CHECK:STDOUT: %t.var: ref %.27 = var t -// CHECK:STDOUT: %t: ref %.27 = bind_name t, %t.var +// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, %i32 [template = constants.%.31] +// CHECK:STDOUT: %t.var: ref %.31 = var t +// CHECK:STDOUT: %t: ref %.31 = bind_name t, %t.var // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() // CHECK:STDOUT: %.loc14_22.1: ref %tuple.type.2 = temporary_storage @@ -107,8 +107,8 @@ fn Run() { // CHECK:STDOUT: %.loc14_22.5: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc14_22.6: ref %i32 = array_index %t.var, %.loc14_22.5 // CHECK:STDOUT: %.loc14_22.7: init %i32 = initialize_from %.loc14_22.4 to %.loc14_22.6 -// CHECK:STDOUT: %.loc14_22.8: init %.27 = array_init (%.loc14_22.7) to %t.var -// CHECK:STDOUT: %.loc14_24: init %.27 = converted %F.call, %.loc14_22.8 +// CHECK:STDOUT: %.loc14_22.8: init %.31 = array_init (%.loc14_22.7) to %t.var +// CHECK:STDOUT: %.loc14_24: init %.31 = converted %F.call, %.loc14_22.8 // CHECK:STDOUT: assign %t.var, %.loc14_24 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index d3d5a03cec26..9f4a12659887 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -27,19 +27,19 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.28, %.31, %.34) [template] -// CHECK:STDOUT: %.35: type = array_type %.5, %i32 [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.33: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.36: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.32, %.35, %.38) [template] +// CHECK:STDOUT: %.39: type = array_type %.5, %i32 [template] +// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,9 +79,9 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 3 [template = constants.%.5] // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_9.3: type = converted %int.make_type_signed.loc12, %.loc12_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, %i32 [template = constants.%.35] -// CHECK:STDOUT: %b.var: ref %.35 = var b -// CHECK:STDOUT: %b: ref %.35 = bind_name b, %b.var +// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, %i32 [template = constants.%.39] +// CHECK:STDOUT: %b.var: ref %.39 = var b +// CHECK:STDOUT: %b: ref %.39 = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -90,34 +90,34 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc11_30: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %.loc11_33: Core.IntLiteral = int_value 3 [template = constants.%.5] // CHECK:STDOUT: %.loc11_34.1: %tuple.type.3 = tuple_literal (%.loc11_27, %.loc11_30, %.loc11_33) -// CHECK:STDOUT: %.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_34.3: = bound_method %.loc11_27, %.loc11_34.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_34.4: = specific_function %.loc11_34.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %.loc11_34.4(%.loc11_27) [template = constants.%.28] -// CHECK:STDOUT: %.loc11_34.5: init %i32 = converted %.loc11_27, %int.convert_checked.loc11_34.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_34.3: = bound_method %.loc11_27, %.loc11_34.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_34.4: = specific_function %.loc11_34.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %.loc11_34.4(%.loc11_27) [template = constants.%.32] +// CHECK:STDOUT: %.loc11_34.5: init %i32 = converted %.loc11_27, %int.convert_checked.loc11_34.1 [template = constants.%.32] // CHECK:STDOUT: %.loc11_34.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_34.7: init %i32 = initialize_from %.loc11_34.5 to %.loc11_34.6 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_34.8: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_34.9: = bound_method %.loc11_30, %.loc11_34.8 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_34.10: = specific_function %.loc11_34.9, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %.loc11_34.10(%.loc11_30) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_34.11: init %i32 = converted %.loc11_30, %int.convert_checked.loc11_34.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_34.7: init %i32 = initialize_from %.loc11_34.5 to %.loc11_34.6 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_34.8: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_34.9: = bound_method %.loc11_30, %.loc11_34.8 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_34.10: = specific_function %.loc11_34.9, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %.loc11_34.10(%.loc11_30) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_34.11: init %i32 = converted %.loc11_30, %int.convert_checked.loc11_34.2 [template = constants.%.35] // CHECK:STDOUT: %.loc11_34.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_34.13: init %i32 = initialize_from %.loc11_34.11 to %.loc11_34.12 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_34.14: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_34.15: = bound_method %.loc11_33, %.loc11_34.14 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_34.16: = specific_function %.loc11_34.15, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %.loc11_34.16(%.loc11_33) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_34.17: init %i32 = converted %.loc11_33, %int.convert_checked.loc11_34.3 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_34.13: init %i32 = initialize_from %.loc11_34.11 to %.loc11_34.12 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_34.14: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_34.15: = bound_method %.loc11_33, %.loc11_34.14 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_34.16: = specific_function %.loc11_34.15, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %.loc11_34.16(%.loc11_33) [template = constants.%.38] +// CHECK:STDOUT: %.loc11_34.17: init %i32 = converted %.loc11_33, %int.convert_checked.loc11_34.3 [template = constants.%.38] // CHECK:STDOUT: %.loc11_34.18: ref %i32 = tuple_access file.%a.var, element2 -// CHECK:STDOUT: %.loc11_34.19: init %i32 = initialize_from %.loc11_34.17 to %.loc11_34.18 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_34.19: init %i32 = initialize_from %.loc11_34.17 to %.loc11_34.18 [template = constants.%.38] // CHECK:STDOUT: %.loc11_34.20: init %tuple.type.2 = tuple_init (%.loc11_34.7, %.loc11_34.13, %.loc11_34.19) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_35: init %tuple.type.2 = converted %.loc11_34.1, %.loc11_34.20 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_35 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %.loc12_19.1: ref %i32 = tuple_access %a.ref, element0 // CHECK:STDOUT: %.loc12_19.2: %i32 = bind_value %.loc12_19.1 -// CHECK:STDOUT: %.loc12_19.3: Core.IntLiteral = int_value 0 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_19.3: Core.IntLiteral = int_value 0 [template = constants.%.41] // CHECK:STDOUT: %.loc12_19.4: ref %i32 = array_index file.%b.var, %.loc12_19.3 // CHECK:STDOUT: %.loc12_19.5: init %i32 = initialize_from %.loc12_19.2 to %.loc12_19.4 // CHECK:STDOUT: %.loc12_19.6: ref %i32 = tuple_access %a.ref, element1 @@ -130,8 +130,8 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %.loc12_19.13: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %.loc12_19.14: ref %i32 = array_index file.%b.var, %.loc12_19.13 // CHECK:STDOUT: %.loc12_19.15: init %i32 = initialize_from %.loc12_19.12 to %.loc12_19.14 -// CHECK:STDOUT: %.loc12_19.16: init %.35 = array_init (%.loc12_19.5, %.loc12_19.10, %.loc12_19.15) to file.%b.var -// CHECK:STDOUT: %.loc12_20: init %.35 = converted %a.ref, %.loc12_19.16 +// CHECK:STDOUT: %.loc12_19.16: init %.39 = array_init (%.loc12_19.5, %.loc12_19.10, %.loc12_19.15) to file.%b.var +// CHECK:STDOUT: %.loc12_20: init %.39 = converted %a.ref, %.loc12_19.16 // CHECK:STDOUT: assign file.%b.var, %.loc12_20 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 73ca0377452f..bcfb6ec14015 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -27,27 +27,27 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] -// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.28) [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.32) [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: type = array_type %.30, f64 [template] -// CHECK:STDOUT: %.33: f64 = float_literal 11.100000000000001 [template] -// CHECK:STDOUT: %.34: f64 = float_literal 2.2000000000000002 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: type = array_type %.34, f64 [template] +// CHECK:STDOUT: %.37: f64 = float_literal 11.100000000000001 [template] +// CHECK:STDOUT: %.38: f64 = float_literal 2.2000000000000002 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (f64, f64) [template] -// CHECK:STDOUT: %array.2: %.31 = tuple_value (%.33, %.34) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.36: type = array_type %.35, %empty_tuple.type [template] +// CHECK:STDOUT: %array.2: %.35 = tuple_value (%.37, %.38) [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.40: type = array_type %.39, %empty_tuple.type [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %array.3: %.36 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %array.3: %.40 = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,48 +76,48 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, %i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref %.3 = var a // CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.33] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 2 [template = constants.%.34] // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64] -// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, f64 [template = constants.%.31] -// CHECK:STDOUT: %b.var: ref %.31 = var b -// CHECK:STDOUT: %b: ref %.31 = bind_name b, %b.var +// CHECK:STDOUT: %.loc12_15: type = array_type %.loc12_14, f64 [template = constants.%.35] +// CHECK:STDOUT: %b.var: ref %.35 = var b +// CHECK:STDOUT: %b: ref %.35 = bind_name b, %b.var // CHECK:STDOUT: %.loc13_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_13: Core.IntLiteral = int_value 5 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_13: Core.IntLiteral = int_value 5 [template = constants.%.39] // CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc13_14: type = array_type %.loc13_13, %empty_tuple.type [template = constants.%.36] -// CHECK:STDOUT: %c.var: ref %.36 = var c -// CHECK:STDOUT: %c: ref %.36 = bind_name c, %c.var +// CHECK:STDOUT: %.loc13_14: type = array_type %.loc13_13, %empty_tuple.type [template = constants.%.40] +// CHECK:STDOUT: %c.var: ref %.40 = var c +// CHECK:STDOUT: %c: ref %.40 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_20, %.loc11_22.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_22.4(%.loc11_20) [template = constants.%.28] -// CHECK:STDOUT: %.loc11_22.5: init %i32 = converted %.loc11_20, %int.convert_checked [template = constants.%.28] +// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_20, %.loc11_22.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_22.4(%.loc11_20) [template = constants.%.32] +// CHECK:STDOUT: %.loc11_22.5: init %i32 = converted %.loc11_20, %int.convert_checked [template = constants.%.32] // CHECK:STDOUT: %.loc11_22.6: Core.IntLiteral = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc11_22.7: ref %i32 = array_index file.%a.var, %.loc11_22.6 -// CHECK:STDOUT: %.loc11_22.8: init %i32 = initialize_from %.loc11_22.5 to %.loc11_22.7 [template = constants.%.28] +// CHECK:STDOUT: %.loc11_22.8: init %i32 = initialize_from %.loc11_22.5 to %.loc11_22.7 [template = constants.%.32] // CHECK:STDOUT: %.loc11_22.9: init %.3 = array_init (%.loc11_22.8) to file.%a.var [template = constants.%array.1] // CHECK:STDOUT: %.loc11_23: init %.3 = converted %.loc11_22.1, %.loc11_22.9 [template = constants.%array.1] // CHECK:STDOUT: assign file.%a.var, %.loc11_23 -// CHECK:STDOUT: %.loc12_20: f64 = float_literal 11.100000000000001 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_26: f64 = float_literal 2.2000000000000002 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_20: f64 = float_literal 11.100000000000001 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_26: f64 = float_literal 2.2000000000000002 [template = constants.%.38] // CHECK:STDOUT: %.loc12_30.1: %tuple.type.2 = tuple_literal (%.loc12_20, %.loc12_26) // CHECK:STDOUT: %.loc12_30.2: Core.IntLiteral = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc12_30.3: ref f64 = array_index file.%b.var, %.loc12_30.2 -// CHECK:STDOUT: %.loc12_30.4: init f64 = initialize_from %.loc12_20 to %.loc12_30.3 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_30.4: init f64 = initialize_from %.loc12_20 to %.loc12_30.3 [template = constants.%.37] // CHECK:STDOUT: %.loc12_30.5: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_30.6: ref f64 = array_index file.%b.var, %.loc12_30.5 -// CHECK:STDOUT: %.loc12_30.7: init f64 = initialize_from %.loc12_26 to %.loc12_30.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_30.8: init %.31 = array_init (%.loc12_30.4, %.loc12_30.7) to file.%b.var [template = constants.%array.2] -// CHECK:STDOUT: %.loc12_31: init %.31 = converted %.loc12_30.1, %.loc12_30.8 [template = constants.%array.2] +// CHECK:STDOUT: %.loc12_30.7: init f64 = initialize_from %.loc12_26 to %.loc12_30.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc12_30.8: init %.35 = array_init (%.loc12_30.4, %.loc12_30.7) to file.%b.var [template = constants.%array.2] +// CHECK:STDOUT: %.loc12_31: init %.35 = converted %.loc12_30.1, %.loc12_30.8 [template = constants.%array.2] // CHECK:STDOUT: assign file.%b.var, %.loc12_31 // CHECK:STDOUT: %.loc13_20.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_24.1: %empty_tuple.type = tuple_literal () @@ -133,20 +133,20 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.loc13_38.6: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.5 // CHECK:STDOUT: %.loc13_24.2: init %empty_tuple.type = tuple_init () to %.loc13_38.6 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_38.7: init %empty_tuple.type = converted %.loc13_24.1, %.loc13_24.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.8: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_38.8: Core.IntLiteral = int_value 2 [template = constants.%.34] // CHECK:STDOUT: %.loc13_38.9: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.8 // CHECK:STDOUT: %.loc13_28.2: init %empty_tuple.type = tuple_init () to %.loc13_38.9 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_38.10: init %empty_tuple.type = converted %.loc13_28.1, %.loc13_28.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.11: Core.IntLiteral = int_value 3 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_38.11: Core.IntLiteral = int_value 3 [template = constants.%.42] // CHECK:STDOUT: %.loc13_38.12: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.11 // CHECK:STDOUT: %.loc13_32.2: init %empty_tuple.type = tuple_init () to %.loc13_38.12 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_38.13: init %empty_tuple.type = converted %.loc13_32.1, %.loc13_32.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.14: Core.IntLiteral = int_value 4 [template = constants.%.39] +// CHECK:STDOUT: %.loc13_38.14: Core.IntLiteral = int_value 4 [template = constants.%.43] // CHECK:STDOUT: %.loc13_38.15: ref %empty_tuple.type = array_index file.%c.var, %.loc13_38.14 // CHECK:STDOUT: %.loc13_36.2: init %empty_tuple.type = tuple_init () to %.loc13_38.15 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_38.16: init %empty_tuple.type = converted %.loc13_36.1, %.loc13_36.2 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc13_38.17: init %.36 = array_init (%.loc13_38.4, %.loc13_38.7, %.loc13_38.10, %.loc13_38.13, %.loc13_38.16) to file.%c.var [template = constants.%array.3] -// CHECK:STDOUT: %.loc13_39: init %.36 = converted %.loc13_38.1, %.loc13_38.17 [template = constants.%array.3] +// CHECK:STDOUT: %.loc13_38.17: init %.40 = array_init (%.loc13_38.4, %.loc13_38.7, %.loc13_38.10, %.loc13_38.13, %.loc13_38.16) to file.%c.var [template = constants.%array.3] +// CHECK:STDOUT: %.loc13_39: init %.40 = converted %.loc13_38.1, %.loc13_38.17 [template = constants.%array.3] // CHECK:STDOUT: assign file.%c.var, %.loc13_39 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index 2b6356c44de3..7626990eda2d 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -35,33 +35,33 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.38: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %array: %.35 = tuple_value (%.26, %.29, %.30) [template] -// CHECK:STDOUT: %.40: %u32 = int_value 3 [template] +// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.42: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] +// CHECK:STDOUT: %array: %.39 = tuple_value (%.30, %.33, %.34) [template] +// CHECK:STDOUT: %.44: %u32 = int_value 3 [template] // CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.5, @impl.4(%.1) [template] // CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %.41: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %.42: = bound_method %.40, %Convert.16 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.5(%.1) [template] +// CHECK:STDOUT: %.45: = interface_witness (%Convert.16) [template] +// CHECK:STDOUT: %.46: = bound_method %.44, %Convert.16 [template] +// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.5(%.1) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -135,62 +135,62 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc14_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_21.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_18.3: = bound_method %.loc14_18.1, %.loc14_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc14_18.4: = specific_function %.loc14_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %.loc14_18.4(%.loc14_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_18.5: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_18.6: %i32 = converted %.loc14_18.1, %.loc14_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_21.3: = bound_method %.loc14_21.1, %.loc14_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_21.4: = specific_function %.loc14_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %.loc14_21.4(%.loc14_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_21.5: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_21.6: %i32 = converted %.loc14_21.1, %.loc14_21.5 [template = constants.%.29] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.6, %.loc14_21.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_18.3: = bound_method %.loc14_18.1, %.loc14_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc14_18.4: = specific_function %.loc14_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %.loc14_18.4(%.loc14_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_18.5: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_18.6: %i32 = converted %.loc14_18.1, %.loc14_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_21.3: = bound_method %.loc14_21.1, %.loc14_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_21.4: = specific_function %.loc14_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %.loc14_21.4(%.loc14_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_21.5: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_21.6: %i32 = converted %.loc14_21.1, %.loc14_21.5 [template = constants.%.33] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.6, %.loc14_21.6) [template = constants.%.34] // CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] // CHECK:STDOUT: %.loc14_9.3: type = converted %int.make_type_signed.loc14, %.loc14_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc14_17.2: = bound_method %int.sadd, %.loc14_17.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_17.3: = specific_function %.loc14_17.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_17.4: %i32 = value_of_initializer %int.sadd [template = constants.%.30] -// CHECK:STDOUT: %.loc14_17.5: %i32 = converted %int.sadd, %.loc14_17.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc14_17: init Core.IntLiteral = call %.loc14_17.3(%.loc14_17.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc14_17.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_17 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_17.7: Core.IntLiteral = converted %int.sadd, %.loc14_17.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_17.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %a.var: ref %.35 = var a -// CHECK:STDOUT: %a: ref %.35 = bind_name a, %a.var +// CHECK:STDOUT: %.loc14_17.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc14_17.2: = bound_method %int.sadd, %.loc14_17.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_17.3: = specific_function %.loc14_17.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_17.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] +// CHECK:STDOUT: %.loc14_17.5: %i32 = converted %int.sadd, %.loc14_17.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc14_17: init Core.IntLiteral = call %.loc14_17.3(%.loc14_17.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc14_17.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_17 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_17.7: Core.IntLiteral = converted %int.sadd, %.loc14_17.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_17.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %a.var: ref %.39 = var a +// CHECK:STDOUT: %a: ref %.39 = bind_name a, %a.var // CHECK:STDOUT: %.loc15_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_9.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 3 [template = constants.%.34] +// CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 3 [template = constants.%.38] // CHECK:STDOUT: %.loc15_9.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_9.3: type = converted %int.make_type_signed.loc15, %.loc15_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_16: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_15: type = array_type %.loc15_14, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc15_16: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %.loc16_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_9.1) [template = constants.%i32] // CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, %ConvertToU32.decl [template = constants.%ConvertToU32] -// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 3 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_27.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_27.3: = bound_method %.loc16_27.1, %.loc16_27.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_27.4: = specific_function %.loc16_27.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %.loc16_27.4(%.loc16_27.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_27.5: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_27.6: %i32 = converted %.loc16_27.1, %.loc16_27.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc16_26.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.40] +// CHECK:STDOUT: %.loc16_27.1: Core.IntLiteral = int_value 3 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_27.3: = bound_method %.loc16_27.1, %.loc16_27.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc16_27.4: = specific_function %.loc16_27.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %.loc16_27.4(%.loc16_27.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_27.5: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_27.6: %i32 = converted %.loc16_27.1, %.loc16_27.5 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc16_26.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.44] // CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] // CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed.loc16, %.loc16_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.1: %Convert.type.6 = interface_witness_access constants.%.41, element0 [template = constants.%Convert.16] -// CHECK:STDOUT: %.loc16_26.2: = bound_method %int.convert_checked.loc16_26.1, %.loc16_26.1 [template = constants.%.42] -// CHECK:STDOUT: %.loc16_26.3: = specific_function %.loc16_26.2, @Convert.5(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %.loc16_26.4: %u32 = value_of_initializer %int.convert_checked.loc16_26.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc16_26.5: %u32 = converted %int.convert_checked.loc16_26.1, %.loc16_26.4 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc16_26.2: init Core.IntLiteral = call %.loc16_26.3(%.loc16_26.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_26.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_26.7: Core.IntLiteral = converted %int.convert_checked.loc16_26.1, %.loc16_26.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_26.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc16_30: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc16_26.1: %Convert.type.6 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %.loc16_26.2: = bound_method %int.convert_checked.loc16_26.1, %.loc16_26.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc16_26.3: = specific_function %.loc16_26.2, @Convert.5(constants.%.1) [template = constants.%.47] +// CHECK:STDOUT: %.loc16_26.4: %u32 = value_of_initializer %int.convert_checked.loc16_26.1 [template = constants.%.44] +// CHECK:STDOUT: %.loc16_26.5: %u32 = converted %int.convert_checked.loc16_26.1, %.loc16_26.4 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc16_26.2: init Core.IntLiteral = call %.loc16_26.3(%.loc16_26.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc16_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_26.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_26.7: Core.IntLiteral = converted %int.convert_checked.loc16_26.1, %.loc16_26.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_26.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc16_30: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; @@ -201,41 +201,41 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_28: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_31: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 3 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 3 [template = constants.%.38] // CHECK:STDOUT: %.loc14_35.1: %tuple.type = tuple_literal (%.loc14_28, %.loc14_31, %.loc14_34) -// CHECK:STDOUT: %.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.3: = bound_method %.loc14_28, %.loc14_35.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc14_35.4: = specific_function %.loc14_35.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %.loc14_35.4(%.loc14_28) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_35.5: init %i32 = converted %.loc14_28, %int.convert_checked.loc14_35.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_35.6: Core.IntLiteral = int_value 0 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_35.3: = bound_method %.loc14_28, %.loc14_35.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc14_35.4: = specific_function %.loc14_35.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %.loc14_35.4(%.loc14_28) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_35.5: init %i32 = converted %.loc14_28, %int.convert_checked.loc14_35.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_35.6: Core.IntLiteral = int_value 0 [template = constants.%.41] // CHECK:STDOUT: %.loc14_35.7: ref %i32 = array_index file.%a.var, %.loc14_35.6 -// CHECK:STDOUT: %.loc14_35.8: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.7 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_35.9: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.10: = bound_method %.loc14_31, %.loc14_35.9 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_35.11: = specific_function %.loc14_35.10, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %.loc14_35.11(%.loc14_31) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_35.12: init %i32 = converted %.loc14_31, %int.convert_checked.loc14_35.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_35.8: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.7 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_35.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_35.10: = bound_method %.loc14_31, %.loc14_35.9 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_35.11: = specific_function %.loc14_35.10, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %.loc14_35.11(%.loc14_31) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_35.12: init %i32 = converted %.loc14_31, %int.convert_checked.loc14_35.2 [template = constants.%.33] // CHECK:STDOUT: %.loc14_35.13: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_35.14: ref %i32 = array_index file.%a.var, %.loc14_35.13 -// CHECK:STDOUT: %.loc14_35.15: init %i32 = initialize_from %.loc14_35.12 to %.loc14_35.14 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_35.16: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.17: = bound_method %.loc14_34, %.loc14_35.16 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_35.18: = specific_function %.loc14_35.17, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %.loc14_35.18(%.loc14_34) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_35.19: init %i32 = converted %.loc14_34, %int.convert_checked.loc14_35.3 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_35.15: init %i32 = initialize_from %.loc14_35.12 to %.loc14_35.14 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_35.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_35.17: = bound_method %.loc14_34, %.loc14_35.16 [template = constants.%.42] +// CHECK:STDOUT: %.loc14_35.18: = specific_function %.loc14_35.17, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %.loc14_35.18(%.loc14_34) [template = constants.%.34] +// CHECK:STDOUT: %.loc14_35.19: init %i32 = converted %.loc14_34, %int.convert_checked.loc14_35.3 [template = constants.%.34] // CHECK:STDOUT: %.loc14_35.20: Core.IntLiteral = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc14_35.21: ref %i32 = array_index file.%a.var, %.loc14_35.20 -// CHECK:STDOUT: %.loc14_35.22: init %i32 = initialize_from %.loc14_35.19 to %.loc14_35.21 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_35.23: init %.35 = array_init (%.loc14_35.8, %.loc14_35.15, %.loc14_35.22) to file.%a.var [template = constants.%array] -// CHECK:STDOUT: %.loc14_36: init %.35 = converted %.loc14_35.1, %.loc14_35.23 [template = constants.%array] +// CHECK:STDOUT: %.loc14_35.22: init %i32 = initialize_from %.loc14_35.19 to %.loc14_35.21 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_35.23: init %.39 = array_init (%.loc14_35.8, %.loc14_35.15, %.loc14_35.22) to file.%a.var [template = constants.%array] +// CHECK:STDOUT: %.loc14_36: init %.39 = converted %.loc14_35.1, %.loc14_35.23 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc14_36 -// CHECK:STDOUT: %a.ref.loc15: ref %.35 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: %.36 = addr_of %a.ref.loc15 -// CHECK:STDOUT: %b: %.36 = bind_name b, %.loc15 -// CHECK:STDOUT: %a.ref.loc16: ref %.35 = name_ref a, file.%a -// CHECK:STDOUT: %.loc16: %.36 = addr_of %a.ref.loc16 -// CHECK:STDOUT: %c: %.36 = bind_name c, %.loc16 +// CHECK:STDOUT: %a.ref.loc15: ref %.39 = name_ref a, file.%a +// CHECK:STDOUT: %.loc15: %.40 = addr_of %a.ref.loc15 +// CHECK:STDOUT: %b: %.40 = bind_name b, %.loc15 +// CHECK:STDOUT: %a.ref.loc16: ref %.39 = name_ref a, file.%a +// CHECK:STDOUT: %.loc16: %.40 = addr_of %a.ref.loc16 +// CHECK:STDOUT: %c: %.40 = bind_name c, %.loc16 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index c5a470e7c4e0..2198dcdd5cea 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -29,17 +29,17 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.28: = bound_method %.26, %Convert.15 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,23 +81,23 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_9.1) [template = constants.%i32] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc16_21.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_21.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_21.3: = bound_method %.loc16_21.1, %.loc16_21.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc16_21.4: = specific_function %.loc16_21.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %.loc16_21.4(%.loc16_21.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc16_21.5: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%.25] -// CHECK:STDOUT: %.loc16_21.6: %i32 = converted %.loc16_21.1, %.loc16_21.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc16_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_21.3: = bound_method %.loc16_21.1, %.loc16_21.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc16_21.4: = specific_function %.loc16_21.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %.loc16_21.4(%.loc16_21.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc16_21.5: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%.29] +// CHECK:STDOUT: %.loc16_21.6: %i32 = converted %.loc16_21.1, %.loc16_21.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.6) [template = constants.%.30] // CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed, %.loc16_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc16_20.2: = bound_method %int.snegate, %.loc16_20.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc16_20.3: = specific_function %.loc16_20.2, @Convert.4(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc16_20.4: %i32 = value_of_initializer %int.snegate [template = constants.%.26] -// CHECK:STDOUT: %.loc16_20.5: %i32 = converted %int.snegate, %.loc16_20.4 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc16_20: init Core.IntLiteral = call %.loc16_20.3(%.loc16_20.5) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_20.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_20 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_20.7: Core.IntLiteral = converted %int.snegate, %.loc16_20.6 [template = constants.%.30] +// CHECK:STDOUT: %.loc16_20.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc16_20.2: = bound_method %int.snegate, %.loc16_20.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc16_20.3: = specific_function %.loc16_20.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc16_20.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] +// CHECK:STDOUT: %.loc16_20.5: %i32 = converted %int.snegate, %.loc16_20.4 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc16_20: init Core.IntLiteral = call %.loc16_20.3(%.loc16_20.5) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_20.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_20 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_20.7: Core.IntLiteral = converted %int.snegate, %.loc16_20.6 [template = constants.%.34] // CHECK:STDOUT: %.loc16_23: type = array_type %.loc16_20.7, %i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var diff --git a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon index 5d8b646af1d8..78e24584fd53 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon @@ -30,19 +30,19 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.30, %.33, %.36) [template] -// CHECK:STDOUT: %.37: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.37 = struct_value (%.2) [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] +// CHECK:STDOUT: %.41: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %.41 = struct_value (%.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,45 +83,45 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_20, %.loc11_27.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_20) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_20, %.loc11_27.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_20) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.6: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc11_27.7: ref %i32 = array_index file.%a.var, %.loc11_27.6 -// CHECK:STDOUT: %.loc11_27.8: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.10: = bound_method %.loc11_23, %.loc11_27.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.11: = specific_function %.loc11_27.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.11(%.loc11_23) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_27.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_27.8: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.10: = bound_method %.loc11_23, %.loc11_27.9 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_27.11: = specific_function %.loc11_27.10, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.11(%.loc11_23) [template = constants.%.37] +// CHECK:STDOUT: %.loc11_27.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%.37] // CHECK:STDOUT: %.loc11_27.13: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_27.14: ref %i32 = array_index file.%a.var, %.loc11_27.13 -// CHECK:STDOUT: %.loc11_27.15: init %i32 = initialize_from %.loc11_27.12 to %.loc11_27.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_27.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.17: = bound_method %.loc11_26, %.loc11_27.16 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.18: = specific_function %.loc11_27.17, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %.loc11_27.18(%.loc11_26) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_27.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_27.15: init %i32 = initialize_from %.loc11_27.12 to %.loc11_27.14 [template = constants.%.37] +// CHECK:STDOUT: %.loc11_27.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.17: = bound_method %.loc11_26, %.loc11_27.16 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_27.18: = specific_function %.loc11_27.17, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %.loc11_27.18(%.loc11_26) [template = constants.%.40] +// CHECK:STDOUT: %.loc11_27.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.3 [template = constants.%.40] // CHECK:STDOUT: %.loc11_27.20: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_27.21: ref %i32 = array_index file.%a.var, %.loc11_27.20 -// CHECK:STDOUT: %.loc11_27.22: init %i32 = initialize_from %.loc11_27.19 to %.loc11_27.21 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_27.22: init %i32 = initialize_from %.loc11_27.19 to %.loc11_27.21 [template = constants.%.40] // CHECK:STDOUT: %.loc11_27.23: init %.3 = array_init (%.loc11_27.8, %.loc11_27.15, %.loc11_27.22) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.23 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_26: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_27.1: %.37 = struct_literal (%.loc15_26) -// CHECK:STDOUT: %struct: %.37 = struct_value (%.loc15_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_27.2: %.37 = converted %.loc15_27.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.1: %.41 = struct_literal (%.loc15_26) +// CHECK:STDOUT: %struct: %.41 = struct_value (%.loc15_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_27.2: %.41 = converted %.loc15_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = struct_access %.loc15_27.2, element0 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.3: = bound_method %.loc15_28.1, %.loc15_28.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_28.4: = specific_function %.loc15_28.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_28.4(%.loc15_28.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc15_28.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_28.6: %i32 = converted %.loc15_28.1, %.loc15_28.5 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_28.3: = bound_method %.loc15_28.1, %.loc15_28.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc15_28.4: = specific_function %.loc15_28.3, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_28.4(%.loc15_28.1) [template = constants.%.40] +// CHECK:STDOUT: %.loc15_28.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.40] +// CHECK:STDOUT: %.loc15_28.6: %i32 = converted %.loc15_28.1, %.loc15_28.5 [template = constants.%.40] // CHECK:STDOUT: %.loc15_34.1: ref %i32 = array_index %a.ref, %.loc15_28.6 [template = ] // CHECK:STDOUT: %.loc15_34.2: %i32 = bind_value %.loc15_34.1 // CHECK:STDOUT: assign file.%b.var, %.loc15_34.2 diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index fb40a888dff5..30d99b380c72 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -56,13 +56,13 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, String, String) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %i32) [template] @@ -148,14 +148,14 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc18_23: String = string_literal "Hello" [template = constants.%.7] // CHECK:STDOUT: %.loc18_32: String = string_literal "World" [template = constants.%.8] // CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%.loc18_20, %.loc18_23, %.loc18_32) -// CHECK:STDOUT: %.loc18_39.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_39.3: = bound_method %.loc18_20, %.loc18_39.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_39.4: = specific_function %.loc18_39.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc18_39.4(%.loc18_20) [template = constants.%.32] -// CHECK:STDOUT: %.loc18_39.5: init %i32 = converted %.loc18_20, %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc18_39.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_39.3: = bound_method %.loc18_20, %.loc18_39.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc18_39.4: = specific_function %.loc18_39.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc18_39.4(%.loc18_20) [template = constants.%.36] +// CHECK:STDOUT: %.loc18_39.5: init %i32 = converted %.loc18_20, %int.convert_checked [template = constants.%.36] // CHECK:STDOUT: %.loc18_39.6: Core.IntLiteral = int_value 0 [template = constants.%.9] // CHECK:STDOUT: %.loc18_39.7: ref %i32 = array_index file.%a.var, %.loc18_39.6 -// CHECK:STDOUT: %.loc18_39.8: init %i32 = initialize_from %.loc18_39.5 to %.loc18_39.7 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_39.8: init %i32 = initialize_from %.loc18_39.5 to %.loc18_39.7 [template = constants.%.36] // CHECK:STDOUT: %.loc18_39.9: %i32 = converted %.loc18_23, [template = ] // CHECK:STDOUT: assign file.%a.var, // CHECK:STDOUT: %t1.ref: ref %tuple.type.3 = name_ref t1, file.%t1 @@ -168,7 +168,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %.loc28_19.7: %i32 = converted %.loc28_19.6, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: %.loc34_20: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc34_23: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc34_23: Core.IntLiteral = int_value 2 [template = constants.%.38] // CHECK:STDOUT: %.loc34_24: %tuple.type.5 = tuple_literal (%.loc34_20, %.loc34_23) // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: %t2.ref: ref %tuple.type.7 = name_ref t2, file.%t2 diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index da3aec4d6c27..c3fe00596b8a 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -36,17 +36,17 @@ fn G() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.30, %.33, %.36) [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -125,41 +125,41 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc16_19: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%.loc16_13, %.loc16_16, %.loc16_19) // CHECK:STDOUT: %.loc16_23.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_20.3: = bound_method %.loc16_13, %.loc16_20.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc16_20.4: = specific_function %.loc16_20.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %.loc16_20.4(%.loc16_13) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_20.5: init %i32 = converted %.loc16_13, %int.convert_checked.loc16_20.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_20.3: = bound_method %.loc16_13, %.loc16_20.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc16_20.4: = specific_function %.loc16_20.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %.loc16_20.4(%.loc16_13) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_20.5: init %i32 = converted %.loc16_13, %int.convert_checked.loc16_20.1 [template = constants.%.34] // CHECK:STDOUT: %.loc16_20.6: ref %.3 = temporary_storage // CHECK:STDOUT: %.loc16_20.7: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc16_20.8: ref %i32 = array_index %.loc16_20.6, %.loc16_20.7 -// CHECK:STDOUT: %.loc16_20.9: init %i32 = initialize_from %.loc16_20.5 to %.loc16_20.8 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_20.10: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_20.11: = bound_method %.loc16_16, %.loc16_20.10 [template = constants.%.31] -// CHECK:STDOUT: %.loc16_20.12: = specific_function %.loc16_20.11, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %.loc16_20.12(%.loc16_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc16_20.13: init %i32 = converted %.loc16_16, %int.convert_checked.loc16_20.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc16_20.9: init %i32 = initialize_from %.loc16_20.5 to %.loc16_20.8 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_20.10: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_20.11: = bound_method %.loc16_16, %.loc16_20.10 [template = constants.%.35] +// CHECK:STDOUT: %.loc16_20.12: = specific_function %.loc16_20.11, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %.loc16_20.12(%.loc16_16) [template = constants.%.37] +// CHECK:STDOUT: %.loc16_20.13: init %i32 = converted %.loc16_16, %int.convert_checked.loc16_20.2 [template = constants.%.37] // CHECK:STDOUT: %.loc16_20.14: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc16_20.15: ref %i32 = array_index %.loc16_20.6, %.loc16_20.14 -// CHECK:STDOUT: %.loc16_20.16: init %i32 = initialize_from %.loc16_20.13 to %.loc16_20.15 [template = constants.%.33] -// CHECK:STDOUT: %.loc16_20.17: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_20.18: = bound_method %.loc16_19, %.loc16_20.17 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_20.19: = specific_function %.loc16_20.18, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %.loc16_20.19(%.loc16_19) [template = constants.%.36] -// CHECK:STDOUT: %.loc16_20.20: init %i32 = converted %.loc16_19, %int.convert_checked.loc16_20.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc16_20.16: init %i32 = initialize_from %.loc16_20.13 to %.loc16_20.15 [template = constants.%.37] +// CHECK:STDOUT: %.loc16_20.17: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_20.18: = bound_method %.loc16_19, %.loc16_20.17 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_20.19: = specific_function %.loc16_20.18, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %.loc16_20.19(%.loc16_19) [template = constants.%.40] +// CHECK:STDOUT: %.loc16_20.20: init %i32 = converted %.loc16_19, %int.convert_checked.loc16_20.3 [template = constants.%.40] // CHECK:STDOUT: %.loc16_20.21: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc16_20.22: ref %i32 = array_index %.loc16_20.6, %.loc16_20.21 -// CHECK:STDOUT: %.loc16_20.23: init %i32 = initialize_from %.loc16_20.20 to %.loc16_20.22 [template = constants.%.36] +// CHECK:STDOUT: %.loc16_20.23: init %i32 = initialize_from %.loc16_20.20 to %.loc16_20.22 [template = constants.%.40] // CHECK:STDOUT: %.loc16_20.24: init %.3 = array_init (%.loc16_20.9, %.loc16_20.16, %.loc16_20.23) to %.loc16_20.6 [template = constants.%array] // CHECK:STDOUT: %.loc16_20.25: init %.3 = converted %.loc16_20.1, %.loc16_20.24 [template = constants.%array] // CHECK:STDOUT: %.loc16_20.26: ref %.3 = temporary %.loc16_20.6, %.loc16_20.25 // CHECK:STDOUT: %.loc16_20.27: %.3 = bind_value %.loc16_20.26 -// CHECK:STDOUT: %.loc16_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_23.3: = bound_method %.loc16_23.1, %.loc16_23.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc16_23.4: = specific_function %.loc16_23.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %.loc16_23.4(%.loc16_23.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_23.5: %i32 = value_of_initializer %int.convert_checked.loc16_23 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_23.6: %i32 = converted %.loc16_23.1, %.loc16_23.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc16_23.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_23.3: = bound_method %.loc16_23.1, %.loc16_23.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc16_23.4: = specific_function %.loc16_23.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %.loc16_23.4(%.loc16_23.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_23.5: %i32 = value_of_initializer %int.convert_checked.loc16_23 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_23.6: %i32 = converted %.loc16_23.1, %.loc16_23.5 [template = constants.%.34] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc16_20.27, %.loc16_23.6) // CHECK:STDOUT: %.loc16_25.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc16_25.2: %i32 = converted %F.call, %.loc16_25.1 diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 2adfef3a8284..c893c2779e2b 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -27,19 +27,19 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.30, %.33, %.36) [template] -// CHECK:STDOUT: %.37: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.37 = struct_value (%.6) [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] +// CHECK:STDOUT: %.41: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %.41 = struct_value (%.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,45 +80,45 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_20, %.loc11_27.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_20) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_20, %.loc11_27.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_20) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_27.1 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.6: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc11_27.7: ref %i32 = array_index file.%a.var, %.loc11_27.6 -// CHECK:STDOUT: %.loc11_27.8: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.10: = bound_method %.loc11_23, %.loc11_27.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_27.11: = specific_function %.loc11_27.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.11(%.loc11_23) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_27.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_27.8: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.10: = bound_method %.loc11_23, %.loc11_27.9 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_27.11: = specific_function %.loc11_27.10, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.11(%.loc11_23) [template = constants.%.37] +// CHECK:STDOUT: %.loc11_27.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_27.2 [template = constants.%.37] // CHECK:STDOUT: %.loc11_27.13: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_27.14: ref %i32 = array_index file.%a.var, %.loc11_27.13 -// CHECK:STDOUT: %.loc11_27.15: init %i32 = initialize_from %.loc11_27.12 to %.loc11_27.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_27.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.17: = bound_method %.loc11_26, %.loc11_27.16 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_27.18: = specific_function %.loc11_27.17, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %.loc11_27.18(%.loc11_26) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_27.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_27.15: init %i32 = initialize_from %.loc11_27.12 to %.loc11_27.14 [template = constants.%.37] +// CHECK:STDOUT: %.loc11_27.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.17: = bound_method %.loc11_26, %.loc11_27.16 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_27.18: = specific_function %.loc11_27.17, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %.loc11_27.18(%.loc11_26) [template = constants.%.40] +// CHECK:STDOUT: %.loc11_27.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.3 [template = constants.%.40] // CHECK:STDOUT: %.loc11_27.20: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_27.21: ref %i32 = array_index file.%a.var, %.loc11_27.20 -// CHECK:STDOUT: %.loc11_27.22: init %i32 = initialize_from %.loc11_27.19 to %.loc11_27.21 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_27.22: init %i32 = initialize_from %.loc11_27.19 to %.loc11_27.21 [template = constants.%.40] // CHECK:STDOUT: %.loc11_27.23: init %.3 = array_init (%.loc11_27.8, %.loc11_27.15, %.loc11_27.22) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_28: init %.3 = converted %.loc11_27.1, %.loc11_27.23 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc12_26: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_27.1: %.37 = struct_literal (%.loc12_26) -// CHECK:STDOUT: %struct: %.37 = struct_value (%.loc12_26) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_27.2: %.37 = converted %.loc12_27.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.1: %.41 = struct_literal (%.loc12_26) +// CHECK:STDOUT: %struct: %.41 = struct_value (%.loc12_26) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_27.2: %.41 = converted %.loc12_27.1, %struct [template = constants.%struct] // CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_28.3: = bound_method %.loc12_28.1, %.loc12_28.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.4: = specific_function %.loc12_28.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_28.4(%.loc12_28.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_28.5: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_28.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_28.3: = bound_method %.loc12_28.1, %.loc12_28.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_28.4: = specific_function %.loc12_28.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_28.4(%.loc12_28.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_28.5: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.37] // CHECK:STDOUT: %.loc12_34.1: ref %i32 = array_index %a.ref, %.loc12_28.6 // CHECK:STDOUT: %.loc12_34.2: %i32 = bind_value %.loc12_34.1 // CHECK:STDOUT: assign file.%b.var, %.loc12_34.2 diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 8dc8d29e568d..1ec23cbb59cb 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -32,35 +32,35 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.37: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.40: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.43: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.46: = bound_method %.9, %Convert.14 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.49: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.51: %i32 = int_value 6 [template] -// CHECK:STDOUT: %.52: = bound_method %.11, %Convert.14 [template] -// CHECK:STDOUT: %.53: = specific_function %.52, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.54: %i32 = int_value 7 [template] -// CHECK:STDOUT: %.55: = bound_method %.12, %Convert.14 [template] -// CHECK:STDOUT: %.56: = specific_function %.55, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.57: %i32 = int_value 8 [template] -// CHECK:STDOUT: %.58: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.59: = specific_function %.58, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.60: %i32 = int_value 9 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.36, %.39, %.42, %.45, %.48, %.51, %.54, %.57, %.60) [template] +// CHECK:STDOUT: %.37: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.38: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.41: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.44: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.46: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.47: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.49: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.50: = bound_method %.9, %Convert.14 [template] +// CHECK:STDOUT: %.51: = specific_function %.50, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.52: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.53: = bound_method %.10, %Convert.14 [template] +// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.55: %i32 = int_value 6 [template] +// CHECK:STDOUT: %.56: = bound_method %.11, %Convert.14 [template] +// CHECK:STDOUT: %.57: = specific_function %.56, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.58: %i32 = int_value 7 [template] +// CHECK:STDOUT: %.59: = bound_method %.12, %Convert.14 [template] +// CHECK:STDOUT: %.60: = specific_function %.59, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.61: %i32 = int_value 8 [template] +// CHECK:STDOUT: %.62: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.63: = specific_function %.62, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.64: %i32 = int_value 9 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.40, %.43, %.46, %.49, %.52, %.55, %.58, %.61, %.64) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -100,78 +100,78 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %.loc11_41: Core.IntLiteral = int_value 8 [template = constants.%.12] // CHECK:STDOUT: %.loc11_44: Core.IntLiteral = int_value 9 [template = constants.%.2] // CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_23, %.loc11_26, %.loc11_29, %.loc11_32, %.loc11_35, %.loc11_38, %.loc11_41, %.loc11_44) -// CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_20, %.loc11_45.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %.loc11_45.4(%.loc11_20) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_45.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_45.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_20, %.loc11_45.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %.loc11_45.4(%.loc11_20) [template = constants.%.40] +// CHECK:STDOUT: %.loc11_45.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_45.1 [template = constants.%.40] // CHECK:STDOUT: %.loc11_45.6: Core.IntLiteral = int_value 0 [template = constants.%.13] // CHECK:STDOUT: %.loc11_45.7: ref %i32 = array_index file.%a.var, %.loc11_45.6 -// CHECK:STDOUT: %.loc11_45.8: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.7 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.10: = bound_method %.loc11_23, %.loc11_45.9 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_45.11: = specific_function %.loc11_45.10, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %.loc11_45.11(%.loc11_23) [template = constants.%.39] -// CHECK:STDOUT: %.loc11_45.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_45.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc11_45.8: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.7 [template = constants.%.40] +// CHECK:STDOUT: %.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.10: = bound_method %.loc11_23, %.loc11_45.9 [template = constants.%.41] +// CHECK:STDOUT: %.loc11_45.11: = specific_function %.loc11_45.10, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %.loc11_45.11(%.loc11_23) [template = constants.%.43] +// CHECK:STDOUT: %.loc11_45.12: init %i32 = converted %.loc11_23, %int.convert_checked.loc11_45.2 [template = constants.%.43] // CHECK:STDOUT: %.loc11_45.13: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc11_45.14: ref %i32 = array_index file.%a.var, %.loc11_45.13 -// CHECK:STDOUT: %.loc11_45.15: init %i32 = initialize_from %.loc11_45.12 to %.loc11_45.14 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_45.16: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.17: = bound_method %.loc11_26, %.loc11_45.16 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_45.18: = specific_function %.loc11_45.17, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %.loc11_45.18(%.loc11_26) [template = constants.%.42] -// CHECK:STDOUT: %.loc11_45.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_45.3 [template = constants.%.42] +// CHECK:STDOUT: %.loc11_45.15: init %i32 = initialize_from %.loc11_45.12 to %.loc11_45.14 [template = constants.%.43] +// CHECK:STDOUT: %.loc11_45.16: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.17: = bound_method %.loc11_26, %.loc11_45.16 [template = constants.%.44] +// CHECK:STDOUT: %.loc11_45.18: = specific_function %.loc11_45.17, @Convert.2(constants.%.1) [template = constants.%.45] +// CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %.loc11_45.18(%.loc11_26) [template = constants.%.46] +// CHECK:STDOUT: %.loc11_45.19: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_45.3 [template = constants.%.46] // CHECK:STDOUT: %.loc11_45.20: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc11_45.21: ref %i32 = array_index file.%a.var, %.loc11_45.20 -// CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.19 to %.loc11_45.21 [template = constants.%.42] -// CHECK:STDOUT: %.loc11_45.23: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.24: = bound_method %.loc11_29, %.loc11_45.23 [template = constants.%.43] -// CHECK:STDOUT: %.loc11_45.25: = specific_function %.loc11_45.24, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %.loc11_45.25(%.loc11_29) [template = constants.%.45] -// CHECK:STDOUT: %.loc11_45.26: init %i32 = converted %.loc11_29, %int.convert_checked.loc11_45.4 [template = constants.%.45] +// CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.19 to %.loc11_45.21 [template = constants.%.46] +// CHECK:STDOUT: %.loc11_45.23: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.24: = bound_method %.loc11_29, %.loc11_45.23 [template = constants.%.47] +// CHECK:STDOUT: %.loc11_45.25: = specific_function %.loc11_45.24, @Convert.2(constants.%.1) [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %.loc11_45.25(%.loc11_29) [template = constants.%.49] +// CHECK:STDOUT: %.loc11_45.26: init %i32 = converted %.loc11_29, %int.convert_checked.loc11_45.4 [template = constants.%.49] // CHECK:STDOUT: %.loc11_45.27: Core.IntLiteral = int_value 3 [template = constants.%.7] // CHECK:STDOUT: %.loc11_45.28: ref %i32 = array_index file.%a.var, %.loc11_45.27 -// CHECK:STDOUT: %.loc11_45.29: init %i32 = initialize_from %.loc11_45.26 to %.loc11_45.28 [template = constants.%.45] -// CHECK:STDOUT: %.loc11_45.30: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.31: = bound_method %.loc11_32, %.loc11_45.30 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.32: = specific_function %.loc11_45.31, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %.loc11_45.32(%.loc11_32) [template = constants.%.48] -// CHECK:STDOUT: %.loc11_45.33: init %i32 = converted %.loc11_32, %int.convert_checked.loc11_45.5 [template = constants.%.48] +// CHECK:STDOUT: %.loc11_45.29: init %i32 = initialize_from %.loc11_45.26 to %.loc11_45.28 [template = constants.%.49] +// CHECK:STDOUT: %.loc11_45.30: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.31: = bound_method %.loc11_32, %.loc11_45.30 [template = constants.%.50] +// CHECK:STDOUT: %.loc11_45.32: = specific_function %.loc11_45.31, @Convert.2(constants.%.1) [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %.loc11_45.32(%.loc11_32) [template = constants.%.52] +// CHECK:STDOUT: %.loc11_45.33: init %i32 = converted %.loc11_32, %int.convert_checked.loc11_45.5 [template = constants.%.52] // CHECK:STDOUT: %.loc11_45.34: Core.IntLiteral = int_value 4 [template = constants.%.8] // CHECK:STDOUT: %.loc11_45.35: ref %i32 = array_index file.%a.var, %.loc11_45.34 -// CHECK:STDOUT: %.loc11_45.36: init %i32 = initialize_from %.loc11_45.33 to %.loc11_45.35 [template = constants.%.48] -// CHECK:STDOUT: %.loc11_45.37: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.38: = bound_method %.loc11_35, %.loc11_45.37 [template = constants.%.49] -// CHECK:STDOUT: %.loc11_45.39: = specific_function %.loc11_45.38, @Convert.2(constants.%.1) [template = constants.%.50] -// CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %.loc11_45.39(%.loc11_35) [template = constants.%.51] -// CHECK:STDOUT: %.loc11_45.40: init %i32 = converted %.loc11_35, %int.convert_checked.loc11_45.6 [template = constants.%.51] +// CHECK:STDOUT: %.loc11_45.36: init %i32 = initialize_from %.loc11_45.33 to %.loc11_45.35 [template = constants.%.52] +// CHECK:STDOUT: %.loc11_45.37: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.38: = bound_method %.loc11_35, %.loc11_45.37 [template = constants.%.53] +// CHECK:STDOUT: %.loc11_45.39: = specific_function %.loc11_45.38, @Convert.2(constants.%.1) [template = constants.%.54] +// CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %.loc11_45.39(%.loc11_35) [template = constants.%.55] +// CHECK:STDOUT: %.loc11_45.40: init %i32 = converted %.loc11_35, %int.convert_checked.loc11_45.6 [template = constants.%.55] // CHECK:STDOUT: %.loc11_45.41: Core.IntLiteral = int_value 5 [template = constants.%.9] // CHECK:STDOUT: %.loc11_45.42: ref %i32 = array_index file.%a.var, %.loc11_45.41 -// CHECK:STDOUT: %.loc11_45.43: init %i32 = initialize_from %.loc11_45.40 to %.loc11_45.42 [template = constants.%.51] -// CHECK:STDOUT: %.loc11_45.44: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.45: = bound_method %.loc11_38, %.loc11_45.44 [template = constants.%.52] -// CHECK:STDOUT: %.loc11_45.46: = specific_function %.loc11_45.45, @Convert.2(constants.%.1) [template = constants.%.53] -// CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %.loc11_45.46(%.loc11_38) [template = constants.%.54] -// CHECK:STDOUT: %.loc11_45.47: init %i32 = converted %.loc11_38, %int.convert_checked.loc11_45.7 [template = constants.%.54] +// CHECK:STDOUT: %.loc11_45.43: init %i32 = initialize_from %.loc11_45.40 to %.loc11_45.42 [template = constants.%.55] +// CHECK:STDOUT: %.loc11_45.44: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.45: = bound_method %.loc11_38, %.loc11_45.44 [template = constants.%.56] +// CHECK:STDOUT: %.loc11_45.46: = specific_function %.loc11_45.45, @Convert.2(constants.%.1) [template = constants.%.57] +// CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %.loc11_45.46(%.loc11_38) [template = constants.%.58] +// CHECK:STDOUT: %.loc11_45.47: init %i32 = converted %.loc11_38, %int.convert_checked.loc11_45.7 [template = constants.%.58] // CHECK:STDOUT: %.loc11_45.48: Core.IntLiteral = int_value 6 [template = constants.%.10] // CHECK:STDOUT: %.loc11_45.49: ref %i32 = array_index file.%a.var, %.loc11_45.48 -// CHECK:STDOUT: %.loc11_45.50: init %i32 = initialize_from %.loc11_45.47 to %.loc11_45.49 [template = constants.%.54] -// CHECK:STDOUT: %.loc11_45.51: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.52: = bound_method %.loc11_41, %.loc11_45.51 [template = constants.%.55] -// CHECK:STDOUT: %.loc11_45.53: = specific_function %.loc11_45.52, @Convert.2(constants.%.1) [template = constants.%.56] -// CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %.loc11_45.53(%.loc11_41) [template = constants.%.57] -// CHECK:STDOUT: %.loc11_45.54: init %i32 = converted %.loc11_41, %int.convert_checked.loc11_45.8 [template = constants.%.57] +// CHECK:STDOUT: %.loc11_45.50: init %i32 = initialize_from %.loc11_45.47 to %.loc11_45.49 [template = constants.%.58] +// CHECK:STDOUT: %.loc11_45.51: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.52: = bound_method %.loc11_41, %.loc11_45.51 [template = constants.%.59] +// CHECK:STDOUT: %.loc11_45.53: = specific_function %.loc11_45.52, @Convert.2(constants.%.1) [template = constants.%.60] +// CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %.loc11_45.53(%.loc11_41) [template = constants.%.61] +// CHECK:STDOUT: %.loc11_45.54: init %i32 = converted %.loc11_41, %int.convert_checked.loc11_45.8 [template = constants.%.61] // CHECK:STDOUT: %.loc11_45.55: Core.IntLiteral = int_value 7 [template = constants.%.11] // CHECK:STDOUT: %.loc11_45.56: ref %i32 = array_index file.%a.var, %.loc11_45.55 -// CHECK:STDOUT: %.loc11_45.57: init %i32 = initialize_from %.loc11_45.54 to %.loc11_45.56 [template = constants.%.57] -// CHECK:STDOUT: %.loc11_45.58: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.59: = bound_method %.loc11_44, %.loc11_45.58 [template = constants.%.58] -// CHECK:STDOUT: %.loc11_45.60: = specific_function %.loc11_45.59, @Convert.2(constants.%.1) [template = constants.%.59] -// CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %.loc11_45.60(%.loc11_44) [template = constants.%.60] -// CHECK:STDOUT: %.loc11_45.61: init %i32 = converted %.loc11_44, %int.convert_checked.loc11_45.9 [template = constants.%.60] +// CHECK:STDOUT: %.loc11_45.57: init %i32 = initialize_from %.loc11_45.54 to %.loc11_45.56 [template = constants.%.61] +// CHECK:STDOUT: %.loc11_45.58: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.59: = bound_method %.loc11_44, %.loc11_45.58 [template = constants.%.62] +// CHECK:STDOUT: %.loc11_45.60: = specific_function %.loc11_45.59, @Convert.2(constants.%.1) [template = constants.%.63] +// CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %.loc11_45.60(%.loc11_44) [template = constants.%.64] +// CHECK:STDOUT: %.loc11_45.61: init %i32 = converted %.loc11_44, %int.convert_checked.loc11_45.9 [template = constants.%.64] // CHECK:STDOUT: %.loc11_45.62: Core.IntLiteral = int_value 8 [template = constants.%.12] // CHECK:STDOUT: %.loc11_45.63: ref %i32 = array_index file.%a.var, %.loc11_45.62 -// CHECK:STDOUT: %.loc11_45.64: init %i32 = initialize_from %.loc11_45.61 to %.loc11_45.63 [template = constants.%.60] +// CHECK:STDOUT: %.loc11_45.64: init %i32 = initialize_from %.loc11_45.61 to %.loc11_45.63 [template = constants.%.64] // CHECK:STDOUT: %.loc11_45.65: init %.3 = array_init (%.loc11_45.8, %.loc11_45.15, %.loc11_45.22, %.loc11_45.29, %.loc11_45.36, %.loc11_45.43, %.loc11_45.50, %.loc11_45.57, %.loc11_45.64) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_46: init %.3 = converted %.loc11_45.1, %.loc11_45.65 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_46 diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 7fc8b4caacbd..fba873b6d2e1 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -124,17 +124,17 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %A = struct_value (%.31, %.34) [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %A = struct_value (%.35, %.38) [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.35: = complete_type_witness %A [template] -// CHECK:STDOUT: %.36: type = ptr_type %B [template] +// CHECK:STDOUT: %.39: = complete_type_witness %A [template] +// CHECK:STDOUT: %.40: type = ptr_type %B [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -166,7 +166,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %A.ref.loc18: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc21: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %B.ref.loc22: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %.loc22: type = ptr_type %B [template = constants.%.36] +// CHECK:STDOUT: %.loc22: type = ptr_type %B [template = constants.%.40] // CHECK:STDOUT: %B.ref.loc24: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %b_factory.var: ref %B = var b_factory // CHECK:STDOUT: %b_factory: ref %B = bind_name b_factory, %b_factory.var @@ -203,7 +203,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: adapt_decl %A -// CHECK:STDOUT: %.loc15: = complete_type_witness %A [template = constants.%.35] +// CHECK:STDOUT: %.loc15: = complete_type_witness %A [template = constants.%.39] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -214,20 +214,20 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 1 [template = constants.%.6] // CHECK:STDOUT: %.loc9_26: Core.IntLiteral = int_value 2 [template = constants.%.7] // CHECK:STDOUT: %.loc9_27.1: %.8 = struct_literal (%.loc9_18, %.loc9_26) -// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_18, %.loc9_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_27.1: init %i32 = call %.loc9_27.4(%.loc9_18) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_27.5: init %i32 = converted %.loc9_18, %int.convert_checked.loc9_27.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_18, %.loc9_27.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc9_27.1: init %i32 = call %.loc9_27.4(%.loc9_18) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_27.5: init %i32 = converted %.loc9_18, %int.convert_checked.loc9_27.1 [template = constants.%.35] // CHECK:STDOUT: %.loc9_27.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_27.7: init %i32 = initialize_from %.loc9_27.5 to %.loc9_27.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.9: = bound_method %.loc9_26, %.loc9_27.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_27.10: = specific_function %.loc9_27.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_27.2: init %i32 = call %.loc9_27.10(%.loc9_26) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_27.11: init %i32 = converted %.loc9_26, %int.convert_checked.loc9_27.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_27.7: init %i32 = initialize_from %.loc9_27.5 to %.loc9_27.6 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_27.8: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_27.9: = bound_method %.loc9_26, %.loc9_27.8 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_27.10: = specific_function %.loc9_27.9, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc9_27.2: init %i32 = call %.loc9_27.10(%.loc9_26) [template = constants.%.38] +// CHECK:STDOUT: %.loc9_27.11: init %i32 = converted %.loc9_26, %int.convert_checked.loc9_27.2 [template = constants.%.38] // CHECK:STDOUT: %.loc9_27.12: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc9_27.13: init %i32 = initialize_from %.loc9_27.11 to %.loc9_27.12 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_27.13: init %i32 = initialize_from %.loc9_27.11 to %.loc9_27.12 [template = constants.%.38] // CHECK:STDOUT: %.loc9_27.14: init %A = class_init (%.loc9_27.7, %.loc9_27.13), %return [template = constants.%struct] // CHECK:STDOUT: %.loc9_28: init %A = converted %.loc9_27.1, %.loc9_27.14 [template = constants.%struct] // CHECK:STDOUT: return %.loc9_28 to %return @@ -238,20 +238,20 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc17_22: Core.IntLiteral = int_value 1 [template = constants.%.6] // CHECK:STDOUT: %.loc17_30: Core.IntLiteral = int_value 2 [template = constants.%.7] // CHECK:STDOUT: %.loc17_31.1: %.8 = struct_literal (%.loc17_22, %.loc17_30) -// CHECK:STDOUT: %.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_31.3: = bound_method %.loc17_22, %.loc17_31.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_31.4: = specific_function %.loc17_31.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc17_31.1: init %i32 = call %.loc17_31.4(%.loc17_22) [template = constants.%.31] -// CHECK:STDOUT: %.loc17_31.5: init %i32 = converted %.loc17_22, %int.convert_checked.loc17_31.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_31.3: = bound_method %.loc17_22, %.loc17_31.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_31.4: = specific_function %.loc17_31.3, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc17_31.1: init %i32 = call %.loc17_31.4(%.loc17_22) [template = constants.%.35] +// CHECK:STDOUT: %.loc17_31.5: init %i32 = converted %.loc17_22, %int.convert_checked.loc17_31.1 [template = constants.%.35] // CHECK:STDOUT: %.loc17_31.6: ref %i32 = class_element_access file.%a_ref.var, element0 -// CHECK:STDOUT: %.loc17_31.7: init %i32 = initialize_from %.loc17_31.5 to %.loc17_31.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_31.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_31.9: = bound_method %.loc17_30, %.loc17_31.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc17_31.10: = specific_function %.loc17_31.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc17_31.2: init %i32 = call %.loc17_31.10(%.loc17_30) [template = constants.%.34] -// CHECK:STDOUT: %.loc17_31.11: init %i32 = converted %.loc17_30, %int.convert_checked.loc17_31.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_31.7: init %i32 = initialize_from %.loc17_31.5 to %.loc17_31.6 [template = constants.%.35] +// CHECK:STDOUT: %.loc17_31.8: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_31.9: = bound_method %.loc17_30, %.loc17_31.8 [template = constants.%.36] +// CHECK:STDOUT: %.loc17_31.10: = specific_function %.loc17_31.9, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc17_31.2: init %i32 = call %.loc17_31.10(%.loc17_30) [template = constants.%.38] +// CHECK:STDOUT: %.loc17_31.11: init %i32 = converted %.loc17_30, %int.convert_checked.loc17_31.2 [template = constants.%.38] // CHECK:STDOUT: %.loc17_31.12: ref %i32 = class_element_access file.%a_ref.var, element1 -// CHECK:STDOUT: %.loc17_31.13: init %i32 = initialize_from %.loc17_31.11 to %.loc17_31.12 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_31.13: init %i32 = initialize_from %.loc17_31.11 to %.loc17_31.12 [template = constants.%.38] // CHECK:STDOUT: %.loc17_31.14: init %A = class_init (%.loc17_31.7, %.loc17_31.13), file.%a_ref.var [template = constants.%struct] // CHECK:STDOUT: %.loc17_32: init %A = converted %.loc17_31.1, %.loc17_31.14 [template = constants.%struct] // CHECK:STDOUT: assign file.%a_ref.var, %.loc17_32 @@ -267,8 +267,8 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %B.ref.loc22: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc22_25.1: ref %B = as_compatible %a_ref.ref.loc22 // CHECK:STDOUT: %.loc22_25.2: ref %B = converted %a_ref.ref.loc22, %.loc22_25.1 -// CHECK:STDOUT: %.loc22_17: %.36 = addr_of %.loc22_25.2 -// CHECK:STDOUT: %b_ptr: %.36 = bind_name b_ptr, %.loc22_17 +// CHECK:STDOUT: %.loc22_17: %.40 = addr_of %.loc22_25.2 +// CHECK:STDOUT: %b_ptr: %.40 = bind_name b_ptr, %.loc22_17 // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, @A.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_5: ref %B = splice_block file.%b_factory.var {} @@ -293,10 +293,10 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.7(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -343,15 +343,15 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_18.1) [template = constants.%i32] // CHECK:STDOUT: %.loc8_18.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] // CHECK:STDOUT: %.loc8_18.3: type = converted %int.make_type_signed.loc8, %.loc8_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_15.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_15.2: = bound_method %.loc8_13, %.loc8_15.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc8_15.3: = specific_function %.loc8_15.2, @Convert.7(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_15.3(%.loc8_13) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_15.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.26] -// CHECK:STDOUT: %.loc8_15.5: %i32 = converted %.loc8_13, %.loc8_15.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc8_15.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_15.2: = bound_method %.loc8_13, %.loc8_15.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc8_15.3: = specific_function %.loc8_15.2, @Convert.7(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_15.3(%.loc8_13) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_15.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] +// CHECK:STDOUT: %.loc8_15.5: %i32 = converted %.loc8_13, %.loc8_15.4 [template = constants.%.30] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc8_23.1: %A = as_compatible %.loc8_15.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_23.2: %A = converted %.loc8_15.5, %.loc8_23.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc8_23.1: %A = as_compatible %.loc8_15.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_23.2: %A = converted %.loc8_15.5, %.loc8_23.1 [template = constants.%.30] // CHECK:STDOUT: %a: %A = bind_name a, %.loc8_23.2 // CHECK:STDOUT: %a.ref: %A = name_ref a, %a // CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -464,14 +464,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %A = struct_value (%.32, %.35) [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %A = struct_value (%.36, %.39) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -534,21 +534,21 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc13_33: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc13_34.1: %.9 = struct_literal (%.loc13_25, %.loc13_33) // CHECK:STDOUT: %A.ref.loc13: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_25, %.loc13_34.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc13_34.1: init %i32 = call %.loc13_34.4(%.loc13_25) [template = constants.%.32] -// CHECK:STDOUT: %.loc13_34.5: init %i32 = converted %.loc13_25, %int.convert_checked.loc13_34.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_25, %.loc13_34.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc13_34.1: init %i32 = call %.loc13_34.4(%.loc13_25) [template = constants.%.36] +// CHECK:STDOUT: %.loc13_34.5: init %i32 = converted %.loc13_25, %int.convert_checked.loc13_34.1 [template = constants.%.36] // CHECK:STDOUT: %.loc13_34.6: ref %A = temporary_storage // CHECK:STDOUT: %.loc13_34.7: ref %i32 = class_element_access %.loc13_34.6, element0 -// CHECK:STDOUT: %.loc13_34.8: init %i32 = initialize_from %.loc13_34.5 to %.loc13_34.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_34.9: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.10: = bound_method %.loc13_33, %.loc13_34.9 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_34.11: = specific_function %.loc13_34.10, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_34.2: init %i32 = call %.loc13_34.11(%.loc13_33) [template = constants.%.35] -// CHECK:STDOUT: %.loc13_34.12: init %i32 = converted %.loc13_33, %int.convert_checked.loc13_34.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_34.8: init %i32 = initialize_from %.loc13_34.5 to %.loc13_34.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_34.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_34.10: = bound_method %.loc13_33, %.loc13_34.9 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_34.11: = specific_function %.loc13_34.10, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc13_34.2: init %i32 = call %.loc13_34.11(%.loc13_33) [template = constants.%.39] +// CHECK:STDOUT: %.loc13_34.12: init %i32 = converted %.loc13_33, %int.convert_checked.loc13_34.2 [template = constants.%.39] // CHECK:STDOUT: %.loc13_34.13: ref %i32 = class_element_access %.loc13_34.6, element1 -// CHECK:STDOUT: %.loc13_34.14: init %i32 = initialize_from %.loc13_34.12 to %.loc13_34.13 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_34.14: init %i32 = initialize_from %.loc13_34.12 to %.loc13_34.13 [template = constants.%.39] // CHECK:STDOUT: %.loc13_34.15: init %A = class_init (%.loc13_34.8, %.loc13_34.14), %.loc13_34.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_34.16: ref %A = temporary %.loc13_34.6, %.loc13_34.15 // CHECK:STDOUT: %.loc13_36: ref %A = converted %.loc13_34.1, %.loc13_34.16 @@ -561,21 +561,21 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc24_32: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc24_33.1: %.9 = struct_literal (%.loc24_24, %.loc24_32) // CHECK:STDOUT: %A.ref.loc24: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_33.3: = bound_method %.loc24_24, %.loc24_33.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc24_33.4: = specific_function %.loc24_33.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc24_33.1: init %i32 = call %.loc24_33.4(%.loc24_24) [template = constants.%.32] -// CHECK:STDOUT: %.loc24_33.5: init %i32 = converted %.loc24_24, %int.convert_checked.loc24_33.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_33.3: = bound_method %.loc24_24, %.loc24_33.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc24_33.4: = specific_function %.loc24_33.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc24_33.1: init %i32 = call %.loc24_33.4(%.loc24_24) [template = constants.%.36] +// CHECK:STDOUT: %.loc24_33.5: init %i32 = converted %.loc24_24, %int.convert_checked.loc24_33.1 [template = constants.%.36] // CHECK:STDOUT: %.loc24_33.6: ref %A = temporary_storage // CHECK:STDOUT: %.loc24_33.7: ref %i32 = class_element_access %.loc24_33.6, element0 -// CHECK:STDOUT: %.loc24_33.8: init %i32 = initialize_from %.loc24_33.5 to %.loc24_33.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc24_33.9: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_33.10: = bound_method %.loc24_32, %.loc24_33.9 [template = constants.%.33] -// CHECK:STDOUT: %.loc24_33.11: = specific_function %.loc24_33.10, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc24_33.2: init %i32 = call %.loc24_33.11(%.loc24_32) [template = constants.%.35] -// CHECK:STDOUT: %.loc24_33.12: init %i32 = converted %.loc24_32, %int.convert_checked.loc24_33.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc24_33.8: init %i32 = initialize_from %.loc24_33.5 to %.loc24_33.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc24_33.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_33.10: = bound_method %.loc24_32, %.loc24_33.9 [template = constants.%.37] +// CHECK:STDOUT: %.loc24_33.11: = specific_function %.loc24_33.10, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc24_33.2: init %i32 = call %.loc24_33.11(%.loc24_32) [template = constants.%.39] +// CHECK:STDOUT: %.loc24_33.12: init %i32 = converted %.loc24_32, %int.convert_checked.loc24_33.2 [template = constants.%.39] // CHECK:STDOUT: %.loc24_33.13: ref %i32 = class_element_access %.loc24_33.6, element1 -// CHECK:STDOUT: %.loc24_33.14: init %i32 = initialize_from %.loc24_33.12 to %.loc24_33.13 [template = constants.%.35] +// CHECK:STDOUT: %.loc24_33.14: init %i32 = initialize_from %.loc24_33.12 to %.loc24_33.13 [template = constants.%.39] // CHECK:STDOUT: %.loc24_33.15: init %A = class_init (%.loc24_33.8, %.loc24_33.14), %.loc24_33.6 [template = constants.%struct] // CHECK:STDOUT: %.loc24_33.16: ref %A = temporary %.loc24_33.6, %.loc24_33.15 // CHECK:STDOUT: %.loc24_35: ref %A = converted %.loc24_33.1, %.loc24_33.16 diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index cf5292aa6381..4a302e96c6fe 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -25,10 +25,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,12 +66,12 @@ fn Main() -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc12: init type = call constants.%Int(%.loc12_15.1) [template = constants.%i32] // CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_15.3: type = converted %int.make_type_signed.loc12, %.loc12_15.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc12_12.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_12.2: = bound_method %.loc12_10, %.loc12_12.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_12.3: = specific_function %.loc12_12.2, @Convert.7(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_12.3(%.loc12_10) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_12.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc12_12.5: %i32 = converted %.loc12_10, %.loc12_12.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_12.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_12.2: = bound_method %.loc12_10, %.loc12_12.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_12.3: = specific_function %.loc12_12.2, @Convert.7(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_12.3(%.loc12_10) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_12.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc12_12.5: %i32 = converted %.loc12_10, %.loc12_12.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc12_12.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 021424c88a87..a81667943740 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -39,20 +39,20 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @As(%X) [template] -// CHECK:STDOUT: %.9: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.12: = interface_witness (%Convert.2) [template] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%i32)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.14: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.18: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.9, @impl.7(%.1) [template] // CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %.31: = bound_method %.14, %Convert.17 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.9(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.2 [template] +// CHECK:STDOUT: %.36: = interface_witness (%Convert.17) [template] +// CHECK:STDOUT: %.37: = bound_method %.18, %Convert.17 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.9(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -116,7 +116,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc15_24: = interface_witness (%Convert.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -140,7 +140,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.13] +// CHECK:STDOUT: %.loc19_24: = interface_witness (%Convert.decl) [template = constants.%.17] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -182,20 +182,20 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_16: Core.IntLiteral = int_value 4 [template = constants.%.14] +// CHECK:STDOUT: %.loc23_16: Core.IntLiteral = int_value 4 [template = constants.%.18] // CHECK:STDOUT: %.loc23_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc23_21: init type = call constants.%Int(%.loc23_21.1) [template = constants.%i32] // CHECK:STDOUT: %.loc23_21.2: type = value_of_initializer %int.make_type_signed.loc23_21 [template = constants.%i32] // CHECK:STDOUT: %.loc23_21.3: type = converted %int.make_type_signed.loc23_21, %.loc23_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_18.1: %Convert.type.5 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.17] -// CHECK:STDOUT: %.loc23_18.2: = bound_method %.loc23_16, %.loc23_18.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc23_18.3: = specific_function %.loc23_18.2, @Convert.9(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc23_18.3(%.loc23_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc23_18.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] -// CHECK:STDOUT: %.loc23_18.5: %i32 = converted %.loc23_16, %.loc23_18.4 [template = constants.%.33] +// CHECK:STDOUT: %.loc23_18.1: %Convert.type.5 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %.loc23_18.2: = bound_method %.loc23_16, %.loc23_18.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc23_18.3: = specific_function %.loc23_18.2, @Convert.9(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc23_18.3(%.loc23_16) [template = constants.%.39] +// CHECK:STDOUT: %.loc23_18.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.39] +// CHECK:STDOUT: %.loc23_18.5: %i32 = converted %.loc23_16, %.loc23_18.4 [template = constants.%.39] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc23_26.1: %Convert.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc23_26.2: = bound_method %.loc23_18.5, %.loc23_26.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc23_26.1: %Convert.type.3 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc23_26.2: = bound_method %.loc23_18.5, %.loc23_26.1 [template = constants.%.40] // CHECK:STDOUT: %.loc23_26.3: ref %X = temporary_storage // CHECK:STDOUT: %Convert.call.loc23_26: init %X = call %.loc23_26.2(%.loc23_18.5) to %.loc23_26.3 // CHECK:STDOUT: %.loc23_26.4: init %X = converted %.loc23_18.5, %Convert.call.loc23_26 @@ -203,7 +203,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int.make_type_signed.loc23_35: init type = call constants.%Int(%.loc23_35.1) [template = constants.%i32] // CHECK:STDOUT: %.loc23_35.2: type = value_of_initializer %int.make_type_signed.loc23_35 [template = constants.%i32] // CHECK:STDOUT: %.loc23_35.3: type = converted %int.make_type_signed.loc23_35, %.loc23_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_32.1: %Convert.type.5 = interface_witness_access constants.%.13, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc23_32.1: %Convert.type.5 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.4] // CHECK:STDOUT: %.loc23_32.2: = bound_method %.loc23_26.4, %.loc23_32.1 // CHECK:STDOUT: %.loc23_26.5: ref %X = temporary %.loc23_26.3, %.loc23_26.4 // CHECK:STDOUT: %.loc23_26.6: %X = bind_value %.loc23_26.5 diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index e9eea2988c01..2fdfe56e9b26 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -24,15 +24,15 @@ var test_type: type = i32; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.27: f64 = float_literal 0.10000000000000001 [template] -// CHECK:STDOUT: %.29: String = string_literal "Test" [template] +// CHECK:STDOUT: %.31: f64 = float_literal 0.10000000000000001 [template] +// CHECK:STDOUT: %.33: String = string_literal "Test" [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,7 +60,7 @@ var test_type: type = i32; // CHECK:STDOUT: %.loc11_15.3: type = converted %int.make_type_signed, %.loc11_15.2 [template = constants.%i32] // CHECK:STDOUT: %test_i32.var: ref %i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref %i32 = bind_name test_i32, %test_i32.var -// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 64 [template = constants.%.26] +// CHECK:STDOUT: %.loc12_15.1: Core.IntLiteral = int_value 64 [template = constants.%.30] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_15.1) [template = f64] // CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_15.3: type = converted %float.make_type, %.loc12_15.2 [template = f64] @@ -73,15 +73,15 @@ var test_type: type = i32; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_21: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_22.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.2: = bound_method %.loc11_21, %.loc11_22.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_22.3: = specific_function %.loc11_22.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_22.3(%.loc11_21) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_22.4: init %i32 = converted %.loc11_21, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc11_22.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_22.2: = bound_method %.loc11_21, %.loc11_22.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_22.3: = specific_function %.loc11_22.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_22.3(%.loc11_21) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_22.4: init %i32 = converted %.loc11_21, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign file.%test_i32.var, %.loc11_22.4 -// CHECK:STDOUT: %.loc12: f64 = float_literal 0.10000000000000001 [template = constants.%.27] +// CHECK:STDOUT: %.loc12: f64 = float_literal 0.10000000000000001 [template = constants.%.31] // CHECK:STDOUT: assign file.%test_f64.var, %.loc12 -// CHECK:STDOUT: %.loc13: String = string_literal "Test" [template = constants.%.29] +// CHECK:STDOUT: %.loc13: String = string_literal "Test" [template = constants.%.33] // CHECK:STDOUT: %test_str: String = bind_name test_str, %.loc13 // CHECK:STDOUT: %.loc14: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14) [template = constants.%i32] diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 384e6905dec0..c21bdd09ad45 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -48,15 +48,15 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 39999999999999999993 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2147483648 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483648 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 39999999999999999993 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2147483648 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2147483648 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } @@ -93,11 +93,11 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int.make_type_signed.loc27: init type = call constants.%Int(%.loc27_8.1) [template = constants.%i32] // CHECK:STDOUT: %.loc27_8.2: type = value_of_initializer %int.make_type_signed.loc27 [template = constants.%i32] // CHECK:STDOUT: %.loc27_8.3: type = converted %int.make_type_signed.loc27, %.loc27_8.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_8.1: Core.IntLiteral = int_value 64 [template = constants.%.30] +// CHECK:STDOUT: %.loc33_8.1: Core.IntLiteral = int_value 64 [template = constants.%.34] // CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%.loc33_8.1) [template = f64] // CHECK:STDOUT: %.loc33_8.2: type = value_of_initializer %float.make_type.loc33 [template = f64] // CHECK:STDOUT: %.loc33_8.3: type = converted %float.make_type.loc33, %.loc33_8.2 [template = f64] -// CHECK:STDOUT: %.loc38_8.1: Core.IntLiteral = int_value 64 [template = constants.%.30] +// CHECK:STDOUT: %.loc38_8.1: Core.IntLiteral = int_value 64 [template = constants.%.34] // CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%Float(%.loc38_8.1) [template = f64] // CHECK:STDOUT: %.loc38_8.2: type = value_of_initializer %float.make_type.loc38 [template = f64] // CHECK:STDOUT: %.loc38_8.3: type = converted %float.make_type.loc38, %.loc38_8.2 [template = f64] @@ -106,28 +106,28 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_14: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_34.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_34.2: = bound_method %.loc15_14, %.loc15_34.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc15_34.3: = specific_function %.loc15_34.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_34.3(%.loc15_14) [template = constants.%.25] -// CHECK:STDOUT: %.loc15_34.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.25] -// CHECK:STDOUT: %.loc15_34.5: %i32 = converted %.loc15_14, %.loc15_34.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc15_34.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_34.2: = bound_method %.loc15_14, %.loc15_34.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc15_34.3: = specific_function %.loc15_34.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_34.3(%.loc15_14) [template = constants.%.29] +// CHECK:STDOUT: %.loc15_34.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_34.5: %i32 = converted %.loc15_14, %.loc15_34.4 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc15_34.5 -// CHECK:STDOUT: %.loc21_14: Core.IntLiteral = int_value 2147483648 [template = constants.%.26] -// CHECK:STDOUT: %.loc21_27.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_27.2: = bound_method %.loc21_14, %.loc21_27.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc21_27.3: = specific_function %.loc21_27.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_27.3(%.loc21_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc21_27.4: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_27.5: %i32 = converted %.loc21_14, %.loc21_27.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc21_14: Core.IntLiteral = int_value 2147483648 [template = constants.%.30] +// CHECK:STDOUT: %.loc21_27.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_27.2: = bound_method %.loc21_14, %.loc21_27.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc21_27.3: = specific_function %.loc21_27.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_27.3(%.loc21_14) [template = constants.%.33] +// CHECK:STDOUT: %.loc21_27.4: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%.33] +// CHECK:STDOUT: %.loc21_27.5: %i32 = converted %.loc21_14, %.loc21_27.4 [template = constants.%.33] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc21_27.5 -// CHECK:STDOUT: %.loc27_14: Core.IntLiteral = int_value 2147483648 [template = constants.%.26] -// CHECK:STDOUT: %.loc27_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_25.2: = bound_method %.loc27_14, %.loc27_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc27_25.3: = specific_function %.loc27_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_25.3(%.loc27_14) [template = constants.%.29] -// CHECK:STDOUT: %.loc27_25.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.29] -// CHECK:STDOUT: %.loc27_25.5: %i32 = converted %.loc27_14, %.loc27_25.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc27_14: Core.IntLiteral = int_value 2147483648 [template = constants.%.30] +// CHECK:STDOUT: %.loc27_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc27_25.2: = bound_method %.loc27_14, %.loc27_25.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc27_25.3: = specific_function %.loc27_25.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_25.3(%.loc27_14) [template = constants.%.33] +// CHECK:STDOUT: %.loc27_25.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.33] +// CHECK:STDOUT: %.loc27_25.5: %i32 = converted %.loc27_14, %.loc27_25.4 [template = constants.%.33] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc27_25.5 // CHECK:STDOUT: %d: f64 = bind_name d, // CHECK:STDOUT: %e: f64 = bind_name e, diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 56750d8bc3ea..14788de7e749 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -48,34 +48,34 @@ fn F() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 8 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.5, %Convert.14 [template] // CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 9 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.39: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.31, %.35, %.31, %.31, %.41, %.41) [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.35: %i32 = int_value 8 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 9 [template] +// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.43: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.45: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %array.1: %.3 = tuple_value (%.35, %.39, %.35, %.35, %.45, %.45) [template] +// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] -// CHECK:STDOUT: %.44: type = array_type %.2, f64 [template] -// CHECK:STDOUT: %.46: f64 = float_literal 0.90000000000000002 [template] -// CHECK:STDOUT: %.47: f64 = float_literal 8 [template] -// CHECK:STDOUT: %.48: f64 = float_literal 80 [template] -// CHECK:STDOUT: %.49: f64 = float_literal 1.0E+7 [template] -// CHECK:STDOUT: %.50: f64 = float_literal 1.0E+8 [template] -// CHECK:STDOUT: %.51: f64 = float_literal 1.0E-8 [template] +// CHECK:STDOUT: %.48: type = array_type %.2, f64 [template] +// CHECK:STDOUT: %.50: f64 = float_literal 0.90000000000000002 [template] +// CHECK:STDOUT: %.51: f64 = float_literal 8 [template] +// CHECK:STDOUT: %.52: f64 = float_literal 80 [template] +// CHECK:STDOUT: %.53: f64 = float_literal 1.0E+7 [template] +// CHECK:STDOUT: %.54: f64 = float_literal 1.0E+8 [template] +// CHECK:STDOUT: %.55: f64 = float_literal 1.0E-8 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (f64, f64, f64, f64, f64, f64) [template] -// CHECK:STDOUT: %array.2: %.44 = tuple_value (%.46, %.47, %.48, %.49, %.50, %.51) [template] +// CHECK:STDOUT: %array.2: %.48 = tuple_value (%.50, %.51, %.52, %.53, %.54, %.55) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -114,92 +114,92 @@ fn F() { // CHECK:STDOUT: %.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%.7] // CHECK:STDOUT: %.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%.7] // CHECK:STDOUT: %.loc21_3.1: %tuple.type.1 = tuple_literal (%.loc15, %.loc16, %.loc17, %.loc18, %.loc19, %.loc20) -// CHECK:STDOUT: %.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.3: = bound_method %.loc15, %.loc21_3.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_3.4: = specific_function %.loc21_3.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc21_3.1: init %i32 = call %.loc21_3.4(%.loc15) [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.5: init %i32 = converted %.loc15, %int.convert_checked.loc21_3.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_3.3: = bound_method %.loc15, %.loc21_3.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc21_3.4: = specific_function %.loc21_3.3, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc21_3.1: init %i32 = call %.loc21_3.4(%.loc15) [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.5: init %i32 = converted %.loc15, %int.convert_checked.loc21_3.1 [template = constants.%.35] // CHECK:STDOUT: %.loc21_3.6: Core.IntLiteral = int_value 0 [template = constants.%.8] // CHECK:STDOUT: %.loc21_3.7: ref %i32 = array_index %ints.var, %.loc21_3.6 -// CHECK:STDOUT: %.loc21_3.8: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.7 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.9: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.10: = bound_method %.loc16, %.loc21_3.9 [template = constants.%.33] -// CHECK:STDOUT: %.loc21_3.11: = specific_function %.loc21_3.10, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc21_3.2: init %i32 = call %.loc21_3.11(%.loc16) [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.12: init %i32 = converted %.loc16, %int.convert_checked.loc21_3.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.13: Core.IntLiteral = int_value 1 [template = constants.%.32] +// CHECK:STDOUT: %.loc21_3.8: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.7 [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_3.10: = bound_method %.loc16, %.loc21_3.9 [template = constants.%.37] +// CHECK:STDOUT: %.loc21_3.11: = specific_function %.loc21_3.10, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc21_3.2: init %i32 = call %.loc21_3.11(%.loc16) [template = constants.%.39] +// CHECK:STDOUT: %.loc21_3.12: init %i32 = converted %.loc16, %int.convert_checked.loc21_3.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc21_3.13: Core.IntLiteral = int_value 1 [template = constants.%.36] // CHECK:STDOUT: %.loc21_3.14: ref %i32 = array_index %ints.var, %.loc21_3.13 -// CHECK:STDOUT: %.loc21_3.15: init %i32 = initialize_from %.loc21_3.12 to %.loc21_3.14 [template = constants.%.35] -// CHECK:STDOUT: %.loc21_3.16: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.17: = bound_method %.loc17, %.loc21_3.16 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_3.18: = specific_function %.loc21_3.17, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc21_3.3: init %i32 = call %.loc21_3.18(%.loc17) [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.19: init %i32 = converted %.loc17, %int.convert_checked.loc21_3.3 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.20: Core.IntLiteral = int_value 2 [template = constants.%.36] +// CHECK:STDOUT: %.loc21_3.15: init %i32 = initialize_from %.loc21_3.12 to %.loc21_3.14 [template = constants.%.39] +// CHECK:STDOUT: %.loc21_3.16: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_3.17: = bound_method %.loc17, %.loc21_3.16 [template = constants.%.33] +// CHECK:STDOUT: %.loc21_3.18: = specific_function %.loc21_3.17, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc21_3.3: init %i32 = call %.loc21_3.18(%.loc17) [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.19: init %i32 = converted %.loc17, %int.convert_checked.loc21_3.3 [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.20: Core.IntLiteral = int_value 2 [template = constants.%.40] // CHECK:STDOUT: %.loc21_3.21: ref %i32 = array_index %ints.var, %.loc21_3.20 -// CHECK:STDOUT: %.loc21_3.22: init %i32 = initialize_from %.loc21_3.19 to %.loc21_3.21 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.23: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.24: = bound_method %.loc18, %.loc21_3.23 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_3.25: = specific_function %.loc21_3.24, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc21_3.4: init %i32 = call %.loc21_3.25(%.loc18) [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.26: init %i32 = converted %.loc18, %int.convert_checked.loc21_3.4 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.27: Core.IntLiteral = int_value 3 [template = constants.%.37] +// CHECK:STDOUT: %.loc21_3.22: init %i32 = initialize_from %.loc21_3.19 to %.loc21_3.21 [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.23: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_3.24: = bound_method %.loc18, %.loc21_3.23 [template = constants.%.33] +// CHECK:STDOUT: %.loc21_3.25: = specific_function %.loc21_3.24, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc21_3.4: init %i32 = call %.loc21_3.25(%.loc18) [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.26: init %i32 = converted %.loc18, %int.convert_checked.loc21_3.4 [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.27: Core.IntLiteral = int_value 3 [template = constants.%.41] // CHECK:STDOUT: %.loc21_3.28: ref %i32 = array_index %ints.var, %.loc21_3.27 -// CHECK:STDOUT: %.loc21_3.29: init %i32 = initialize_from %.loc21_3.26 to %.loc21_3.28 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_3.30: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.31: = bound_method %.loc19, %.loc21_3.30 [template = constants.%.39] -// CHECK:STDOUT: %.loc21_3.32: = specific_function %.loc21_3.31, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc21_3.5: init %i32 = call %.loc21_3.32(%.loc19) [template = constants.%.41] -// CHECK:STDOUT: %.loc21_3.33: init %i32 = converted %.loc19, %int.convert_checked.loc21_3.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc21_3.34: Core.IntLiteral = int_value 4 [template = constants.%.38] +// CHECK:STDOUT: %.loc21_3.29: init %i32 = initialize_from %.loc21_3.26 to %.loc21_3.28 [template = constants.%.35] +// CHECK:STDOUT: %.loc21_3.30: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_3.31: = bound_method %.loc19, %.loc21_3.30 [template = constants.%.43] +// CHECK:STDOUT: %.loc21_3.32: = specific_function %.loc21_3.31, @Convert.2(constants.%.1) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc21_3.5: init %i32 = call %.loc21_3.32(%.loc19) [template = constants.%.45] +// CHECK:STDOUT: %.loc21_3.33: init %i32 = converted %.loc19, %int.convert_checked.loc21_3.5 [template = constants.%.45] +// CHECK:STDOUT: %.loc21_3.34: Core.IntLiteral = int_value 4 [template = constants.%.42] // CHECK:STDOUT: %.loc21_3.35: ref %i32 = array_index %ints.var, %.loc21_3.34 -// CHECK:STDOUT: %.loc21_3.36: init %i32 = initialize_from %.loc21_3.33 to %.loc21_3.35 [template = constants.%.41] -// CHECK:STDOUT: %.loc21_3.37: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_3.38: = bound_method %.loc20, %.loc21_3.37 [template = constants.%.39] -// CHECK:STDOUT: %.loc21_3.39: = specific_function %.loc21_3.38, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc21_3.6: init %i32 = call %.loc21_3.39(%.loc20) [template = constants.%.41] -// CHECK:STDOUT: %.loc21_3.40: init %i32 = converted %.loc20, %int.convert_checked.loc21_3.6 [template = constants.%.41] -// CHECK:STDOUT: %.loc21_3.41: Core.IntLiteral = int_value 5 [template = constants.%.42] +// CHECK:STDOUT: %.loc21_3.36: init %i32 = initialize_from %.loc21_3.33 to %.loc21_3.35 [template = constants.%.45] +// CHECK:STDOUT: %.loc21_3.37: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_3.38: = bound_method %.loc20, %.loc21_3.37 [template = constants.%.43] +// CHECK:STDOUT: %.loc21_3.39: = specific_function %.loc21_3.38, @Convert.2(constants.%.1) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc21_3.6: init %i32 = call %.loc21_3.39(%.loc20) [template = constants.%.45] +// CHECK:STDOUT: %.loc21_3.40: init %i32 = converted %.loc20, %int.convert_checked.loc21_3.6 [template = constants.%.45] +// CHECK:STDOUT: %.loc21_3.41: Core.IntLiteral = int_value 5 [template = constants.%.46] // CHECK:STDOUT: %.loc21_3.42: ref %i32 = array_index %ints.var, %.loc21_3.41 -// CHECK:STDOUT: %.loc21_3.43: init %i32 = initialize_from %.loc21_3.40 to %.loc21_3.42 [template = constants.%.41] +// CHECK:STDOUT: %.loc21_3.43: init %i32 = initialize_from %.loc21_3.40 to %.loc21_3.42 [template = constants.%.45] // CHECK:STDOUT: %.loc21_3.44: init %.3 = array_init (%.loc21_3.8, %.loc21_3.15, %.loc21_3.22, %.loc21_3.29, %.loc21_3.36, %.loc21_3.43) to %ints.var [template = constants.%array.1] // CHECK:STDOUT: %.loc21_4: init %.3 = converted %.loc21_3.1, %.loc21_3.44 [template = constants.%array.1] // CHECK:STDOUT: assign %ints.var, %.loc21_4 -// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 64 [template = constants.%.43] +// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 64 [template = constants.%.47] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc22_16.1) [template = f64] // CHECK:STDOUT: %.loc22_21: Core.IntLiteral = int_value 6 [template = constants.%.2] // CHECK:STDOUT: %.loc22_16.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc22_16.3: type = converted %float.make_type, %.loc22_16.2 [template = f64] -// CHECK:STDOUT: %.loc22_22: type = array_type %.loc22_21, f64 [template = constants.%.44] -// CHECK:STDOUT: %floats.var: ref %.44 = var floats -// CHECK:STDOUT: %floats: ref %.44 = bind_name floats, %floats.var -// CHECK:STDOUT: %.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%.46] -// CHECK:STDOUT: %.loc24: f64 = float_literal 8 [template = constants.%.47] -// CHECK:STDOUT: %.loc25: f64 = float_literal 80 [template = constants.%.48] -// CHECK:STDOUT: %.loc26: f64 = float_literal 1.0E+7 [template = constants.%.49] -// CHECK:STDOUT: %.loc27: f64 = float_literal 1.0E+8 [template = constants.%.50] -// CHECK:STDOUT: %.loc28: f64 = float_literal 1.0E-8 [template = constants.%.51] +// CHECK:STDOUT: %.loc22_22: type = array_type %.loc22_21, f64 [template = constants.%.48] +// CHECK:STDOUT: %floats.var: ref %.48 = var floats +// CHECK:STDOUT: %floats: ref %.48 = bind_name floats, %floats.var +// CHECK:STDOUT: %.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%.50] +// CHECK:STDOUT: %.loc24: f64 = float_literal 8 [template = constants.%.51] +// CHECK:STDOUT: %.loc25: f64 = float_literal 80 [template = constants.%.52] +// CHECK:STDOUT: %.loc26: f64 = float_literal 1.0E+7 [template = constants.%.53] +// CHECK:STDOUT: %.loc27: f64 = float_literal 1.0E+8 [template = constants.%.54] +// CHECK:STDOUT: %.loc28: f64 = float_literal 1.0E-8 [template = constants.%.55] // CHECK:STDOUT: %.loc29_3.1: %tuple.type.2 = tuple_literal (%.loc23, %.loc24, %.loc25, %.loc26, %.loc27, %.loc28) // CHECK:STDOUT: %.loc29_3.2: Core.IntLiteral = int_value 0 [template = constants.%.8] // CHECK:STDOUT: %.loc29_3.3: ref f64 = array_index %floats.var, %.loc29_3.2 -// CHECK:STDOUT: %.loc29_3.4: init f64 = initialize_from %.loc23 to %.loc29_3.3 [template = constants.%.46] -// CHECK:STDOUT: %.loc29_3.5: Core.IntLiteral = int_value 1 [template = constants.%.32] +// CHECK:STDOUT: %.loc29_3.4: init f64 = initialize_from %.loc23 to %.loc29_3.3 [template = constants.%.50] +// CHECK:STDOUT: %.loc29_3.5: Core.IntLiteral = int_value 1 [template = constants.%.36] // CHECK:STDOUT: %.loc29_3.6: ref f64 = array_index %floats.var, %.loc29_3.5 -// CHECK:STDOUT: %.loc29_3.7: init f64 = initialize_from %.loc24 to %.loc29_3.6 [template = constants.%.47] -// CHECK:STDOUT: %.loc29_3.8: Core.IntLiteral = int_value 2 [template = constants.%.36] +// CHECK:STDOUT: %.loc29_3.7: init f64 = initialize_from %.loc24 to %.loc29_3.6 [template = constants.%.51] +// CHECK:STDOUT: %.loc29_3.8: Core.IntLiteral = int_value 2 [template = constants.%.40] // CHECK:STDOUT: %.loc29_3.9: ref f64 = array_index %floats.var, %.loc29_3.8 -// CHECK:STDOUT: %.loc29_3.10: init f64 = initialize_from %.loc25 to %.loc29_3.9 [template = constants.%.48] -// CHECK:STDOUT: %.loc29_3.11: Core.IntLiteral = int_value 3 [template = constants.%.37] +// CHECK:STDOUT: %.loc29_3.10: init f64 = initialize_from %.loc25 to %.loc29_3.9 [template = constants.%.52] +// CHECK:STDOUT: %.loc29_3.11: Core.IntLiteral = int_value 3 [template = constants.%.41] // CHECK:STDOUT: %.loc29_3.12: ref f64 = array_index %floats.var, %.loc29_3.11 -// CHECK:STDOUT: %.loc29_3.13: init f64 = initialize_from %.loc26 to %.loc29_3.12 [template = constants.%.49] -// CHECK:STDOUT: %.loc29_3.14: Core.IntLiteral = int_value 4 [template = constants.%.38] +// CHECK:STDOUT: %.loc29_3.13: init f64 = initialize_from %.loc26 to %.loc29_3.12 [template = constants.%.53] +// CHECK:STDOUT: %.loc29_3.14: Core.IntLiteral = int_value 4 [template = constants.%.42] // CHECK:STDOUT: %.loc29_3.15: ref f64 = array_index %floats.var, %.loc29_3.14 -// CHECK:STDOUT: %.loc29_3.16: init f64 = initialize_from %.loc27 to %.loc29_3.15 [template = constants.%.50] -// CHECK:STDOUT: %.loc29_3.17: Core.IntLiteral = int_value 5 [template = constants.%.42] +// CHECK:STDOUT: %.loc29_3.16: init f64 = initialize_from %.loc27 to %.loc29_3.15 [template = constants.%.54] +// CHECK:STDOUT: %.loc29_3.17: Core.IntLiteral = int_value 5 [template = constants.%.46] // CHECK:STDOUT: %.loc29_3.18: ref f64 = array_index %floats.var, %.loc29_3.17 -// CHECK:STDOUT: %.loc29_3.19: init f64 = initialize_from %.loc28 to %.loc29_3.18 [template = constants.%.51] -// CHECK:STDOUT: %.loc29_3.20: init %.44 = array_init (%.loc29_3.4, %.loc29_3.7, %.loc29_3.10, %.loc29_3.13, %.loc29_3.16, %.loc29_3.19) to %floats.var [template = constants.%array.2] -// CHECK:STDOUT: %.loc29_4: init %.44 = converted %.loc29_3.1, %.loc29_3.20 [template = constants.%array.2] +// CHECK:STDOUT: %.loc29_3.19: init f64 = initialize_from %.loc28 to %.loc29_3.18 [template = constants.%.55] +// CHECK:STDOUT: %.loc29_3.20: init %.48 = array_init (%.loc29_3.4, %.loc29_3.7, %.loc29_3.10, %.loc29_3.13, %.loc29_3.16, %.loc29_3.19) to %floats.var [template = constants.%array.2] +// CHECK:STDOUT: %.loc29_4: init %.48 = converted %.loc29_3.1, %.loc29_3.20 [template = constants.%array.2] // CHECK:STDOUT: assign %floats.var, %.loc29_4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index 66f579619964..df807b62f8dc 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -22,14 +22,14 @@ var b: i32 = ((2)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,18 +65,18 @@ var b: i32 = ((2)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_15: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_17.2: = bound_method %.loc11_15, %.loc11_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_17.3: = specific_function %.loc11_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_17.3(%.loc11_15) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_17.4: init %i32 = converted %.loc11_15, %int.convert_checked.loc11 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_17.2: = bound_method %.loc11_15, %.loc11_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_17.3: = specific_function %.loc11_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_17.3(%.loc11_15) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_17.4: init %i32 = converted %.loc11_15, %int.convert_checked.loc11 [template = constants.%.29] // CHECK:STDOUT: assign file.%a.var, %.loc11_17.4 -// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_19.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_19.2: = bound_method %.loc12_16, %.loc12_19.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_19.3: = specific_function %.loc12_19.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_19.3(%.loc12_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_19.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_19.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_19.2: = bound_method %.loc12_16, %.loc12_19.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_19.3: = specific_function %.loc12_19.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_19.3(%.loc12_16) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_19.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.33] // CHECK:STDOUT: assign file.%b.var, %.loc12_19.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index e072278424c9..84e60b7c7454 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -23,10 +23,10 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -60,12 +60,12 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: fn @Run() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.2: = bound_method %.loc11_26, %.loc11_27.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_27.3: = specific_function %.loc11_27.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.3(%.loc11_26) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.5: %i32 = converted %.loc11_26, %.loc11_27.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.2: = bound_method %.loc11_26, %.loc11_27.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.3: = specific_function %.loc11_27.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.3(%.loc11_26) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.5: %i32 = converted %.loc11_26, %.loc11_27.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc11_27.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index d327b3847f28..e480023b0cbb 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -99,11 +99,11 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 64 [template] -// CHECK:STDOUT: %.26: f64 = float_literal 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 64 [template] +// CHECK:STDOUT: %.30: f64 = float_literal 0 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] @@ -131,12 +131,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %.loc6_14.1: Core.IntLiteral = int_value 64 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_14.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_14.3: = bound_method %.loc6_14.1, %.loc6_14.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc6_14.4: = specific_function %.loc6_14.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_14.4(%.loc6_14.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc6_14.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc6_14.6: %i32 = converted %.loc6_14.1, %.loc6_14.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc6_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_14.3: = bound_method %.loc6_14.1, %.loc6_14.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_14.4: = specific_function %.loc6_14.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_14.4(%.loc6_14.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc6_14.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc6_14.6: %i32 = converted %.loc6_14.1, %.loc6_14.5 [template = constants.%.29] // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%.loc6_14.6) [template = f64] // CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc6_16.2: type = converted %float.make_type, %.loc6_16.1 [template = f64] @@ -173,7 +173,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc6: f64 = float_literal 0 [template = constants.%.26] +// CHECK:STDOUT: %.loc6: f64 = float_literal 0 [template = constants.%.30] // CHECK:STDOUT: assign file.%f.var, %.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -188,16 +188,16 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.21: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.22: = bound_method %.1, %Convert.14 [template] -// CHECK:STDOUT: %.23: = specific_function %.22, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.24: %i32 = int_value 32 [template] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.26: = bound_method %.1, %Convert.14 [template] +// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.28: %i32 = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %.26: = bound_method %.25, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 64 [template] +// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %.30: = bound_method %.29, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 64 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -222,12 +222,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] // CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.21, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.22] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.23] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.24] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.24] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.24] +// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.26] +// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.27] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.28] +// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28] +// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.28] // CHECK:STDOUT: %float.make_type.loc10: init type = call %Float.ref.loc10(%.loc10_26.6) [template = ] // CHECK:STDOUT: %.loc10_28.1: type = value_of_initializer %float.make_type.loc10 [template = ] // CHECK:STDOUT: %.loc10_28.2: type = converted %float.make_type.loc10, %.loc10_28.1 [template = ] @@ -253,12 +253,12 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 64 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_23.1: %Convert.type.2 = interface_witness_access constants.%.21, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_23.2: = bound_method %.loc12_21, %.loc12_23.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_23.3: = specific_function %.loc12_23.2, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_23.3(%.loc12_21) [template = constants.%.28] -// CHECK:STDOUT: %.loc12_23.4: init %i32 = converted %.loc12_21, %int.convert_checked [template = constants.%.28] +// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 64 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_23.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_23.2: = bound_method %.loc12_21, %.loc12_23.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_23.3: = specific_function %.loc12_23.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_23.3(%.loc12_21) [template = constants.%.32] +// CHECK:STDOUT: %.loc12_23.4: init %i32 = converted %.loc12_21, %int.convert_checked [template = constants.%.32] // CHECK:STDOUT: assign file.%dyn_size.var, %.loc12_23.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index ad74a9b3c60e..4f0819bf1e50 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -34,22 +34,22 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 8 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 10 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 8 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 8 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 8 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -104,39 +104,39 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24.1: Core.IntLiteral = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_24.1, %.loc4_24.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %.loc4_24.4(%.loc4_24.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_24.5: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_24.6: %i32 = converted %.loc4_24.1, %.loc4_24.5 [template = constants.%.29] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_24.1, %.loc4_24.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %.loc4_24.4(%.loc4_24.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_24.5: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_24.6: %i32 = converted %.loc4_24.1, %.loc4_24.5 [template = constants.%.33] +// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.and, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.and [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.and, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.and, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.and, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.and [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.and, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.and, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 8 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 8 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -181,9 +181,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 26c301d57fc2..78951183ec68 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -36,24 +36,24 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1193046 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -1193047 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 16777215 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 16777215 [template] -// CHECK:STDOUT: %.31: %i32 = int_value 15584169 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1193046 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -1193047 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 16777215 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 16777215 [template] +// CHECK:STDOUT: %.35: %i32 = int_value 15584169 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.32: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.33: = bound_method %.31, %Convert.15 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 15584169 [template] -// CHECK:STDOUT: %.36: type = array_type %.35, %i32 [template] -// CHECK:STDOUT: %.37: type = ptr_type %.36 [template] +// CHECK:STDOUT: %.36: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.37: = bound_method %.35, %Convert.15 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 15584169 [template] +// CHECK:STDOUT: %.40: type = array_type %.39, %i32 [template] +// CHECK:STDOUT: %.41: type = ptr_type %.40 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -128,43 +128,43 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] // CHECK:STDOUT: %Complement.ref: %Complement.type = name_ref Complement, %Complement.decl [template = constants.%Complement] // CHECK:STDOUT: %.loc5_31.1: Core.IntLiteral = int_value 1193046 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_31.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_31.3: = bound_method %.loc5_31.1, %.loc5_31.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_31.4: = specific_function %.loc5_31.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5_31: init %i32 = call %.loc5_31.4(%.loc5_31.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_31.5: %i32 = value_of_initializer %int.convert_checked.loc5_31 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_31.6: %i32 = converted %.loc5_31.1, %.loc5_31.5 [template = constants.%.25] -// CHECK:STDOUT: %int.complement: init %i32 = call %Complement.ref(%.loc5_31.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc5_42.1: Core.IntLiteral = int_value 16777215 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_30.1: %i32 = value_of_initializer %int.complement [template = constants.%.26] -// CHECK:STDOUT: %.loc5_30.2: %i32 = converted %int.complement, %.loc5_30.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc5_42.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_42.3: = bound_method %.loc5_42.1, %.loc5_42.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc5_42.4: = specific_function %.loc5_42.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %.loc5_42.4(%.loc5_42.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.5: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.6: %i32 = converted %.loc5_42.1, %.loc5_42.5 [template = constants.%.30] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_30.2, %.loc5_42.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_31.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_31.3: = bound_method %.loc5_31.1, %.loc5_31.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_31.4: = specific_function %.loc5_31.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5_31: init %i32 = call %.loc5_31.4(%.loc5_31.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_31.5: %i32 = value_of_initializer %int.convert_checked.loc5_31 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_31.6: %i32 = converted %.loc5_31.1, %.loc5_31.5 [template = constants.%.29] +// CHECK:STDOUT: %int.complement: init %i32 = call %Complement.ref(%.loc5_31.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc5_42.1: Core.IntLiteral = int_value 16777215 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.1: %i32 = value_of_initializer %int.complement [template = constants.%.30] +// CHECK:STDOUT: %.loc5_30.2: %i32 = converted %int.complement, %.loc5_30.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_42.3: = bound_method %.loc5_42.1, %.loc5_42.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc5_42.4: = specific_function %.loc5_42.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %.loc5_42.4(%.loc5_42.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc5_42.5: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_42.6: %i32 = converted %.loc5_42.1, %.loc5_42.5 [template = constants.%.34] +// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_30.2, %.loc5_42.6) [template = constants.%.35] // CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: %Convert.type.6 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc5_19.2: = bound_method %int.and, %.loc5_19.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc5_19.3: = specific_function %.loc5_19.2, @Convert.4(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc5_19.4: %i32 = value_of_initializer %int.and [template = constants.%.31] -// CHECK:STDOUT: %.loc5_19.5: %i32 = converted %int.and, %.loc5_19.4 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc5_19: init Core.IntLiteral = call %.loc5_19.3(%.loc5_19.5) [template = constants.%.35] -// CHECK:STDOUT: %.loc5_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_19 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_19.7: Core.IntLiteral = converted %int.and, %.loc5_19.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_51: type = array_type %.loc5_19.7, %i32 [template = constants.%.36] -// CHECK:STDOUT: %arr.var: ref %.36 = var arr -// CHECK:STDOUT: %arr: ref %.36 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc5_19.1: %Convert.type.6 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc5_19.2: = bound_method %int.and, %.loc5_19.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc5_19.3: = specific_function %.loc5_19.2, @Convert.4(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc5_19.4: %i32 = value_of_initializer %int.and [template = constants.%.35] +// CHECK:STDOUT: %.loc5_19.5: %i32 = converted %int.and, %.loc5_19.4 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc5_19: init Core.IntLiteral = call %.loc5_19.3(%.loc5_19.5) [template = constants.%.39] +// CHECK:STDOUT: %.loc5_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_19 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_19.7: Core.IntLiteral = converted %int.and, %.loc5_19.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_51: type = array_type %.loc5_19.7, %i32 [template = constants.%.40] +// CHECK:STDOUT: %arr.var: ref %.40 = var arr +// CHECK:STDOUT: %arr: ref %.40 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc6_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_18: Core.IntLiteral = int_value 15584169 [template = constants.%.35] +// CHECK:STDOUT: %.loc6_18: Core.IntLiteral = int_value 15584169 [template = constants.%.39] // CHECK:STDOUT: %.loc6_13.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_13.3: type = converted %int.make_type_signed.loc6, %.loc6_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_26: type = array_type %.loc6_18, %i32 [template = constants.%.36] -// CHECK:STDOUT: %.loc6_27: type = ptr_type %.36 [template = constants.%.37] +// CHECK:STDOUT: %.loc6_26: type = array_type %.loc6_18, %i32 [template = constants.%.40] +// CHECK:STDOUT: %.loc6_27: type = ptr_type %.40 [template = constants.%.41] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -202,9 +202,9 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.36 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc6: %.37 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.37 = bind_name arr_p, %.loc6 +// CHECK:STDOUT: %arr.ref: ref %.40 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc6: %.41 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.41 = bind_name arr_p, %.loc6 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index 2bd870cef5bb..63b39cb9ea9e 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -803,32 +803,32 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %SubI32.type: type = fn_type @SubI32 [template] // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.34: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template] // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template] // CHECK:STDOUT: %IntLiteralToIntLiteral.type: type = fn_type @IntLiteralToIntLiteral [template] // CHECK:STDOUT: %IntLiteralToIntLiteral: %IntLiteralToIntLiteral.type = struct_value () [template] // CHECK:STDOUT: %Int32ToIntLiteral.type: type = fn_type @Int32ToIntLiteral [template] // CHECK:STDOUT: %Int32ToIntLiteral: %Int32ToIntLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.36: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %.40: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.41: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -926,74 +926,74 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt32.ref.loc5: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %.loc5_27.1: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_27.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_27.3: = bound_method %.loc5_27.1, %.loc5_27.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_27.4: = specific_function %.loc5_27.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5_27: init %i32 = call %.loc5_27.4(%.loc5_27.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_27.5: %i32 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_27.6: %i32 = converted %.loc5_27.1, %.loc5_27.5 [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc5_26: init %i32 = call %Int32ToInt32.ref.loc5(%.loc5_27.6) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_29.1: %i32 = value_of_initializer %int.convert_checked.loc5_26 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_29.2: %i32 = converted %int.convert_checked.loc5_26, %.loc5_29.1 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_27.3: = bound_method %.loc5_27.1, %.loc5_27.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_27.4: = specific_function %.loc5_27.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5_27: init %i32 = call %.loc5_27.4(%.loc5_27.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_27.5: %i32 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_27.6: %i32 = converted %.loc5_27.1, %.loc5_27.5 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc5_26: init %i32 = call %Int32ToInt32.ref.loc5(%.loc5_27.6) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_29.1: %i32 = value_of_initializer %int.convert_checked.loc5_26 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_29.2: %i32 = converted %int.convert_checked.loc5_26, %.loc5_29.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc5_29.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc6: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] -// CHECK:STDOUT: %.loc6_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_27.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_27.3: = bound_method %.loc6_27.1, %.loc6_27.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_27.4: = specific_function %.loc6_27.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_27: init %i32 = call %.loc6_27.4(%.loc6_27.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_27.5: %i32 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_27.6: %i32 = converted %.loc6_27.1, %.loc6_27.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Int32ToInt32.ref.loc6(%.loc6_27.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_39.1: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_39.2: %i32 = converted %int.convert_checked.loc6_26, %.loc6_39.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_27.3: = bound_method %.loc6_27.1, %.loc6_27.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_27.4: = specific_function %.loc6_27.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc6_27: init %i32 = call %.loc6_27.4(%.loc6_27.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_27.5: %i32 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_27.6: %i32 = converted %.loc6_27.1, %.loc6_27.5 [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Int32ToInt32.ref.loc6(%.loc6_27.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_39.1: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_39.2: %i32 = converted %int.convert_checked.loc6_26, %.loc6_39.1 [template = constants.%.33] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc6_39.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc7: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %NegateI32.ref.loc7: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc7_44.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_44.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_44.3: = bound_method %.loc7_44.1, %.loc7_44.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_44.4: = specific_function %.loc7_44.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7_44: init %i32 = call %.loc7_44.4(%.loc7_44.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_44.5: %i32 = value_of_initializer %int.convert_checked.loc7_44 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_44.6: %i32 = converted %.loc7_44.1, %.loc7_44.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc7: init %i32 = call %NegateI32.ref.loc7(%.loc7_44.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_58.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_43.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_43.2: %i32 = converted %int.snegate.loc7, %.loc7_43.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_58.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_58.3: = bound_method %.loc7_58.1, %.loc7_58.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc7_58.4: = specific_function %.loc7_58.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc7_58: init %i32 = call %.loc7_58.4(%.loc7_58.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_58.5: %i32 = value_of_initializer %int.convert_checked.loc7_58 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_58.6: %i32 = converted %.loc7_58.1, %.loc7_58.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc7_43.2, %.loc7_58.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_33.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc7_33.2: %i32 = converted %int.ssub, %.loc7_33.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %Int32ToInt32.ref.loc7(%.loc7_33.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_61.1: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_61.2: %i32 = converted %int.convert_checked.loc7_26, %.loc7_61.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_44.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_44.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_44.3: = bound_method %.loc7_44.1, %.loc7_44.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_44.4: = specific_function %.loc7_44.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc7_44: init %i32 = call %.loc7_44.4(%.loc7_44.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_44.5: %i32 = value_of_initializer %int.convert_checked.loc7_44 [template = constants.%.33] +// CHECK:STDOUT: %.loc7_44.6: %i32 = converted %.loc7_44.1, %.loc7_44.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc7: init %i32 = call %NegateI32.ref.loc7(%.loc7_44.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc7_58.1: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_43.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_43.2: %i32 = converted %int.snegate.loc7, %.loc7_43.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_58.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_58.3: = bound_method %.loc7_58.1, %.loc7_58.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_58.4: = specific_function %.loc7_58.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc7_58: init %i32 = call %.loc7_58.4(%.loc7_58.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc7_58.5: %i32 = value_of_initializer %int.convert_checked.loc7_58 [template = constants.%.38] +// CHECK:STDOUT: %.loc7_58.6: %i32 = converted %.loc7_58.1, %.loc7_58.5 [template = constants.%.38] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc7_43.2, %.loc7_58.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_33.1: %i32 = value_of_initializer %int.ssub [template = constants.%.39] +// CHECK:STDOUT: %.loc7_33.2: %i32 = converted %int.ssub, %.loc7_33.1 [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %Int32ToInt32.ref.loc7(%.loc7_33.2) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_61.1: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_61.2: %i32 = converted %int.convert_checked.loc7_26, %.loc7_61.1 [template = constants.%.39] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc7_61.2 // CHECK:STDOUT: %IntLiteralToIntLiteral.ref: %IntLiteralToIntLiteral.type = name_ref IntLiteralToIntLiteral, imports.%import_ref.9 [template = constants.%IntLiteralToIntLiteral] // CHECK:STDOUT: %Int32ToIntLiteral.ref: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %NegateI32.ref.loc8: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc8_74.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_74.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_74.3: = bound_method %.loc8_74.1, %.loc8_74.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_74.4: = specific_function %.loc8_74.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc8_74: init %i32 = call %.loc8_74.4(%.loc8_74.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc8_74.5: %i32 = value_of_initializer %int.convert_checked.loc8_74 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_74.6: %i32 = converted %.loc8_74.1, %.loc8_74.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc8: init %i32 = call %NegateI32.ref.loc8(%.loc8_74.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc8_73.1: %i32 = value_of_initializer %int.snegate.loc8 [template = constants.%.36] -// CHECK:STDOUT: %.loc8_73.2: %i32 = converted %int.snegate.loc8, %.loc8_73.1 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_63: init Core.IntLiteral = call %Int32ToIntLiteral.ref(%.loc8_73.2) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_63.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_63 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_63.2: Core.IntLiteral = converted %int.convert_checked.loc8_63, %.loc8_63.1 [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc8_45: init Core.IntLiteral = call %IntLiteralToIntLiteral.ref(%.loc8_63.2) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_78.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_45 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_78.2: Core.IntLiteral = converted %int.convert_checked.loc8_45, %.loc8_78.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_74.1: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc8_74.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_74.3: = bound_method %.loc8_74.1, %.loc8_74.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc8_74.4: = specific_function %.loc8_74.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc8_74: init %i32 = call %.loc8_74.4(%.loc8_74.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc8_74.5: %i32 = value_of_initializer %int.convert_checked.loc8_74 [template = constants.%.38] +// CHECK:STDOUT: %.loc8_74.6: %i32 = converted %.loc8_74.1, %.loc8_74.5 [template = constants.%.38] +// CHECK:STDOUT: %int.snegate.loc8: init %i32 = call %NegateI32.ref.loc8(%.loc8_74.6) [template = constants.%.40] +// CHECK:STDOUT: %.loc8_73.1: %i32 = value_of_initializer %int.snegate.loc8 [template = constants.%.40] +// CHECK:STDOUT: %.loc8_73.2: %i32 = converted %int.snegate.loc8, %.loc8_73.1 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc8_63: init Core.IntLiteral = call %Int32ToIntLiteral.ref(%.loc8_73.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_63.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_63 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_63.2: Core.IntLiteral = converted %int.convert_checked.loc8_63, %.loc8_63.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc8_45: init Core.IntLiteral = call %IntLiteralToIntLiteral.ref(%.loc8_63.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_78.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_45 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_78.2: Core.IntLiteral = converted %int.convert_checked.loc8_45, %.loc8_78.1 [template = constants.%.41] // CHECK:STDOUT: %d: Core.IntLiteral = bind_name d, %.loc8_78.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1012,11 +1012,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %u32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %u32 = int_value 2147483647 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %Uint32ToInt32.type: type = fn_type @Uint32ToInt32 [template] @@ -1101,31 +1101,31 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint32.ref.loc5: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc5_30.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_30.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_30.3: = bound_method %.loc5_30.1, %.loc5_30.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_30.4: = specific_function %.loc5_30.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5_30: init %i32 = call %.loc5_30.4(%.loc5_30.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_30.5: %i32 = value_of_initializer %int.convert_checked.loc5_30 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_30.6: %i32 = converted %.loc5_30.1, %.loc5_30.5 [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_30.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_29, %.loc5_42.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc5_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_30.3: = bound_method %.loc5_30.1, %.loc5_30.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_30.4: = specific_function %.loc5_30.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5_30: init %i32 = call %.loc5_30.4(%.loc5_30.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_30.5: %i32 = value_of_initializer %int.convert_checked.loc5_30 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_30.6: %i32 = converted %.loc5_30.1, %.loc5_30.5 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_29, %.loc5_42.1 [template = constants.%.30] // CHECK:STDOUT: %max: %u32 = bind_name max, %.loc5_42.2 // CHECK:STDOUT: %Uint32ToInt32.ref: %Uint32ToInt32.type = name_ref Uint32ToInt32, imports.%import_ref.7 [template = constants.%Uint32ToInt32] // CHECK:STDOUT: %Int32ToUint32.ref.loc6: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc6_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_54.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_54.3: = bound_method %.loc6_54.1, %.loc6_54.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc6_54.4: = specific_function %.loc6_54.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc6_54: init %i32 = call %.loc6_54.4(%.loc6_54.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc6_54.5: %i32 = value_of_initializer %int.convert_checked.loc6_54 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_54.6: %i32 = converted %.loc6_54.1, %.loc6_54.5 [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6_53: init %u32 = call %Int32ToUint32.ref.loc6(%.loc6_54.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_53.1: %u32 = value_of_initializer %int.convert_checked.loc6_53 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_53.2: %u32 = converted %int.convert_checked.loc6_53, %.loc6_53.1 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc6_39: init %i32 = call %Uint32ToInt32.ref(%.loc6_53.2) [template = constants.%.25] -// CHECK:STDOUT: %.loc6_67.1: %i32 = value_of_initializer %int.convert_checked.loc6_39 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_67.2: %i32 = converted %int.convert_checked.loc6_39, %.loc6_67.1 [template = constants.%.25] +// CHECK:STDOUT: %.loc6_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_54.3: = bound_method %.loc6_54.1, %.loc6_54.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_54.4: = specific_function %.loc6_54.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc6_54: init %i32 = call %.loc6_54.4(%.loc6_54.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc6_54.5: %i32 = value_of_initializer %int.convert_checked.loc6_54 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_54.6: %i32 = converted %.loc6_54.1, %.loc6_54.5 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_53: init %u32 = call %Int32ToUint32.ref.loc6(%.loc6_54.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_53.1: %u32 = value_of_initializer %int.convert_checked.loc6_53 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_53.2: %u32 = converted %int.convert_checked.loc6_53, %.loc6_53.1 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc6_39: init %i32 = call %Uint32ToInt32.ref(%.loc6_53.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc6_67.1: %i32 = value_of_initializer %int.convert_checked.loc6_39 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_67.2: %i32 = converted %int.convert_checked.loc6_39, %.loc6_67.1 [template = constants.%.29] // CHECK:STDOUT: %max_roundtrip: %i32 = bind_name max_roundtrip, %.loc6_67.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1145,50 +1145,50 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: %u16 = int_value 0 [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 65535 [template] -// CHECK:STDOUT: %.29: = bound_method %.28, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 65535 [template] -// CHECK:STDOUT: %.32: %u16 = int_value 65535 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: %u16 = int_value 0 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 65535 [template] +// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 65535 [template] +// CHECK:STDOUT: %.36: %u16 = int_value 65535 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %i16: type = int_type signed, %.1 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 32767 [template] -// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %.37: %i16 = int_value 32767 [template] +// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 32767 [template] +// CHECK:STDOUT: %.38: = bound_method %.37, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 32767 [template] +// CHECK:STDOUT: %.41: %i16 = int_value 32767 [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.42: %i32 = int_value -32768 [template] -// CHECK:STDOUT: %.43: %i16 = int_value -32768 [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.14 [template] +// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.45: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %.46: %i32 = int_value -32768 [template] +// CHECK:STDOUT: %.47: %i16 = int_value -32768 [template] // CHECK:STDOUT: %Uint32ToUint16.type: type = fn_type @Uint32ToUint16 [template] // CHECK:STDOUT: %Uint32ToUint16: %Uint32ToUint16.type = struct_value () [template] // CHECK:STDOUT: %u32: type = int_type unsigned, %.2 [template] // CHECK:STDOUT: %Int32ToUint32.type: type = fn_type @Int32ToUint32 [template] // CHECK:STDOUT: %Int32ToUint32: %Int32ToUint32.type = struct_value () [template] -// CHECK:STDOUT: %.44: %u32 = int_value 0 [template] -// CHECK:STDOUT: %.45: %u32 = int_value 65535 [template] +// CHECK:STDOUT: %.48: %u32 = int_value 0 [template] +// CHECK:STDOUT: %.49: %u32 = int_value 65535 [template] // CHECK:STDOUT: %Uint32ToInt16.type: type = fn_type @Uint32ToInt16 [template] // CHECK:STDOUT: %Uint32ToInt16: %Uint32ToInt16.type = struct_value () [template] -// CHECK:STDOUT: %.46: %i16 = int_value 0 [template] -// CHECK:STDOUT: %.47: %u32 = int_value 32767 [template] +// CHECK:STDOUT: %.50: %i16 = int_value 0 [template] +// CHECK:STDOUT: %.51: %u32 = int_value 32767 [template] // CHECK:STDOUT: %IntLiteralToInt16.type: type = fn_type @IntLiteralToInt16 [template] // CHECK:STDOUT: %IntLiteralToInt16: %IntLiteralToInt16.type = struct_value () [template] // CHECK:STDOUT: %Int32ToIntLiteral.type: type = fn_type @Int32ToIntLiteral [template] // CHECK:STDOUT: %Int32ToIntLiteral: %Int32ToIntLiteral.type = struct_value () [template] -// CHECK:STDOUT: %.48: Core.IntLiteral = int_value -32768 [template] +// CHECK:STDOUT: %.52: Core.IntLiteral = int_value -32768 [template] // CHECK:STDOUT: %IntLiteralToUint16.type: type = fn_type @IntLiteralToUint16 [template] // CHECK:STDOUT: %IntLiteralToUint16: %IntLiteralToUint16.type = struct_value () [template] // CHECK:STDOUT: } @@ -1335,187 +1335,187 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref.loc5: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %.loc5_28.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc5_28.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_28.3: = bound_method %.loc5_28.1, %.loc5_28.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc5_28.4: = specific_function %.loc5_28.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.26] -// CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc5_27: init %u16 = call %Int32ToUint16.ref.loc5(%.loc5_28.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc5_30.1: %u16 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_30.2: %u16 = converted %int.convert_checked.loc5_27, %.loc5_30.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_28.3: = bound_method %.loc5_28.1, %.loc5_28.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc5_28.4: = specific_function %.loc5_28.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc5_27: init %u16 = call %Int32ToUint16.ref.loc5(%.loc5_28.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.1: %u16 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.2: %u16 = converted %int.convert_checked.loc5_27, %.loc5_30.1 [template = constants.%.31] // CHECK:STDOUT: %a: %u16 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint16.ref.loc6: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] -// CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 65535 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_28.1, %.loc6_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc6_27: init %u16 = call %Int32ToUint16.ref.loc6(%.loc6_28.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc6_35.1: %u16 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_35.2: %u16 = converted %int.convert_checked.loc6_27, %.loc6_35.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_28.1, %.loc6_28.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.2) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.35] +// CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.35] +// CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc6_27: init %u16 = call %Int32ToUint16.ref.loc6(%.loc6_28.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc6_35.1: %u16 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.36] +// CHECK:STDOUT: %.loc6_35.2: %u16 = converted %int.convert_checked.loc6_27, %.loc6_35.1 [template = constants.%.36] // CHECK:STDOUT: %b: %u16 = bind_name b, %.loc6_35.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc8: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] -// CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32767 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_27.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_27.3: = bound_method %.loc8_27.1, %.loc8_27.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_27.4: = specific_function %.loc8_27.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc8_27: init %i32 = call %.loc8_27.4(%.loc8_27.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc8_27.5: %i32 = value_of_initializer %int.convert_checked.loc8_27 [template = constants.%.36] -// CHECK:STDOUT: %.loc8_27.6: %i32 = converted %.loc8_27.1, %.loc8_27.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i16 = call %Int32ToInt16.ref.loc8(%.loc8_27.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_34.1: %i16 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %int.convert_checked.loc8_26, %.loc8_34.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_27.3: = bound_method %.loc8_27.1, %.loc8_27.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc8_27.4: = specific_function %.loc8_27.3, @Convert.2(constants.%.2) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc8_27: init %i32 = call %.loc8_27.4(%.loc8_27.1) [template = constants.%.40] +// CHECK:STDOUT: %.loc8_27.5: %i32 = value_of_initializer %int.convert_checked.loc8_27 [template = constants.%.40] +// CHECK:STDOUT: %.loc8_27.6: %i32 = converted %.loc8_27.1, %.loc8_27.5 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i16 = call %Int32ToInt16.ref.loc8(%.loc8_27.6) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_34.1: %i16 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %int.convert_checked.loc8_26, %.loc8_34.1 [template = constants.%.41] // CHECK:STDOUT: %c: %i16 = bind_name c, %.loc8_34.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc9: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref.loc9: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc9_37.1: Core.IntLiteral = int_value 32768 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_37.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_37.3: = bound_method %.loc9_37.1, %.loc9_37.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc9_37.4: = specific_function %.loc9_37.3, @Convert.2(constants.%.2) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i32 = call %.loc9_37.4(%.loc9_37.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc9_37.5: %i32 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.41] -// CHECK:STDOUT: %.loc9_37.6: %i32 = converted %.loc9_37.1, %.loc9_37.5 [template = constants.%.41] -// CHECK:STDOUT: %int.snegate.loc9: init %i32 = call %NegateI32.ref.loc9(%.loc9_37.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9 [template = constants.%.42] -// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9, %.loc9_36.1 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i16 = call %Int32ToInt16.ref.loc9(%.loc9_36.2) [template = constants.%.43] -// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.43] -// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_26, %.loc9_45.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc9_37.1: Core.IntLiteral = int_value 32768 [template = constants.%.42] +// CHECK:STDOUT: %.loc9_37.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_37.3: = bound_method %.loc9_37.1, %.loc9_37.2 [template = constants.%.43] +// CHECK:STDOUT: %.loc9_37.4: = specific_function %.loc9_37.3, @Convert.2(constants.%.2) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i32 = call %.loc9_37.4(%.loc9_37.1) [template = constants.%.45] +// CHECK:STDOUT: %.loc9_37.5: %i32 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.45] +// CHECK:STDOUT: %.loc9_37.6: %i32 = converted %.loc9_37.1, %.loc9_37.5 [template = constants.%.45] +// CHECK:STDOUT: %int.snegate.loc9: init %i32 = call %NegateI32.ref.loc9(%.loc9_37.6) [template = constants.%.46] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9 [template = constants.%.46] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9, %.loc9_36.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i16 = call %Int32ToInt16.ref.loc9(%.loc9_36.2) [template = constants.%.47] +// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.47] +// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_26, %.loc9_45.1 [template = constants.%.47] // CHECK:STDOUT: %d: %i16 = bind_name d, %.loc9_45.2 // CHECK:STDOUT: %Uint32ToUint16.ref.loc11: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc11_43.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_43.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_43.3: = bound_method %.loc11_43.1, %.loc11_43.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc11_43.4: = specific_function %.loc11_43.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc11_43: init %i32 = call %.loc11_43.4(%.loc11_43.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc11_43.5: %i32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_43.6: %i32 = converted %.loc11_43.1, %.loc11_43.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_42: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_43.6) [template = constants.%.44] -// CHECK:STDOUT: %.loc11_42.1: %u32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.44] -// CHECK:STDOUT: %.loc11_42.2: %u32 = converted %int.convert_checked.loc11_42, %.loc11_42.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc11_28: init %u16 = call %Uint32ToUint16.ref.loc11(%.loc11_42.2) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_46.1: %u16 = value_of_initializer %int.convert_checked.loc11_28 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_46.2: %u16 = converted %int.convert_checked.loc11_28, %.loc11_46.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_43.3: = bound_method %.loc11_43.1, %.loc11_43.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc11_43.4: = specific_function %.loc11_43.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc11_43: init %i32 = call %.loc11_43.4(%.loc11_43.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc11_43.5: %i32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_43.6: %i32 = converted %.loc11_43.1, %.loc11_43.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_42: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_43.6) [template = constants.%.48] +// CHECK:STDOUT: %.loc11_42.1: %u32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.48] +// CHECK:STDOUT: %.loc11_42.2: %u32 = converted %int.convert_checked.loc11_42, %.loc11_42.1 [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc11_28: init %u16 = call %Uint32ToUint16.ref.loc11(%.loc11_42.2) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_46.1: %u16 = value_of_initializer %int.convert_checked.loc11_28 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_46.2: %u16 = converted %int.convert_checked.loc11_28, %.loc11_46.1 [template = constants.%.31] // CHECK:STDOUT: %e: %u16 = bind_name e, %.loc11_46.2 // CHECK:STDOUT: %Uint32ToUint16.ref.loc12: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 65535 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc12_42: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_43.6) [template = constants.%.45] -// CHECK:STDOUT: %.loc12_42.1: %u32 = value_of_initializer %int.convert_checked.loc12_42 [template = constants.%.45] -// CHECK:STDOUT: %.loc12_42.2: %u32 = converted %int.convert_checked.loc12_42, %.loc12_42.1 [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc12_28: init %u16 = call %Uint32ToUint16.ref.loc12(%.loc12_42.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_51.1: %u16 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_51.2: %u16 = converted %int.convert_checked.loc12_28, %.loc12_51.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.2) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.35] +// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc12_42: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_43.6) [template = constants.%.49] +// CHECK:STDOUT: %.loc12_42.1: %u32 = value_of_initializer %int.convert_checked.loc12_42 [template = constants.%.49] +// CHECK:STDOUT: %.loc12_42.2: %u32 = converted %int.convert_checked.loc12_42, %.loc12_42.1 [template = constants.%.49] +// CHECK:STDOUT: %int.convert_checked.loc12_28: init %u16 = call %Uint32ToUint16.ref.loc12(%.loc12_42.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_51.1: %u16 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_51.2: %u16 = converted %int.convert_checked.loc12_28, %.loc12_51.1 [template = constants.%.36] // CHECK:STDOUT: %f: %u16 = bind_name f, %.loc12_51.2 // CHECK:STDOUT: %Uint32ToInt16.ref.loc14: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc14: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_42.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_42.3: = bound_method %.loc14_42.1, %.loc14_42.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc14_42.4: = specific_function %.loc14_42.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc14_41: init %u32 = call %Int32ToUint32.ref.loc14(%.loc14_42.6) [template = constants.%.44] -// CHECK:STDOUT: %.loc14_41.1: %u32 = value_of_initializer %int.convert_checked.loc14_41 [template = constants.%.44] -// CHECK:STDOUT: %.loc14_41.2: %u32 = converted %int.convert_checked.loc14_41, %.loc14_41.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc14_27: init %i16 = call %Uint32ToInt16.ref.loc14(%.loc14_41.2) [template = constants.%.46] -// CHECK:STDOUT: %.loc14_45.1: %i16 = value_of_initializer %int.convert_checked.loc14_27 [template = constants.%.46] -// CHECK:STDOUT: %.loc14_45.2: %i16 = converted %int.convert_checked.loc14_27, %.loc14_45.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc14_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_42.3: = bound_method %.loc14_42.1, %.loc14_42.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc14_42.4: = specific_function %.loc14_42.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc14_41: init %u32 = call %Int32ToUint32.ref.loc14(%.loc14_42.6) [template = constants.%.48] +// CHECK:STDOUT: %.loc14_41.1: %u32 = value_of_initializer %int.convert_checked.loc14_41 [template = constants.%.48] +// CHECK:STDOUT: %.loc14_41.2: %u32 = converted %int.convert_checked.loc14_41, %.loc14_41.1 [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc14_27: init %i16 = call %Uint32ToInt16.ref.loc14(%.loc14_41.2) [template = constants.%.50] +// CHECK:STDOUT: %.loc14_45.1: %i16 = value_of_initializer %int.convert_checked.loc14_27 [template = constants.%.50] +// CHECK:STDOUT: %.loc14_45.2: %i16 = converted %int.convert_checked.loc14_27, %.loc14_45.1 [template = constants.%.50] // CHECK:STDOUT: %g: %i16 = bind_name g, %.loc14_45.2 // CHECK:STDOUT: %Uint32ToInt16.ref.loc15: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc15_42.1: Core.IntLiteral = int_value 32767 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_42.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_42.3: = bound_method %.loc15_42.1, %.loc15_42.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_42.4: = specific_function %.loc15_42.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc15_42: init %i32 = call %.loc15_42.4(%.loc15_42.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc15_42.5: %i32 = value_of_initializer %int.convert_checked.loc15_42 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_42.6: %i32 = converted %.loc15_42.1, %.loc15_42.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc15_41: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_42.6) [template = constants.%.47] -// CHECK:STDOUT: %.loc15_41.1: %u32 = value_of_initializer %int.convert_checked.loc15_41 [template = constants.%.47] -// CHECK:STDOUT: %.loc15_41.2: %u32 = converted %int.convert_checked.loc15_41, %.loc15_41.1 [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc15_27: init %i16 = call %Uint32ToInt16.ref.loc15(%.loc15_41.2) [template = constants.%.37] -// CHECK:STDOUT: %.loc15_50.1: %i16 = value_of_initializer %int.convert_checked.loc15_27 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_50.2: %i16 = converted %int.convert_checked.loc15_27, %.loc15_50.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_42.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_42.3: = bound_method %.loc15_42.1, %.loc15_42.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc15_42.4: = specific_function %.loc15_42.3, @Convert.2(constants.%.2) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc15_42: init %i32 = call %.loc15_42.4(%.loc15_42.1) [template = constants.%.40] +// CHECK:STDOUT: %.loc15_42.5: %i32 = value_of_initializer %int.convert_checked.loc15_42 [template = constants.%.40] +// CHECK:STDOUT: %.loc15_42.6: %i32 = converted %.loc15_42.1, %.loc15_42.5 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc15_41: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_42.6) [template = constants.%.51] +// CHECK:STDOUT: %.loc15_41.1: %u32 = value_of_initializer %int.convert_checked.loc15_41 [template = constants.%.51] +// CHECK:STDOUT: %.loc15_41.2: %u32 = converted %int.convert_checked.loc15_41, %.loc15_41.1 [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked.loc15_27: init %i16 = call %Uint32ToInt16.ref.loc15(%.loc15_41.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc15_50.1: %i16 = value_of_initializer %int.convert_checked.loc15_27 [template = constants.%.41] +// CHECK:STDOUT: %.loc15_50.2: %i16 = converted %int.convert_checked.loc15_27, %.loc15_50.1 [template = constants.%.41] // CHECK:STDOUT: %h: %i16 = bind_name h, %.loc15_50.2 // CHECK:STDOUT: %IntLiteralToInt16.ref.loc17: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc17: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %NegateI32.ref.loc17: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc17_70.1: Core.IntLiteral = int_value 32768 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_70.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_70.3: = bound_method %.loc17_70.1, %.loc17_70.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc17_70.4: = specific_function %.loc17_70.3, @Convert.2(constants.%.2) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc17_70: init %i32 = call %.loc17_70.4(%.loc17_70.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc17_70.5: %i32 = value_of_initializer %int.convert_checked.loc17_70 [template = constants.%.41] -// CHECK:STDOUT: %.loc17_70.6: %i32 = converted %.loc17_70.1, %.loc17_70.5 [template = constants.%.41] -// CHECK:STDOUT: %int.snegate.loc17: init %i32 = call %NegateI32.ref.loc17(%.loc17_70.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc17_69.1: %i32 = value_of_initializer %int.snegate.loc17 [template = constants.%.42] -// CHECK:STDOUT: %.loc17_69.2: %i32 = converted %int.snegate.loc17, %.loc17_69.1 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc17_59: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc17(%.loc17_69.2) [template = constants.%.48] -// CHECK:STDOUT: %.loc17_59.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_59 [template = constants.%.48] -// CHECK:STDOUT: %.loc17_59.2: Core.IntLiteral = converted %int.convert_checked.loc17_59, %.loc17_59.1 [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc17_41: init %i16 = call %IntLiteralToInt16.ref.loc17(%.loc17_59.2) [template = constants.%.43] -// CHECK:STDOUT: %.loc17_79.1: %i16 = value_of_initializer %int.convert_checked.loc17_41 [template = constants.%.43] -// CHECK:STDOUT: %.loc17_79.2: %i16 = converted %int.convert_checked.loc17_41, %.loc17_79.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc17_70.1: Core.IntLiteral = int_value 32768 [template = constants.%.42] +// CHECK:STDOUT: %.loc17_70.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_70.3: = bound_method %.loc17_70.1, %.loc17_70.2 [template = constants.%.43] +// CHECK:STDOUT: %.loc17_70.4: = specific_function %.loc17_70.3, @Convert.2(constants.%.2) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc17_70: init %i32 = call %.loc17_70.4(%.loc17_70.1) [template = constants.%.45] +// CHECK:STDOUT: %.loc17_70.5: %i32 = value_of_initializer %int.convert_checked.loc17_70 [template = constants.%.45] +// CHECK:STDOUT: %.loc17_70.6: %i32 = converted %.loc17_70.1, %.loc17_70.5 [template = constants.%.45] +// CHECK:STDOUT: %int.snegate.loc17: init %i32 = call %NegateI32.ref.loc17(%.loc17_70.6) [template = constants.%.46] +// CHECK:STDOUT: %.loc17_69.1: %i32 = value_of_initializer %int.snegate.loc17 [template = constants.%.46] +// CHECK:STDOUT: %.loc17_69.2: %i32 = converted %int.snegate.loc17, %.loc17_69.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc17_59: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc17(%.loc17_69.2) [template = constants.%.52] +// CHECK:STDOUT: %.loc17_59.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_59 [template = constants.%.52] +// CHECK:STDOUT: %.loc17_59.2: Core.IntLiteral = converted %int.convert_checked.loc17_59, %.loc17_59.1 [template = constants.%.52] +// CHECK:STDOUT: %int.convert_checked.loc17_41: init %i16 = call %IntLiteralToInt16.ref.loc17(%.loc17_59.2) [template = constants.%.47] +// CHECK:STDOUT: %.loc17_79.1: %i16 = value_of_initializer %int.convert_checked.loc17_41 [template = constants.%.47] +// CHECK:STDOUT: %.loc17_79.2: %i16 = converted %int.convert_checked.loc17_41, %.loc17_79.1 [template = constants.%.47] // CHECK:STDOUT: %lit_i16_min: %i16 = bind_name lit_i16_min, %.loc17_79.2 // CHECK:STDOUT: %IntLiteralToInt16.ref.loc18: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc18: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] -// CHECK:STDOUT: %.loc18_60.1: Core.IntLiteral = int_value 32767 [template = constants.%.33] -// CHECK:STDOUT: %.loc18_60.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_60.3: = bound_method %.loc18_60.1, %.loc18_60.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_60.4: = specific_function %.loc18_60.3, @Convert.2(constants.%.2) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc18_60: init %i32 = call %.loc18_60.4(%.loc18_60.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc18_60.5: %i32 = value_of_initializer %int.convert_checked.loc18_60 [template = constants.%.36] -// CHECK:STDOUT: %.loc18_60.6: %i32 = converted %.loc18_60.1, %.loc18_60.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc18_59: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc18(%.loc18_60.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc18_59.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc18_59 [template = constants.%.33] -// CHECK:STDOUT: %.loc18_59.2: Core.IntLiteral = converted %int.convert_checked.loc18_59, %.loc18_59.1 [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc18_41: init %i16 = call %IntLiteralToInt16.ref.loc18(%.loc18_59.2) [template = constants.%.37] -// CHECK:STDOUT: %.loc18_68.1: %i16 = value_of_initializer %int.convert_checked.loc18_41 [template = constants.%.37] -// CHECK:STDOUT: %.loc18_68.2: %i16 = converted %int.convert_checked.loc18_41, %.loc18_68.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc18_60.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] +// CHECK:STDOUT: %.loc18_60.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_60.3: = bound_method %.loc18_60.1, %.loc18_60.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc18_60.4: = specific_function %.loc18_60.3, @Convert.2(constants.%.2) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc18_60: init %i32 = call %.loc18_60.4(%.loc18_60.1) [template = constants.%.40] +// CHECK:STDOUT: %.loc18_60.5: %i32 = value_of_initializer %int.convert_checked.loc18_60 [template = constants.%.40] +// CHECK:STDOUT: %.loc18_60.6: %i32 = converted %.loc18_60.1, %.loc18_60.5 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc18_59: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc18(%.loc18_60.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc18_59.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc18_59 [template = constants.%.37] +// CHECK:STDOUT: %.loc18_59.2: Core.IntLiteral = converted %int.convert_checked.loc18_59, %.loc18_59.1 [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc18_41: init %i16 = call %IntLiteralToInt16.ref.loc18(%.loc18_59.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc18_68.1: %i16 = value_of_initializer %int.convert_checked.loc18_41 [template = constants.%.41] +// CHECK:STDOUT: %.loc18_68.2: %i16 = converted %int.convert_checked.loc18_41, %.loc18_68.1 [template = constants.%.41] // CHECK:STDOUT: %lit_i16_max: %i16 = bind_name lit_i16_max, %.loc18_68.2 // CHECK:STDOUT: %IntLiteralToUint16.ref.loc20: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc20: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] // CHECK:STDOUT: %.loc20_61.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_61.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_61.3: = bound_method %.loc20_61.1, %.loc20_61.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc20_61.4: = specific_function %.loc20_61.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc20_61: init %i32 = call %.loc20_61.4(%.loc20_61.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc20_61.5: %i32 = value_of_initializer %int.convert_checked.loc20_61 [template = constants.%.26] -// CHECK:STDOUT: %.loc20_61.6: %i32 = converted %.loc20_61.1, %.loc20_61.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc20_61.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc20_61.3: = bound_method %.loc20_61.1, %.loc20_61.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc20_61.4: = specific_function %.loc20_61.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc20_61: init %i32 = call %.loc20_61.4(%.loc20_61.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc20_61.5: %i32 = value_of_initializer %int.convert_checked.loc20_61 [template = constants.%.30] +// CHECK:STDOUT: %.loc20_61.6: %i32 = converted %.loc20_61.1, %.loc20_61.5 [template = constants.%.30] // CHECK:STDOUT: %int.convert_checked.loc20_60: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc20(%.loc20_61.6) [template = constants.%.3] // CHECK:STDOUT: %.loc20_60.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc20_60 [template = constants.%.3] // CHECK:STDOUT: %.loc20_60.2: Core.IntLiteral = converted %int.convert_checked.loc20_60, %.loc20_60.1 [template = constants.%.3] -// CHECK:STDOUT: %int.convert_checked.loc20_42: init %u16 = call %IntLiteralToUint16.ref.loc20(%.loc20_60.2) [template = constants.%.27] -// CHECK:STDOUT: %.loc20_64.1: %u16 = value_of_initializer %int.convert_checked.loc20_42 [template = constants.%.27] -// CHECK:STDOUT: %.loc20_64.2: %u16 = converted %int.convert_checked.loc20_42, %.loc20_64.1 [template = constants.%.27] +// CHECK:STDOUT: %int.convert_checked.loc20_42: init %u16 = call %IntLiteralToUint16.ref.loc20(%.loc20_60.2) [template = constants.%.31] +// CHECK:STDOUT: %.loc20_64.1: %u16 = value_of_initializer %int.convert_checked.loc20_42 [template = constants.%.31] +// CHECK:STDOUT: %.loc20_64.2: %u16 = converted %int.convert_checked.loc20_42, %.loc20_64.1 [template = constants.%.31] // CHECK:STDOUT: %lit_u16_min: %u16 = bind_name lit_u16_min, %.loc20_64.2 // CHECK:STDOUT: %IntLiteralToUint16.ref.loc21: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc21: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] -// CHECK:STDOUT: %.loc21_61.1: Core.IntLiteral = int_value 65535 [template = constants.%.28] -// CHECK:STDOUT: %.loc21_61.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_61.3: = bound_method %.loc21_61.1, %.loc21_61.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_61.4: = specific_function %.loc21_61.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc21_61: init %i32 = call %.loc21_61.4(%.loc21_61.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc21_61.5: %i32 = value_of_initializer %int.convert_checked.loc21_61 [template = constants.%.31] -// CHECK:STDOUT: %.loc21_61.6: %i32 = converted %.loc21_61.1, %.loc21_61.5 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc21_60: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc21(%.loc21_61.6) [template = constants.%.28] -// CHECK:STDOUT: %.loc21_60.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc21_60 [template = constants.%.28] -// CHECK:STDOUT: %.loc21_60.2: Core.IntLiteral = converted %int.convert_checked.loc21_60, %.loc21_60.1 [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc21_42: init %u16 = call %IntLiteralToUint16.ref.loc21(%.loc21_60.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc21_69.1: %u16 = value_of_initializer %int.convert_checked.loc21_42 [template = constants.%.32] -// CHECK:STDOUT: %.loc21_69.2: %u16 = converted %int.convert_checked.loc21_42, %.loc21_69.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc21_61.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] +// CHECK:STDOUT: %.loc21_61.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_61.3: = bound_method %.loc21_61.1, %.loc21_61.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc21_61.4: = specific_function %.loc21_61.3, @Convert.2(constants.%.2) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc21_61: init %i32 = call %.loc21_61.4(%.loc21_61.1) [template = constants.%.35] +// CHECK:STDOUT: %.loc21_61.5: %i32 = value_of_initializer %int.convert_checked.loc21_61 [template = constants.%.35] +// CHECK:STDOUT: %.loc21_61.6: %i32 = converted %.loc21_61.1, %.loc21_61.5 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc21_60: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc21(%.loc21_61.6) [template = constants.%.32] +// CHECK:STDOUT: %.loc21_60.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc21_60 [template = constants.%.32] +// CHECK:STDOUT: %.loc21_60.2: Core.IntLiteral = converted %int.convert_checked.loc21_60, %.loc21_60.1 [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc21_42: init %u16 = call %IntLiteralToUint16.ref.loc21(%.loc21_60.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc21_69.1: %u16 = value_of_initializer %int.convert_checked.loc21_42 [template = constants.%.36] +// CHECK:STDOUT: %.loc21_69.2: %u16 = converted %int.convert_checked.loc21_42, %.loc21_69.1 [template = constants.%.36] // CHECK:STDOUT: %lit_u16_max: %u16 = bind_name lit_u16_max, %.loc21_69.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1538,34 +1538,34 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: %u32 = int_value 0 [template] -// CHECK:STDOUT: %.28: %u64 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: %u32 = int_value 0 [template] +// CHECK:STDOUT: %.32: %u64 = int_value 0 [template] // CHECK:STDOUT: %AddU32.type: type = fn_type @AddU32 [template] // CHECK:STDOUT: %AddU32: %AddU32.type = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: = bound_method %.29, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.33: %u32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.34: %u32 = int_value 4294967294 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.39: %u32 = int_value 1 [template] -// CHECK:STDOUT: %.40: %u32 = int_value 4294967295 [template] -// CHECK:STDOUT: %.41: %u64 = int_value 4294967295 [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.37: %u32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.38: %u32 = int_value 4294967294 [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.43: %u32 = int_value 1 [template] +// CHECK:STDOUT: %.44: %u32 = int_value 4294967295 [template] +// CHECK:STDOUT: %.45: %u64 = int_value 4294967295 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] // CHECK:STDOUT: %Uint32ToInt64.type: type = fn_type @Uint32ToInt64 [template] // CHECK:STDOUT: %Uint32ToInt64: %Uint32ToInt64.type = struct_value () [template] -// CHECK:STDOUT: %.42: %i64 = int_value 0 [template] -// CHECK:STDOUT: %.43: %i64 = int_value 4294967295 [template] +// CHECK:STDOUT: %.46: %i64 = int_value 0 [template] +// CHECK:STDOUT: %.47: %i64 = int_value 4294967295 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1661,126 +1661,126 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint64.ref.loc5: %Uint32ToUint64.type = name_ref Uint32ToUint64, imports.%import_ref.19 [template = constants.%Uint32ToUint64] // CHECK:STDOUT: %Int32ToUint32.ref.loc5: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc5_43.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc5_43.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_43.3: = bound_method %.loc5_43.1, %.loc5_43.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc5_43.4: = specific_function %.loc5_43.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc5_43: init %i32 = call %.loc5_43.4(%.loc5_43.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc5_43.5: %i32 = value_of_initializer %int.convert_checked.loc5_43 [template = constants.%.26] -// CHECK:STDOUT: %.loc5_43.6: %i32 = converted %.loc5_43.1, %.loc5_43.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc5_42: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_43.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_42, %.loc5_42.1 [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %u64 = call %Uint32ToUint64.ref.loc5(%.loc5_42.2) [template = constants.%.28] -// CHECK:STDOUT: %.loc5_46.1: %u64 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.28] -// CHECK:STDOUT: %.loc5_46.2: %u64 = converted %int.convert_checked.loc5_28, %.loc5_46.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc5_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_43.3: = bound_method %.loc5_43.1, %.loc5_43.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc5_43.4: = specific_function %.loc5_43.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc5_43: init %i32 = call %.loc5_43.4(%.loc5_43.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc5_43.5: %i32 = value_of_initializer %int.convert_checked.loc5_43 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_43.6: %i32 = converted %.loc5_43.1, %.loc5_43.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc5_42: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_43.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_42, %.loc5_42.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %u64 = call %Uint32ToUint64.ref.loc5(%.loc5_42.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc5_46.1: %u64 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.32] +// CHECK:STDOUT: %.loc5_46.2: %u64 = converted %int.convert_checked.loc5_28, %.loc5_46.1 [template = constants.%.32] // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_46.2 // CHECK:STDOUT: %Uint32ToUint64.ref.loc6: %Uint32ToUint64.type = name_ref Uint32ToUint64, imports.%import_ref.19 [template = constants.%Uint32ToUint64] // CHECK:STDOUT: %AddU32.ref.loc7: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %AddU32.ref.loc8: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc8_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_26.3: = bound_method %.loc8_26.1, %.loc8_26.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_26.4: = specific_function %.loc8_26.3, @Convert.2(constants.%.2) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i32 = call %.loc8_26.4(%.loc8_26.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_26.5: %i32 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_26.6: %i32 = converted %.loc8_26.1, %.loc8_26.5 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_25: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_26.3: = bound_method %.loc8_26.1, %.loc8_26.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_26.4: = specific_function %.loc8_26.3, @Convert.2(constants.%.2) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i32 = call %.loc8_26.4(%.loc8_26.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc8_26.5: %i32 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.36] +// CHECK:STDOUT: %.loc8_26.6: %i32 = converted %.loc8_26.1, %.loc8_26.5 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc8_25: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.6) [template = constants.%.37] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc8_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_54.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_54.3: = bound_method %.loc8_54.1, %.loc8_54.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_54.4: = specific_function %.loc8_54.3, @Convert.2(constants.%.2) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc8_54: init %i32 = call %.loc8_54.4(%.loc8_54.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc8_54.5: %i32 = value_of_initializer %int.convert_checked.loc8_54 [template = constants.%.32] -// CHECK:STDOUT: %.loc8_54.6: %i32 = converted %.loc8_54.1, %.loc8_54.5 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_53: init %u32 = call %Int32ToUint32.ref.loc8_40(%.loc8_54.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_25.1: %u32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_25.2: %u32 = converted %int.convert_checked.loc8_25, %.loc8_25.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_53.1: %u32 = value_of_initializer %int.convert_checked.loc8_53 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_53.2: %u32 = converted %int.convert_checked.loc8_53, %.loc8_53.1 [template = constants.%.33] -// CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_25.2, %.loc8_53.2) [template = constants.%.34] +// CHECK:STDOUT: %.loc8_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_54.3: = bound_method %.loc8_54.1, %.loc8_54.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_54.4: = specific_function %.loc8_54.3, @Convert.2(constants.%.2) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc8_54: init %i32 = call %.loc8_54.4(%.loc8_54.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc8_54.5: %i32 = value_of_initializer %int.convert_checked.loc8_54 [template = constants.%.36] +// CHECK:STDOUT: %.loc8_54.6: %i32 = converted %.loc8_54.1, %.loc8_54.5 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc8_53: init %u32 = call %Int32ToUint32.ref.loc8_40(%.loc8_54.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc8_25.1: %u32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_25.2: %u32 = converted %int.convert_checked.loc8_25, %.loc8_25.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_53.1: %u32 = value_of_initializer %int.convert_checked.loc8_53 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_53.2: %u32 = converted %int.convert_checked.loc8_53, %.loc8_53.1 [template = constants.%.37] +// CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_25.2, %.loc8_53.2) [template = constants.%.38] // CHECK:STDOUT: %Int32ToUint32.ref.loc9: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_19.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_19.3: = bound_method %.loc9_19.1, %.loc9_19.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_19.4: = specific_function %.loc9_19.3, @Convert.2(constants.%.2) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc9_19: init %i32 = call %.loc9_19.4(%.loc9_19.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc9_19.5: %i32 = value_of_initializer %int.convert_checked.loc9_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_19.6: %i32 = converted %.loc9_19.1, %.loc9_19.5 [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc9_18: init %u32 = call %Int32ToUint32.ref.loc9(%.loc9_19.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc8_11.1: %u32 = value_of_initializer %int.uadd.loc8 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_11.2: %u32 = converted %int.uadd.loc8, %.loc8_11.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_18.1: %u32 = value_of_initializer %int.convert_checked.loc9_18 [template = constants.%.39] -// CHECK:STDOUT: %.loc9_18.2: %u32 = converted %int.convert_checked.loc9_18, %.loc9_18.1 [template = constants.%.39] -// CHECK:STDOUT: %int.uadd.loc7: init %u32 = call %AddU32.ref.loc7(%.loc8_11.2, %.loc9_18.2) [template = constants.%.40] -// CHECK:STDOUT: %.loc7_9.1: %u32 = value_of_initializer %int.uadd.loc7 [template = constants.%.40] -// CHECK:STDOUT: %.loc7_9.2: %u32 = converted %int.uadd.loc7, %.loc7_9.1 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc6: init %u64 = call %Uint32ToUint64.ref.loc6(%.loc7_9.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc9_23.1: %u64 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.41] -// CHECK:STDOUT: %.loc9_23.2: %u64 = converted %int.convert_checked.loc6, %.loc9_23.1 [template = constants.%.41] +// CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 1 [template = constants.%.39] +// CHECK:STDOUT: %.loc9_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_19.3: = bound_method %.loc9_19.1, %.loc9_19.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc9_19.4: = specific_function %.loc9_19.3, @Convert.2(constants.%.2) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc9_19: init %i32 = call %.loc9_19.4(%.loc9_19.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc9_19.5: %i32 = value_of_initializer %int.convert_checked.loc9_19 [template = constants.%.42] +// CHECK:STDOUT: %.loc9_19.6: %i32 = converted %.loc9_19.1, %.loc9_19.5 [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc9_18: init %u32 = call %Int32ToUint32.ref.loc9(%.loc9_19.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc8_11.1: %u32 = value_of_initializer %int.uadd.loc8 [template = constants.%.38] +// CHECK:STDOUT: %.loc8_11.2: %u32 = converted %int.uadd.loc8, %.loc8_11.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_18.1: %u32 = value_of_initializer %int.convert_checked.loc9_18 [template = constants.%.43] +// CHECK:STDOUT: %.loc9_18.2: %u32 = converted %int.convert_checked.loc9_18, %.loc9_18.1 [template = constants.%.43] +// CHECK:STDOUT: %int.uadd.loc7: init %u32 = call %AddU32.ref.loc7(%.loc8_11.2, %.loc9_18.2) [template = constants.%.44] +// CHECK:STDOUT: %.loc7_9.1: %u32 = value_of_initializer %int.uadd.loc7 [template = constants.%.44] +// CHECK:STDOUT: %.loc7_9.2: %u32 = converted %int.uadd.loc7, %.loc7_9.1 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc6: init %u64 = call %Uint32ToUint64.ref.loc6(%.loc7_9.2) [template = constants.%.45] +// CHECK:STDOUT: %.loc9_23.1: %u64 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.45] +// CHECK:STDOUT: %.loc9_23.2: %u64 = converted %int.convert_checked.loc6, %.loc9_23.1 [template = constants.%.45] // CHECK:STDOUT: %b: %u64 = bind_name b, %.loc9_23.2 // CHECK:STDOUT: %Uint32ToInt64.ref.loc11: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc11_42.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_42.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_42.3: = bound_method %.loc11_42.1, %.loc11_42.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc11_42.4: = specific_function %.loc11_42.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc11_42: init %i32 = call %.loc11_42.4(%.loc11_42.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc11_42.5: %i32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_42.6: %i32 = converted %.loc11_42.1, %.loc11_42.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_41: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_42.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_41.1: %u32 = value_of_initializer %int.convert_checked.loc11_41 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_41.2: %u32 = converted %int.convert_checked.loc11_41, %.loc11_41.1 [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i64 = call %Uint32ToInt64.ref.loc11(%.loc11_41.2) [template = constants.%.42] -// CHECK:STDOUT: %.loc11_45.1: %i64 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.42] -// CHECK:STDOUT: %.loc11_45.2: %i64 = converted %int.convert_checked.loc11_27, %.loc11_45.1 [template = constants.%.42] +// CHECK:STDOUT: %.loc11_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_42.3: = bound_method %.loc11_42.1, %.loc11_42.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc11_42.4: = specific_function %.loc11_42.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc11_42: init %i32 = call %.loc11_42.4(%.loc11_42.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc11_42.5: %i32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_42.6: %i32 = converted %.loc11_42.1, %.loc11_42.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_41: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_42.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_41.1: %u32 = value_of_initializer %int.convert_checked.loc11_41 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_41.2: %u32 = converted %int.convert_checked.loc11_41, %.loc11_41.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i64 = call %Uint32ToInt64.ref.loc11(%.loc11_41.2) [template = constants.%.46] +// CHECK:STDOUT: %.loc11_45.1: %i64 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.46] +// CHECK:STDOUT: %.loc11_45.2: %i64 = converted %int.convert_checked.loc11_27, %.loc11_45.1 [template = constants.%.46] // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc11_45.2 // CHECK:STDOUT: %Uint32ToInt64.ref.loc12: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %AddU32.ref.loc13: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %AddU32.ref.loc14: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc14_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_26.3: = bound_method %.loc14_26.1, %.loc14_26.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_26.4: = specific_function %.loc14_26.3, @Convert.2(constants.%.2) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_26.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc14_26.5: %i32 = value_of_initializer %int.convert_checked.loc14_26 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_26.6: %i32 = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_25: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_26.3: = bound_method %.loc14_26.1, %.loc14_26.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_26.4: = specific_function %.loc14_26.3, @Convert.2(constants.%.2) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_26.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc14_26.5: %i32 = value_of_initializer %int.convert_checked.loc14_26 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_26.6: %i32 = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc14_25: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.6) [template = constants.%.37] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc14_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_54.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_54.3: = bound_method %.loc14_54.1, %.loc14_54.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_54.4: = specific_function %.loc14_54.3, @Convert.2(constants.%.2) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc14_54: init %i32 = call %.loc14_54.4(%.loc14_54.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc14_54.5: %i32 = value_of_initializer %int.convert_checked.loc14_54 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_54.6: %i32 = converted %.loc14_54.1, %.loc14_54.5 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_53: init %u32 = call %Int32ToUint32.ref.loc14_40(%.loc14_54.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_25.1: %u32 = value_of_initializer %int.convert_checked.loc14_25 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_25.2: %u32 = converted %int.convert_checked.loc14_25, %.loc14_25.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_53.1: %u32 = value_of_initializer %int.convert_checked.loc14_53 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_53.2: %u32 = converted %int.convert_checked.loc14_53, %.loc14_53.1 [template = constants.%.33] -// CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_25.2, %.loc14_53.2) [template = constants.%.34] +// CHECK:STDOUT: %.loc14_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_54.3: = bound_method %.loc14_54.1, %.loc14_54.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_54.4: = specific_function %.loc14_54.3, @Convert.2(constants.%.2) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc14_54: init %i32 = call %.loc14_54.4(%.loc14_54.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc14_54.5: %i32 = value_of_initializer %int.convert_checked.loc14_54 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_54.6: %i32 = converted %.loc14_54.1, %.loc14_54.5 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc14_53: init %u32 = call %Int32ToUint32.ref.loc14_40(%.loc14_54.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_25.1: %u32 = value_of_initializer %int.convert_checked.loc14_25 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_25.2: %u32 = converted %int.convert_checked.loc14_25, %.loc14_25.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_53.1: %u32 = value_of_initializer %int.convert_checked.loc14_53 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_53.2: %u32 = converted %int.convert_checked.loc14_53, %.loc14_53.1 [template = constants.%.37] +// CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_25.2, %.loc14_53.2) [template = constants.%.38] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_19.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_19.3: = bound_method %.loc15_19.1, %.loc15_19.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_19.4: = specific_function %.loc15_19.3, @Convert.2(constants.%.2) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc15_19: init %i32 = call %.loc15_19.4(%.loc15_19.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc15_19.5: %i32 = value_of_initializer %int.convert_checked.loc15_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_19.6: %i32 = converted %.loc15_19.1, %.loc15_19.5 [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc15_18: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_19.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc14_11.1: %u32 = value_of_initializer %int.uadd.loc14 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_11.2: %u32 = converted %int.uadd.loc14, %.loc14_11.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc15_18.1: %u32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.39] -// CHECK:STDOUT: %.loc15_18.2: %u32 = converted %int.convert_checked.loc15_18, %.loc15_18.1 [template = constants.%.39] -// CHECK:STDOUT: %int.uadd.loc13: init %u32 = call %AddU32.ref.loc13(%.loc14_11.2, %.loc15_18.2) [template = constants.%.40] -// CHECK:STDOUT: %.loc13_9.1: %u32 = value_of_initializer %int.uadd.loc13 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_9.2: %u32 = converted %int.uadd.loc13, %.loc13_9.1 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i64 = call %Uint32ToInt64.ref.loc12(%.loc13_9.2) [template = constants.%.43] -// CHECK:STDOUT: %.loc15_23.1: %i64 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc15_23.2: %i64 = converted %int.convert_checked.loc12, %.loc15_23.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 1 [template = constants.%.39] +// CHECK:STDOUT: %.loc15_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_19.3: = bound_method %.loc15_19.1, %.loc15_19.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc15_19.4: = specific_function %.loc15_19.3, @Convert.2(constants.%.2) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc15_19: init %i32 = call %.loc15_19.4(%.loc15_19.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc15_19.5: %i32 = value_of_initializer %int.convert_checked.loc15_19 [template = constants.%.42] +// CHECK:STDOUT: %.loc15_19.6: %i32 = converted %.loc15_19.1, %.loc15_19.5 [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc15_18: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_19.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc14_11.1: %u32 = value_of_initializer %int.uadd.loc14 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_11.2: %u32 = converted %int.uadd.loc14, %.loc14_11.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc15_18.1: %u32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.43] +// CHECK:STDOUT: %.loc15_18.2: %u32 = converted %int.convert_checked.loc15_18, %.loc15_18.1 [template = constants.%.43] +// CHECK:STDOUT: %int.uadd.loc13: init %u32 = call %AddU32.ref.loc13(%.loc14_11.2, %.loc15_18.2) [template = constants.%.44] +// CHECK:STDOUT: %.loc13_9.1: %u32 = value_of_initializer %int.uadd.loc13 [template = constants.%.44] +// CHECK:STDOUT: %.loc13_9.2: %u32 = converted %int.uadd.loc13, %.loc13_9.1 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i64 = call %Uint32ToInt64.ref.loc12(%.loc13_9.2) [template = constants.%.47] +// CHECK:STDOUT: %.loc15_23.1: %i64 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.47] +// CHECK:STDOUT: %.loc15_23.2: %i64 = converted %int.convert_checked.loc12, %.loc15_23.1 [template = constants.%.47] // CHECK:STDOUT: %d: %i64 = bind_name d, %.loc15_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1800,16 +1800,16 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: %u64 = int_value 0 [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.29: = bound_method %.28, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.32: %u64 = int_value 2147483647 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: %u64 = int_value 0 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.36: %u64 = int_value 2147483647 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %i64: type = int_type signed, %.1 [template] @@ -1819,14 +1819,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32: %SubI32.type = struct_value () [template] // CHECK:STDOUT: %NegateI32.type: type = fn_type @NegateI32 [template] // CHECK:STDOUT: %NegateI32: %NegateI32.type = struct_value () [template] -// CHECK:STDOUT: %.33: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.38: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.39: %i64 = int_value -2147483648 [template] -// CHECK:STDOUT: %.40: %i64 = int_value 2147483647 [template] +// CHECK:STDOUT: %.37: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.42: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.43: %i64 = int_value -2147483648 [template] +// CHECK:STDOUT: %.44: %i64 = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1921,66 +1921,66 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint64.ref.loc5: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] // CHECK:STDOUT: %.loc5_28.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc5_28.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_28.3: = bound_method %.loc5_28.1, %.loc5_28.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc5_28.4: = specific_function %.loc5_28.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.26] -// CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc5_27: init %u64 = call %Int32ToUint64.ref.loc5(%.loc5_28.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc5_30.1: %u64 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.27] -// CHECK:STDOUT: %.loc5_30.2: %u64 = converted %int.convert_checked.loc5_27, %.loc5_30.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_28.3: = bound_method %.loc5_28.1, %.loc5_28.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc5_28.4: = specific_function %.loc5_28.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc5_27: init %u64 = call %Int32ToUint64.ref.loc5(%.loc5_28.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.1: %u64 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.2: %u64 = converted %int.convert_checked.loc5_27, %.loc5_30.1 [template = constants.%.31] // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint64.ref.loc6: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] -// CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_28.1, %.loc6_28.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc6_27: init %u64 = call %Int32ToUint64.ref.loc6(%.loc6_28.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc6_40.1: %u64 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_40.2: %u64 = converted %int.convert_checked.loc6_27, %.loc6_40.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_28.1, %.loc6_28.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.2) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.35] +// CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.35] +// CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc6_27: init %u64 = call %Int32ToUint64.ref.loc6(%.loc6_28.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc6_40.1: %u64 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.36] +// CHECK:STDOUT: %.loc6_40.2: %u64 = converted %int.convert_checked.loc6_27, %.loc6_40.1 [template = constants.%.36] // CHECK:STDOUT: %b: %u64 = bind_name b, %.loc6_40.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc8: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %NegateI32.ref: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] -// CHECK:STDOUT: %.loc8_44.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_44.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_44.3: = bound_method %.loc8_44.1, %.loc8_44.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_44.4: = specific_function %.loc8_44.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc8_44: init %i32 = call %.loc8_44.4(%.loc8_44.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc8_44.5: %i32 = value_of_initializer %int.convert_checked.loc8_44 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_44.6: %i32 = converted %.loc8_44.1, %.loc8_44.5 [template = constants.%.31] -// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc8_44.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_58.1: Core.IntLiteral = int_value 1 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_43.1: %i32 = value_of_initializer %int.snegate [template = constants.%.33] -// CHECK:STDOUT: %.loc8_43.2: %i32 = converted %int.snegate, %.loc8_43.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_58.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_58.3: = bound_method %.loc8_58.1, %.loc8_58.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc8_58.4: = specific_function %.loc8_58.3, @Convert.2(constants.%.2) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_58: init %i32 = call %.loc8_58.4(%.loc8_58.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_58.5: %i32 = value_of_initializer %int.convert_checked.loc8_58 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_58.6: %i32 = converted %.loc8_58.1, %.loc8_58.5 [template = constants.%.37] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc8_43.2, %.loc8_58.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc8_33.1: %i32 = value_of_initializer %int.ssub [template = constants.%.38] -// CHECK:STDOUT: %.loc8_33.2: %i32 = converted %int.ssub, %.loc8_33.1 [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i64 = call %Int32ToInt64.ref.loc8(%.loc8_33.2) [template = constants.%.39] -// CHECK:STDOUT: %.loc8_61.1: %i64 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.39] -// CHECK:STDOUT: %.loc8_61.2: %i64 = converted %int.convert_checked.loc8_26, %.loc8_61.1 [template = constants.%.39] +// CHECK:STDOUT: %.loc8_44.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_44.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_44.3: = bound_method %.loc8_44.1, %.loc8_44.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_44.4: = specific_function %.loc8_44.3, @Convert.2(constants.%.2) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc8_44: init %i32 = call %.loc8_44.4(%.loc8_44.1) [template = constants.%.35] +// CHECK:STDOUT: %.loc8_44.5: %i32 = value_of_initializer %int.convert_checked.loc8_44 [template = constants.%.35] +// CHECK:STDOUT: %.loc8_44.6: %i32 = converted %.loc8_44.1, %.loc8_44.5 [template = constants.%.35] +// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc8_44.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc8_58.1: Core.IntLiteral = int_value 1 [template = constants.%.38] +// CHECK:STDOUT: %.loc8_43.1: %i32 = value_of_initializer %int.snegate [template = constants.%.37] +// CHECK:STDOUT: %.loc8_43.2: %i32 = converted %int.snegate, %.loc8_43.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_58.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_58.3: = bound_method %.loc8_58.1, %.loc8_58.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc8_58.4: = specific_function %.loc8_58.3, @Convert.2(constants.%.2) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc8_58: init %i32 = call %.loc8_58.4(%.loc8_58.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_58.5: %i32 = value_of_initializer %int.convert_checked.loc8_58 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_58.6: %i32 = converted %.loc8_58.1, %.loc8_58.5 [template = constants.%.41] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc8_43.2, %.loc8_58.6) [template = constants.%.42] +// CHECK:STDOUT: %.loc8_33.1: %i32 = value_of_initializer %int.ssub [template = constants.%.42] +// CHECK:STDOUT: %.loc8_33.2: %i32 = converted %int.ssub, %.loc8_33.1 [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i64 = call %Int32ToInt64.ref.loc8(%.loc8_33.2) [template = constants.%.43] +// CHECK:STDOUT: %.loc8_61.1: %i64 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.43] +// CHECK:STDOUT: %.loc8_61.2: %i64 = converted %int.convert_checked.loc8_26, %.loc8_61.1 [template = constants.%.43] // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc8_61.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc9: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] -// CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_27.1, %.loc9_27.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.2) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i64 = call %Int32ToInt64.ref.loc9(%.loc9_27.6) [template = constants.%.40] -// CHECK:STDOUT: %.loc9_39.1: %i64 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.40] -// CHECK:STDOUT: %.loc9_39.2: %i64 = converted %int.convert_checked.loc9_26, %.loc9_39.1 [template = constants.%.40] +// CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_27.1, %.loc9_27.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.2) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i64 = call %Int32ToInt64.ref.loc9(%.loc9_27.6) [template = constants.%.44] +// CHECK:STDOUT: %.loc9_39.1: %i64 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.44] +// CHECK:STDOUT: %.loc9_39.2: %i64 = converted %int.convert_checked.loc9_26, %.loc9_39.1 [template = constants.%.44] // CHECK:STDOUT: %d: %i64 = bind_name d, %.loc9_39.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2003,18 +2003,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %u32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %u32 = int_value 1 [template] -// CHECK:STDOUT: %.32: %u32 = int_value 2147483648 [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2147483648 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %u32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %u32 = int_value 1 [template] +// CHECK:STDOUT: %.36: %u32 = int_value 2147483648 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2093,32 +2093,32 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %AddU32.ref: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc11_26.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_26.1, %.loc11_26.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc11_25: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_26.1, %.loc11_26.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc11_25: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.6) [template = constants.%.30] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] -// CHECK:STDOUT: %.loc12_26.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_26.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_26.3: = bound_method %.loc12_26.1, %.loc12_26.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_26.4: = specific_function %.loc12_26.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_26: init %i32 = call %.loc12_26.4(%.loc12_26.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_26.5: %i32 = value_of_initializer %int.convert_checked.loc12_26 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_26.6: %i32 = converted %.loc12_26.1, %.loc12_26.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_25: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_26.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_25.1: %u32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_25.2: %u32 = converted %int.convert_checked.loc11_25, %.loc11_25.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_25.1: %u32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_25.2: %u32 = converted %int.convert_checked.loc12_25, %.loc12_25.1 [template = constants.%.31] -// CHECK:STDOUT: %int.uadd: init %u32 = call %AddU32.ref(%.loc11_25.2, %.loc12_25.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc11_11.1: %u32 = value_of_initializer %int.uadd [template = constants.%.32] -// CHECK:STDOUT: %.loc11_11.2: %u32 = converted %int.uadd, %.loc11_11.1 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Uint32ToInt32.ref(%.loc11_11.2) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int.convert_checked.loc10, %.loc12_30.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_26.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_26.3: = bound_method %.loc12_26.1, %.loc12_26.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_26.4: = specific_function %.loc12_26.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_26: init %i32 = call %.loc12_26.4(%.loc12_26.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_26.5: %i32 = value_of_initializer %int.convert_checked.loc12_26 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_26.6: %i32 = converted %.loc12_26.1, %.loc12_26.5 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc12_25: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_26.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_25.1: %u32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_25.2: %u32 = converted %int.convert_checked.loc11_25, %.loc11_25.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_25.1: %u32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_25.2: %u32 = converted %int.convert_checked.loc12_25, %.loc12_25.1 [template = constants.%.35] +// CHECK:STDOUT: %int.uadd: init %u32 = call %AddU32.ref(%.loc11_25.2, %.loc12_25.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc11_11.1: %u32 = value_of_initializer %int.uadd [template = constants.%.36] +// CHECK:STDOUT: %.loc11_11.2: %u32 = converted %int.uadd, %.loc11_11.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Uint32ToInt32.ref(%.loc11_11.2) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int.convert_checked.loc10, %.loc12_30.1 [template = constants.%.37] // CHECK:STDOUT: %max_plus_one: %i32 = bind_name max_plus_one, %.loc12_30.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2138,11 +2138,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.27: %i16 = int_value 32768 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %.31: %i16 = int_value 32768 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2215,15 +2215,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %.loc9_38.1: Core.IntLiteral = int_value 32768 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_38.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_38.3: = bound_method %.loc9_38.1, %.loc9_38.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc9_38.4: = specific_function %.loc9_38.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i32 = call %.loc9_38.4(%.loc9_38.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_38.5: %i32 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_38.6: %i32 = converted %.loc9_38.1, %.loc9_38.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i16 = call %Int32ToInt16.ref(%.loc9_38.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_37, %.loc9_45.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_38.3: = bound_method %.loc9_38.1, %.loc9_38.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_38.4: = specific_function %.loc9_38.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i32 = call %.loc9_38.4(%.loc9_38.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_38.5: %i32 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_38.6: %i32 = converted %.loc9_38.1, %.loc9_38.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i16 = call %Int32ToInt16.ref(%.loc9_38.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_37, %.loc9_45.1 [template = constants.%.31] // CHECK:STDOUT: %max_plus_one: %i16 = bind_name max_plus_one, %.loc9_45.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2243,11 +2243,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.27: %u16 = int_value 65536 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %.31: %u16 = int_value 65536 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2320,15 +2320,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Int32ToUint16.ref: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %.loc9_39.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_39.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_39.3: = bound_method %.loc9_39.1, %.loc9_39.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc9_39.4: = specific_function %.loc9_39.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc9_39: init %i32 = call %.loc9_39.4(%.loc9_39.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_39.5: %i32 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_39.6: %i32 = converted %.loc9_39.1, %.loc9_39.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %u16 = call %Int32ToUint16.ref(%.loc9_39.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_48.1: %u16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_48.2: %u16 = converted %int.convert_checked.loc9_38, %.loc9_48.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_39.3: = bound_method %.loc9_39.1, %.loc9_39.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_39.4: = specific_function %.loc9_39.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc9_39: init %i32 = call %.loc9_39.4(%.loc9_39.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_39.5: %i32 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_39.6: %i32 = converted %.loc9_39.1, %.loc9_39.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %u16 = call %Int32ToUint16.ref(%.loc9_39.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_48.1: %u16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_48.2: %u16 = converted %int.convert_checked.loc9_38, %.loc9_48.1 [template = constants.%.31] // CHECK:STDOUT: %max_plus_one: %u16 = bind_name max_plus_one, %.loc9_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2351,12 +2351,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.27: %u32 = int_value 32768 [template] -// CHECK:STDOUT: %.28: %i16 = int_value 32768 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %.31: %u32 = int_value 32768 [template] +// CHECK:STDOUT: %.32: %i16 = int_value 32768 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2432,18 +2432,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToInt16.ref: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 32768 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc9_52: init %u32 = call %Int32ToUint32.ref(%.loc9_53.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_52.1: %u32 = value_of_initializer %int.convert_checked.loc9_52 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_52.2: %u32 = converted %int.convert_checked.loc9_52, %.loc9_52.1 [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i16 = call %Uint32ToInt16.ref(%.loc9_52.2) [template = constants.%.28] -// CHECK:STDOUT: %.loc9_61.1: %i16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_61.2: %i16 = converted %int.convert_checked.loc9_38, %.loc9_61.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc9_52: init %u32 = call %Int32ToUint32.ref(%.loc9_53.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_52.1: %u32 = value_of_initializer %int.convert_checked.loc9_52 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_52.2: %u32 = converted %int.convert_checked.loc9_52, %.loc9_52.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i16 = call %Uint32ToInt16.ref(%.loc9_52.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_61.1: %i16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_61.2: %i16 = converted %int.convert_checked.loc9_38, %.loc9_61.1 [template = constants.%.32] // CHECK:STDOUT: %max_plus_one: %i16 = bind_name max_plus_one, %.loc9_61.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2466,12 +2466,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.27: %u32 = int_value 65536 [template] -// CHECK:STDOUT: %.28: %u16 = int_value 65536 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %.31: %u32 = int_value 65536 [template] +// CHECK:STDOUT: %.32: %u16 = int_value 65536 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2547,18 +2547,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Uint32ToUint16.ref: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc9_54.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_54.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_54.3: = bound_method %.loc9_54.1, %.loc9_54.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc9_54.4: = specific_function %.loc9_54.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc9_54: init %i32 = call %.loc9_54.4(%.loc9_54.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_54.5: %i32 = value_of_initializer %int.convert_checked.loc9_54 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_54.6: %i32 = converted %.loc9_54.1, %.loc9_54.5 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %u32 = call %Int32ToUint32.ref(%.loc9_54.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_53.1: %u32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_53.2: %u32 = converted %int.convert_checked.loc9_53, %.loc9_53.1 [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc9_39: init %u16 = call %Uint32ToUint16.ref(%.loc9_53.2) [template = constants.%.28] -// CHECK:STDOUT: %.loc9_64.1: %u16 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_64.2: %u16 = converted %int.convert_checked.loc9_39, %.loc9_64.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_54.3: = bound_method %.loc9_54.1, %.loc9_54.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_54.4: = specific_function %.loc9_54.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc9_54: init %i32 = call %.loc9_54.4(%.loc9_54.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_54.5: %i32 = value_of_initializer %int.convert_checked.loc9_54 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_54.6: %i32 = converted %.loc9_54.1, %.loc9_54.5 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %u32 = call %Int32ToUint32.ref(%.loc9_54.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_53.1: %u32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_53.2: %u32 = converted %int.convert_checked.loc9_53, %.loc9_53.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_39: init %u16 = call %Uint32ToUint16.ref(%.loc9_53.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_64.1: %u16 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_64.2: %u16 = converted %int.convert_checked.loc9_39, %.loc9_64.1 [template = constants.%.32] // CHECK:STDOUT: %max_plus_one: %u16 = bind_name max_plus_one, %.loc9_64.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2581,15 +2581,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.32: %u16 = int_value 18446744073709551615 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.36: %u16 = int_value 18446744073709551615 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2666,24 +2666,24 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %.loc9_50.1: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.2) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.31] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u16 = call %Int32ToUint16.ref(%.loc9_49.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_56.1: %u16 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_56.2: %u16 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.2) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u16 = call %Int32ToUint16.ref(%.loc9_49.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.1: %u16 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.2: %u16 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.36] // CHECK:STDOUT: %minus_one_to_u16: %u16 = bind_name minus_one_to_u16, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2705,15 +2705,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.31: %u32 = int_value 18446744073709551615 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.35: %u32 = int_value 18446744073709551615 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2790,24 +2790,24 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %.loc9_50.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.29] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.30] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u32 = call %Int32ToUint32.ref(%.loc9_49.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_56.1: %u32 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_56.2: %u32 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.33] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.34] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u32 = call %Int32ToUint32.ref(%.loc9_49.2) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_56.1: %u32 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_56.2: %u32 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.35] // CHECK:STDOUT: %minus_one_to_u32: %u32 = bind_name minus_one_to_u32, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2830,15 +2830,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.32: %u64 = int_value 18446744073709551615 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.36: %u64 = int_value 18446744073709551615 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -2915,24 +2915,24 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] // CHECK:STDOUT: %.loc9_50.1: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc9_53.1: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.2) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.31] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u64 = call %Int32ToUint64.ref(%.loc9_49.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_56.1: %u64 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_56.2: %u64 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_50.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_50.3: = bound_method %.loc9_50.1, %.loc9_50.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_50.4: = specific_function %.loc9_50.3, @Convert.2(constants.%.2) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc9_50: init %i32 = call %.loc9_50.4(%.loc9_50.1) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_50.5: %i32 = value_of_initializer %int.convert_checked.loc9_50 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_50.6: %i32 = converted %.loc9_50.1, %.loc9_50.5 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_53.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_53.3: = bound_method %.loc9_53.1, %.loc9_53.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_53.4: = specific_function %.loc9_53.3, @Convert.2(constants.%.2) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u64 = call %Int32ToUint64.ref(%.loc9_49.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.1: %u64 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.2: %u64 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.36] // CHECK:STDOUT: %minus_one_to_u64: %u64 = bind_name minus_one_to_u64, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2954,12 +2954,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 32769 [template] -// CHECK:STDOUT: %.27: %i32 = int_value -32769 [template] -// CHECK:STDOUT: %.28: %i16 = int_value -32769 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 32769 [template] +// CHECK:STDOUT: %.31: %i32 = int_value -32769 [template] +// CHECK:STDOUT: %.32: %i16 = int_value -32769 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -3035,18 +3035,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] // CHECK:STDOUT: %.loc9_49.1: Core.IntLiteral = int_value 32769 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_49.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_49.3: = bound_method %.loc9_49.1, %.loc9_49.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc9_49.4: = specific_function %.loc9_49.3, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc9_49: init %i32 = call %.loc9_49.4(%.loc9_49.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_49.5: %i32 = value_of_initializer %int.convert_checked.loc9_49 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_49.6: %i32 = converted %.loc9_49.1, %.loc9_49.5 [template = constants.%.26] -// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc9_49.6) [template = constants.%.27] -// CHECK:STDOUT: %.loc9_48.1: %i32 = value_of_initializer %int.snegate [template = constants.%.27] -// CHECK:STDOUT: %.loc9_48.2: %i32 = converted %int.snegate, %.loc9_48.1 [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i16 = call %Int32ToInt16.ref(%.loc9_48.2) [template = constants.%.28] -// CHECK:STDOUT: %.loc9_57.1: %i16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_57.2: %i16 = converted %int.convert_checked.loc9_38, %.loc9_57.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_49.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_49.3: = bound_method %.loc9_49.1, %.loc9_49.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc9_49.4: = specific_function %.loc9_49.3, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc9_49: init %i32 = call %.loc9_49.4(%.loc9_49.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_49.5: %i32 = value_of_initializer %int.convert_checked.loc9_49 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_49.6: %i32 = converted %.loc9_49.1, %.loc9_49.5 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc9_49.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_48.1: %i32 = value_of_initializer %int.snegate [template = constants.%.31] +// CHECK:STDOUT: %.loc9_48.2: %i32 = converted %int.snegate, %.loc9_48.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i16 = call %Int32ToInt16.ref(%.loc9_48.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_57.1: %i16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_57.2: %i16 = converted %int.convert_checked.loc9_38, %.loc9_57.1 [template = constants.%.32] // CHECK:STDOUT: %min_minus_one: %i16 = bind_name min_minus_one, %.loc9_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -3062,18 +3062,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 16 [template] -// CHECK:STDOUT: %i16: type = int_type signed, %.26 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 16 [template] +// CHECK:STDOUT: %i16: type = int_type signed, %.30 [template] // CHECK:STDOUT: %Int32ToInt16.type: type = fn_type @Int32ToInt16 [template] // CHECK:STDOUT: %Int32ToInt16: %Int32ToInt16.type = struct_value () [template] // CHECK:STDOUT: %Int32ToInt32.type: type = fn_type @Int32ToInt32 [template] // CHECK:STDOUT: %Int32ToInt32: %Int32ToInt32.type = struct_value () [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %i64: type = int_type signed, %.27 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 64 [template] +// CHECK:STDOUT: %i64: type = int_type signed, %.31 [template] // CHECK:STDOUT: %Int32ToInt64.type: type = fn_type @Int32ToInt64 [template] // CHECK:STDOUT: %Int32ToInt64: %Int32ToInt64.type = struct_value () [template] // CHECK:STDOUT: } @@ -3143,7 +3143,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_19.1) [template = constants.%i32] // CHECK:STDOUT: %.loc5_19.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_19.3: type = converted %int.make_type_signed.loc5, %.loc5_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.1: Core.IntLiteral = int_value 16 [template = constants.%.26] +// CHECK:STDOUT: %.loc15_34.1: Core.IntLiteral = int_value 16 [template = constants.%.30] // CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_34.1) [template = constants.%i16] // CHECK:STDOUT: %.loc15_34.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i16] // CHECK:STDOUT: %.loc15_34.3: type = converted %int.make_type_signed.loc15, %.loc15_34.2 [template = constants.%i16] @@ -3151,7 +3151,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_32.1) [template = constants.%i32] // CHECK:STDOUT: %.loc25_32.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] // CHECK:STDOUT: %.loc25_32.3: type = converted %int.make_type_signed.loc25, %.loc25_32.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_33.1: Core.IntLiteral = int_value 64 [template = constants.%.27] +// CHECK:STDOUT: %.loc34_33.1: Core.IntLiteral = int_value 64 [template = constants.%.31] // CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_33.1) [template = constants.%i64] // CHECK:STDOUT: %.loc34_33.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i64] // CHECK:STDOUT: %.loc34_33.3: type = converted %int.make_type_signed.loc34, %.loc34_33.2 [template = constants.%i64] @@ -3166,12 +3166,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc5_25: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_26.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_26.2: = bound_method %.loc5_25, %.loc5_26.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_26.3: = specific_function %.loc5_26.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_26.3(%.loc5_25) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_26.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_26.5: %i32 = converted %.loc5_25, %.loc5_26.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_26.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_26.2: = bound_method %.loc5_25, %.loc5_26.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_26.3: = specific_function %.loc5_26.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_26.3(%.loc5_25) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_26.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_26.5: %i32 = converted %.loc5_25, %.loc5_26.4 [template = constants.%.29] // CHECK:STDOUT: %not_constant: %i32 = bind_name not_constant, %.loc5_26.5 // CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %not_constant.ref.loc15: %i32 = name_ref not_constant, %not_constant diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 5e2771361995..b5329d02f83a 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -54,16 +54,16 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.29: bool = bool_literal true [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: bool = bool_literal false [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.33: bool = bool_literal true [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: bool = bool_literal false [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -179,21 +179,21 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %Eq.ref.loc8: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %.loc8_19.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_19.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_19.3: = bound_method %.loc8_19.1, %.loc8_19.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_19.4: = specific_function %.loc8_19.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc8_19: init %i32 = call %.loc8_19.4(%.loc8_19.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc8_19.5: %i32 = value_of_initializer %int.convert_checked.loc8_19 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_19.6: %i32 = converted %.loc8_19.1, %.loc8_19.5 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_22.1, %.loc8_22.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %.loc8_22.4(%.loc8_22.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_22.1, %.loc8_22.5 [template = constants.%.28] -// CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19.6, %.loc8_22.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %int.eq.loc8 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_13.2: bool = converted %int.eq.loc8, %.loc8_13.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_19.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_19.3: = bound_method %.loc8_19.1, %.loc8_19.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_19.4: = specific_function %.loc8_19.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc8_19: init %i32 = call %.loc8_19.4(%.loc8_19.1) [template = constants.%.32] +// CHECK:STDOUT: %.loc8_19.5: %i32 = value_of_initializer %int.convert_checked.loc8_19 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_19.6: %i32 = converted %.loc8_19.1, %.loc8_19.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_22.1, %.loc8_22.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %.loc8_22.4(%.loc8_22.1) [template = constants.%.32] +// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_22.1, %.loc8_22.5 [template = constants.%.32] +// CHECK:STDOUT: %int.eq.loc8: init bool = call %Eq.ref.loc8(%.loc8_19.6, %.loc8_22.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_13.1: bool = value_of_initializer %int.eq.loc8 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_13.2: bool = converted %int.eq.loc8, %.loc8_13.1 [template = constants.%.33] // CHECK:STDOUT: if %.loc8_13.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -209,22 +209,22 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %false_.ref: %False = name_ref false_, %false_ // CHECK:STDOUT: %Eq.ref.loc9: %Eq.type = name_ref Eq, file.%Eq.decl [template = constants.%Eq] // CHECK:STDOUT: %.loc9_20.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_20.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_20.3: = bound_method %.loc9_20.1, %.loc9_20.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_20.4: = specific_function %.loc9_20.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %.loc9_20.4(%.loc9_20.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc9_20.5: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_20.6: %i32 = converted %.loc9_20.1, %.loc9_20.5 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20.6, %.loc9_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.eq.loc9 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.eq.loc9, %.loc9_14.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_20.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_20.3: = bound_method %.loc9_20.1, %.loc9_20.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_20.4: = specific_function %.loc9_20.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %.loc9_20.4(%.loc9_20.1) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_20.5: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_20.6: %i32 = converted %.loc9_20.1, %.loc9_20.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.37] +// CHECK:STDOUT: %int.eq.loc9: init bool = call %Eq.ref.loc9(%.loc9_20.6, %.loc9_23.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.eq.loc9 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.eq.loc9, %.loc9_14.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 873f9dca30e9..5b9aabcdd3a4 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -52,20 +52,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.33: bool = bool_literal false [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.38: bool = bool_literal true [template] -// CHECK:STDOUT: %.39: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.37: bool = bool_literal false [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.42: bool = bool_literal true [template] +// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -203,21 +203,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Greater.ref.loc9: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_28.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_28.3: = bound_method %.loc9_28.1, %.loc9_28.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_28.4: = specific_function %.loc9_28.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_28: init %i32 = call %.loc9_28.4(%.loc9_28.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_28.5: %i32 = value_of_initializer %int.convert_checked.loc9_28 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_28.6: %i32 = converted %.loc9_28.1, %.loc9_28.5 [template = constants.%.32] -// CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25.6, %.loc9_28.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater.loc9 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater.loc9, %.loc9_14.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_28.3: = bound_method %.loc9_28.1, %.loc9_28.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_28.4: = specific_function %.loc9_28.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_28: init %i32 = call %.loc9_28.4(%.loc9_28.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_28.5: %i32 = value_of_initializer %int.convert_checked.loc9_28 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_28.6: %i32 = converted %.loc9_28.1, %.loc9_28.5 [template = constants.%.36] +// CHECK:STDOUT: %int.greater.loc9: init bool = call %Greater.ref.loc9(%.loc9_25.6, %.loc9_28.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater.loc9 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater.loc9, %.loc9_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,21 +234,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Greater.ref.loc10: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc10_25.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_28.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_25.3: = bound_method %.loc10_25.1, %.loc10_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_25.4: = specific_function %.loc10_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %.loc10_25.4(%.loc10_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_25.5: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_25.6: %i32 = converted %.loc10_25.1, %.loc10_25.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_28.3: = bound_method %.loc10_28.1, %.loc10_28.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_28.4: = specific_function %.loc10_28.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_28: init %i32 = call %.loc10_28.4(%.loc10_28.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_28.5: %i32 = value_of_initializer %int.convert_checked.loc10_28 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_28.6: %i32 = converted %.loc10_28.1, %.loc10_28.5 [template = constants.%.29] -// CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25.6, %.loc10_28.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.greater.loc10 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.greater.loc10, %.loc10_14.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_25.3: = bound_method %.loc10_25.1, %.loc10_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_25.4: = specific_function %.loc10_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %.loc10_25.4(%.loc10_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_25.5: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_25.6: %i32 = converted %.loc10_25.1, %.loc10_25.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_28.3: = bound_method %.loc10_28.1, %.loc10_28.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_28.4: = specific_function %.loc10_28.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_28: init %i32 = call %.loc10_28.4(%.loc10_28.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_28.5: %i32 = value_of_initializer %int.convert_checked.loc10_28 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_28.6: %i32 = converted %.loc10_28.1, %.loc10_28.5 [template = constants.%.33] +// CHECK:STDOUT: %int.greater.loc10: init bool = call %Greater.ref.loc10(%.loc10_25.6, %.loc10_28.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.greater.loc10 [template = constants.%.37] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.greater.loc10, %.loc10_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -264,22 +264,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc11: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %.loc11_24.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 0 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_24.3: = bound_method %.loc11_24.1, %.loc11_24.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_24.4: = specific_function %.loc11_24.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %.loc11_24.4(%.loc11_24.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_24.5: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_24.6: %i32 = converted %.loc11_24.1, %.loc11_24.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_27.1, %.loc11_27.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %.loc11_27.4(%.loc11_27.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.5: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.6: %i32 = converted %.loc11_27.1, %.loc11_27.5 [template = constants.%.37] -// CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24.6, %.loc11_27.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater.loc11 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater.loc11, %.loc11_13.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 0 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_24.3: = bound_method %.loc11_24.1, %.loc11_24.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_24.4: = specific_function %.loc11_24.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %.loc11_24.4(%.loc11_24.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_24.5: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_24.6: %i32 = converted %.loc11_24.1, %.loc11_24.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_27.1, %.loc11_27.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %.loc11_27.4(%.loc11_27.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc11_27.5: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.41] +// CHECK:STDOUT: %.loc11_27.6: %i32 = converted %.loc11_27.1, %.loc11_27.5 [template = constants.%.41] +// CHECK:STDOUT: %int.greater.loc11: init bool = call %Greater.ref.loc11(%.loc11_24.6, %.loc11_27.6) [template = constants.%.42] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater.loc11 [template = constants.%.42] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater.loc11, %.loc11_13.1 [template = constants.%.42] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -296,25 +296,25 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Greater.ref.loc12: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_32.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_32.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc12_36.1: Core.IntLiteral = int_value 0 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_36.1, %.loc12_36.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12_36: init %i32 = call %.loc12_36.4(%.loc12_36.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_36.5: %i32 = value_of_initializer %int.convert_checked.loc12_36 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_36.6: %i32 = converted %.loc12_36.1, %.loc12_36.5 [template = constants.%.37] -// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_36.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_32.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc12_36.1: Core.IntLiteral = int_value 0 [template = constants.%.38] +// CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_36.1, %.loc12_36.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc12_36: init %i32 = call %.loc12_36.4(%.loc12_36.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc12_36.5: %i32 = value_of_initializer %int.convert_checked.loc12_36 [template = constants.%.41] +// CHECK:STDOUT: %.loc12_36.6: %i32 = converted %.loc12_36.1, %.loc12_36.5 [template = constants.%.41] +// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_36.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -329,27 +329,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %Greater.ref.loc13: %Greater.type = name_ref Greater, file.%Greater.decl [template = constants.%Greater] -// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 0 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 0 [template = constants.%.38] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_34.1, %.loc13_34.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %.loc13_34.4(%.loc13_34.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_34.5: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_34.6: %i32 = converted %.loc13_34.1, %.loc13_34.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_24.1, %.loc13_24.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.39] -// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24.6, %.loc13_33.2) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_34.1, %.loc13_34.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %.loc13_34.4(%.loc13_34.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_34.5: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_34.6: %i32 = converted %.loc13_34.1, %.loc13_34.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_24.1, %.loc13_24.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.41] +// CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.41] +// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.43] +// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24.6, %.loc13_33.2) [template = constants.%.42] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%.42] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index decf54bf22d5..ef19d8210de6 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -52,20 +52,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.33: bool = bool_literal false [template] -// CHECK:STDOUT: %.34: bool = bool_literal true [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.37: bool = bool_literal false [template] +// CHECK:STDOUT: %.38: bool = bool_literal true [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -203,21 +203,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %GreaterEq.ref.loc9: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_30.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_27.1, %.loc9_27.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_30.3: = bound_method %.loc9_30.1, %.loc9_30.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_30.4: = specific_function %.loc9_30.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_30: init %i32 = call %.loc9_30.4(%.loc9_30.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_30.5: %i32 = value_of_initializer %int.convert_checked.loc9_30 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_30.6: %i32 = converted %.loc9_30.1, %.loc9_30.5 [template = constants.%.32] -// CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27.6, %.loc9_30.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater_eq.loc9 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater_eq.loc9, %.loc9_14.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_27.3: = bound_method %.loc9_27.1, %.loc9_27.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_27.4: = specific_function %.loc9_27.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_30.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_30.3: = bound_method %.loc9_30.1, %.loc9_30.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_30.4: = specific_function %.loc9_30.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_30: init %i32 = call %.loc9_30.4(%.loc9_30.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_30.5: %i32 = value_of_initializer %int.convert_checked.loc9_30 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_30.6: %i32 = converted %.loc9_30.1, %.loc9_30.5 [template = constants.%.36] +// CHECK:STDOUT: %int.greater_eq.loc9: init bool = call %GreaterEq.ref.loc9(%.loc9_27.6, %.loc9_30.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_14.1: bool = value_of_initializer %int.greater_eq.loc9 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_14.2: bool = converted %int.greater_eq.loc9, %.loc9_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc9_14.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,21 +234,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %GreaterEq.ref.loc10: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_29.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_29.3: = bound_method %.loc10_29.1, %.loc10_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_29.4: = specific_function %.loc10_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_29: init %i32 = call %.loc10_29.4(%.loc10_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_29.5: %i32 = value_of_initializer %int.convert_checked.loc10_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_29.6: %i32 = converted %.loc10_29.1, %.loc10_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26.6, %.loc10_29.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.greater_eq.loc10 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.greater_eq.loc10, %.loc10_13.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_29.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_29.3: = bound_method %.loc10_29.1, %.loc10_29.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_29.4: = specific_function %.loc10_29.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_29: init %i32 = call %.loc10_29.4(%.loc10_29.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_29.5: %i32 = value_of_initializer %int.convert_checked.loc10_29 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_29.6: %i32 = converted %.loc10_29.1, %.loc10_29.5 [template = constants.%.33] +// CHECK:STDOUT: %int.greater_eq.loc10: init bool = call %GreaterEq.ref.loc10(%.loc10_26.6, %.loc10_29.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.greater_eq.loc10 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.greater_eq.loc10, %.loc10_13.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -264,22 +264,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref.loc11: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc11: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %.loc11_26.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_29.1: Core.IntLiteral = int_value 0 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_26.1, %.loc11_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_29.3: = bound_method %.loc11_29.1, %.loc11_29.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_29.4: = specific_function %.loc11_29.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc11_29: init %i32 = call %.loc11_29.4(%.loc11_29.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_29.5: %i32 = value_of_initializer %int.convert_checked.loc11_29 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_29.6: %i32 = converted %.loc11_29.1, %.loc11_29.5 [template = constants.%.38] -// CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26.6, %.loc11_29.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater_eq.loc11 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater_eq.loc11, %.loc11_13.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_29.1: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_26.1, %.loc11_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_29.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_29.3: = bound_method %.loc11_29.1, %.loc11_29.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc11_29.4: = specific_function %.loc11_29.3, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc11_29: init %i32 = call %.loc11_29.4(%.loc11_29.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc11_29.5: %i32 = value_of_initializer %int.convert_checked.loc11_29 [template = constants.%.42] +// CHECK:STDOUT: %.loc11_29.6: %i32 = converted %.loc11_29.1, %.loc11_29.5 [template = constants.%.42] +// CHECK:STDOUT: %int.greater_eq.loc11: init bool = call %GreaterEq.ref.loc11(%.loc11_26.6, %.loc11_29.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc11_13.1: bool = value_of_initializer %int.greater_eq.loc11 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_13.2: bool = converted %int.greater_eq.loc11, %.loc11_13.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc11_13.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -296,25 +296,25 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %GreaterEq.ref.loc12: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_34.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc12_38.1: Core.IntLiteral = int_value 0 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_38.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_38.3: = bound_method %.loc12_38.1, %.loc12_38.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_38.4: = specific_function %.loc12_38.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc12_38: init %i32 = call %.loc12_38.4(%.loc12_38.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc12_38.5: %i32 = value_of_initializer %int.convert_checked.loc12_38 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_38.6: %i32 = converted %.loc12_38.1, %.loc12_38.5 [template = constants.%.38] -// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_38.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_34.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc12_38.1: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_38.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_38.3: = bound_method %.loc12_38.1, %.loc12_38.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc12_38.4: = specific_function %.loc12_38.3, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc12_38: init %i32 = call %.loc12_38.4(%.loc12_38.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc12_38.5: %i32 = value_of_initializer %int.convert_checked.loc12_38 [template = constants.%.42] +// CHECK:STDOUT: %.loc12_38.6: %i32 = converted %.loc12_38.1, %.loc12_38.5 [template = constants.%.42] +// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_38.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -329,27 +329,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_14.3: type = block_arg !if.expr.result.loc12 [template = constants.%False] // CHECK:STDOUT: %true_.ref.loc13: %True = name_ref true_, %true_ // CHECK:STDOUT: %GreaterEq.ref.loc13: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [template = constants.%GreaterEq] -// CHECK:STDOUT: %.loc13_26.1: Core.IntLiteral = int_value 0 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_26.1: Core.IntLiteral = int_value 0 [template = constants.%.39] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_36.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_36.3: = bound_method %.loc13_36.1, %.loc13_36.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_36.4: = specific_function %.loc13_36.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13_36: init %i32 = call %.loc13_36.4(%.loc13_36.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_36.5: %i32 = value_of_initializer %int.convert_checked.loc13_36 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_36.6: %i32 = converted %.loc13_36.1, %.loc13_36.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_36.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc13_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_26.3: = bound_method %.loc13_26.1, %.loc13_26.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_26.4: = specific_function %.loc13_26.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc13_26: init %i32 = call %.loc13_26.4(%.loc13_26.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_26.5: %i32 = value_of_initializer %int.convert_checked.loc13_26 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_26.6: %i32 = converted %.loc13_26.1, %.loc13_26.5 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.39] -// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26.6, %.loc13_35.2) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_36.3: = bound_method %.loc13_36.1, %.loc13_36.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_36.4: = specific_function %.loc13_36.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc13_36: init %i32 = call %.loc13_36.4(%.loc13_36.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_36.5: %i32 = value_of_initializer %int.convert_checked.loc13_36 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_36.6: %i32 = converted %.loc13_36.1, %.loc13_36.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_36.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc13_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_26.3: = bound_method %.loc13_26.1, %.loc13_26.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc13_26.4: = specific_function %.loc13_26.3, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc13_26: init %i32 = call %.loc13_26.4(%.loc13_26.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc13_26.5: %i32 = value_of_initializer %int.convert_checked.loc13_26 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_26.6: %i32 = converted %.loc13_26.1, %.loc13_26.5 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.43] +// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26.6, %.loc13_35.2) [template = constants.%.38] +// CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index 2b2e70aa073d..7674a8cf20ec 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -78,22 +78,22 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 20 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 20 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 20 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 20 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -148,39 +148,39 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %LeftShift.ref: %LeftShift.type = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc4_26.1: Core.IntLiteral = int_value 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_29.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_26.3: = bound_method %.loc4_26.1, %.loc4_26.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_26.4: = specific_function %.loc4_26.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init %i32 = call %.loc4_26.4(%.loc4_26.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_26.5: %i32 = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_26.6: %i32 = converted %.loc4_26.1, %.loc4_26.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_29.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_29.3: = bound_method %.loc4_29.1, %.loc4_29.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_29.4: = specific_function %.loc4_29.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_29: init %i32 = call %.loc4_29.4(%.loc4_29.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_29.5: %i32 = value_of_initializer %int.convert_checked.loc4_29 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_29.6: %i32 = converted %.loc4_29.1, %.loc4_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.6, %.loc4_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_26.3: = bound_method %.loc4_26.1, %.loc4_26.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_26.4: = specific_function %.loc4_26.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init %i32 = call %.loc4_26.4(%.loc4_26.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_26.5: %i32 = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_26.6: %i32 = converted %.loc4_26.1, %.loc4_26.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_29.3: = bound_method %.loc4_29.1, %.loc4_29.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_29.4: = specific_function %.loc4_29.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_29: init %i32 = call %.loc4_29.4(%.loc4_29.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_29.5: %i32 = value_of_initializer %int.convert_checked.loc4_29 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_29.6: %i32 = converted %.loc4_29.1, %.loc4_29.5 [template = constants.%.33] +// CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.6, %.loc4_29.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_25.2: = bound_method %int.left_shift, %.loc4_25.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_25.3: = specific_function %.loc4_25.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_25.4: %i32 = value_of_initializer %int.left_shift [template = constants.%.30] -// CHECK:STDOUT: %.loc4_25.5: %i32 = converted %int.left_shift, %.loc4_25.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %.loc4_25.3(%.loc4_25.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25.7: Core.IntLiteral = converted %int.left_shift, %.loc4_25.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_31: type = array_type %.loc4_25.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_25.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_25.2: = bound_method %int.left_shift, %.loc4_25.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_25.3: = specific_function %.loc4_25.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_25.4: %i32 = value_of_initializer %int.left_shift [template = constants.%.34] +// CHECK:STDOUT: %.loc4_25.5: %i32 = converted %int.left_shift, %.loc4_25.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %.loc4_25.3(%.loc4_25.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25.7: Core.IntLiteral = converted %int.left_shift, %.loc4_25.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_31: type = array_type %.loc4_25.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 20 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 20 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_21: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_21: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -225,9 +225,9 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -247,30 +247,30 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 31 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.31: = bound_method %.1, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 32 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 33 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 31 [template] +// CHECK:STDOUT: %.34: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.35: = bound_method %.1, %Convert.14 [template] // CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 33 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1000 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 32 [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 33 [template] // CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] // CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 1000 [template] -// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.44: = bound_method %.43, %Convert.14 [template] -// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.46: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.41: %i32 = int_value 33 [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 1000 [template] +// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.14 [template] +// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.45: %i32 = int_value 1000 [template] +// CHECK:STDOUT: %.46: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.48: = bound_method %.47, %Convert.14 [template] +// CHECK:STDOUT: %.49: = specific_function %.48, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.50: %i32 = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -386,132 +386,132 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %LeftShift.ref.loc8: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc8_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_32.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_29.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_29.3: = bound_method %.loc8_29.1, %.loc8_29.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc8_29.4: = specific_function %.loc8_29.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc8_29: init %i32 = call %.loc8_29.4(%.loc8_29.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_29.5: %i32 = value_of_initializer %int.convert_checked.loc8_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_29.6: %i32 = converted %.loc8_29.1, %.loc8_29.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_32.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_32.3: = bound_method %.loc8_32.1, %.loc8_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_32.4: = specific_function %.loc8_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8_32: init %i32 = call %.loc8_32.4(%.loc8_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_32.5: %i32 = value_of_initializer %int.convert_checked.loc8_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_32.6: %i32 = converted %.loc8_32.1, %.loc8_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.left_shift.loc8: init %i32 = call %LeftShift.ref.loc8(%.loc8_29.6, %.loc8_32.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_29.3: = bound_method %.loc8_29.1, %.loc8_29.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc8_29.4: = specific_function %.loc8_29.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc8_29: init %i32 = call %.loc8_29.4(%.loc8_29.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_29.5: %i32 = value_of_initializer %int.convert_checked.loc8_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_29.6: %i32 = converted %.loc8_29.1, %.loc8_29.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_32.3: = bound_method %.loc8_32.1, %.loc8_32.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc8_32.4: = specific_function %.loc8_32.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc8_32: init %i32 = call %.loc8_32.4(%.loc8_32.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_32.5: %i32 = value_of_initializer %int.convert_checked.loc8_32 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_32.6: %i32 = converted %.loc8_32.1, %.loc8_32.5 [template = constants.%.33] +// CHECK:STDOUT: %int.left_shift.loc8: init %i32 = call %LeftShift.ref.loc8(%.loc8_29.6, %.loc8_32.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.left_shift.loc8 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.left_shift.loc8, %.loc8_35.1 [template = constants.%.34] // CHECK:STDOUT: %size_1: %i32 = bind_name size_1, %.loc8_35.2 // CHECK:STDOUT: %LeftShift.ref.loc13: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc13_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_32.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_29.3: = bound_method %.loc13_29.1, %.loc13_29.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_29.4: = specific_function %.loc13_29.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc13_29: init %i32 = call %.loc13_29.4(%.loc13_29.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_29.5: %i32 = value_of_initializer %int.convert_checked.loc13_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_29.6: %i32 = converted %.loc13_29.1, %.loc13_29.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_32.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_32.3: = bound_method %.loc13_32.1, %.loc13_32.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_32.4: = specific_function %.loc13_32.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %.loc13_32.4(%.loc13_32.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_32.5: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_32.6: %i32 = converted %.loc13_32.1, %.loc13_32.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_29.3: = bound_method %.loc13_29.1, %.loc13_29.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_29.4: = specific_function %.loc13_29.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc13_29: init %i32 = call %.loc13_29.4(%.loc13_29.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_29.5: %i32 = value_of_initializer %int.convert_checked.loc13_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_29.6: %i32 = converted %.loc13_29.1, %.loc13_29.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_32.3: = bound_method %.loc13_32.1, %.loc13_32.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_32.4: = specific_function %.loc13_32.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %.loc13_32.4(%.loc13_32.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_32.5: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_32.6: %i32 = converted %.loc13_32.1, %.loc13_32.5 [template = constants.%.37] // CHECK:STDOUT: %int.left_shift.loc13: init %i32 = call %LeftShift.ref.loc13(%.loc13_29.6, %.loc13_32.6) [template = ] // CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.left_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.left_shift.loc13, %.loc13_35.1 [template = ] // CHECK:STDOUT: %size_2: %i32 = bind_name size_2, %.loc13_35.2 // CHECK:STDOUT: %LeftShift.ref.loc18: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] // CHECK:STDOUT: %.loc18_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_32.1: Core.IntLiteral = int_value 33 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_29.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_29.3: = bound_method %.loc18_29.1, %.loc18_29.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc18_29.4: = specific_function %.loc18_29.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc18_29: init %i32 = call %.loc18_29.4(%.loc18_29.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc18_29.5: %i32 = value_of_initializer %int.convert_checked.loc18_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc18_29.6: %i32 = converted %.loc18_29.1, %.loc18_29.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc18_32.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_32.3: = bound_method %.loc18_32.1, %.loc18_32.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc18_32.4: = specific_function %.loc18_32.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc18_32: init %i32 = call %.loc18_32.4(%.loc18_32.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc18_32.5: %i32 = value_of_initializer %int.convert_checked.loc18_32 [template = constants.%.37] -// CHECK:STDOUT: %.loc18_32.6: %i32 = converted %.loc18_32.1, %.loc18_32.5 [template = constants.%.37] +// CHECK:STDOUT: %.loc18_32.1: Core.IntLiteral = int_value 33 [template = constants.%.38] +// CHECK:STDOUT: %.loc18_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_29.3: = bound_method %.loc18_29.1, %.loc18_29.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc18_29.4: = specific_function %.loc18_29.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc18_29: init %i32 = call %.loc18_29.4(%.loc18_29.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc18_29.5: %i32 = value_of_initializer %int.convert_checked.loc18_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc18_29.6: %i32 = converted %.loc18_29.1, %.loc18_29.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc18_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_32.3: = bound_method %.loc18_32.1, %.loc18_32.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc18_32.4: = specific_function %.loc18_32.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc18_32: init %i32 = call %.loc18_32.4(%.loc18_32.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc18_32.5: %i32 = value_of_initializer %int.convert_checked.loc18_32 [template = constants.%.41] +// CHECK:STDOUT: %.loc18_32.6: %i32 = converted %.loc18_32.1, %.loc18_32.5 [template = constants.%.41] // CHECK:STDOUT: %int.left_shift.loc18: init %i32 = call %LeftShift.ref.loc18(%.loc18_29.6, %.loc18_32.6) [template = ] // CHECK:STDOUT: %.loc18_35.1: %i32 = value_of_initializer %int.left_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_35.2: %i32 = converted %int.left_shift.loc18, %.loc18_35.1 [template = ] // CHECK:STDOUT: %size_3: %i32 = bind_name size_3, %.loc18_35.2 // CHECK:STDOUT: %LeftShift.ref.loc21: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc21_33.1: Core.IntLiteral = int_value 1000 [template = constants.%.38] +// CHECK:STDOUT: %.loc21_33.1: Core.IntLiteral = int_value 1000 [template = constants.%.42] // CHECK:STDOUT: %.loc21_39.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc21_33.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_33.3: = bound_method %.loc21_33.1, %.loc21_33.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc21_33.4: = specific_function %.loc21_33.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc21_33: init %i32 = call %.loc21_33.4(%.loc21_33.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc21_33.5: %i32 = value_of_initializer %int.convert_checked.loc21_33 [template = constants.%.41] -// CHECK:STDOUT: %.loc21_33.6: %i32 = converted %.loc21_33.1, %.loc21_33.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc21_39.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_39.3: = bound_method %.loc21_39.1, %.loc21_39.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc21_39.4: = specific_function %.loc21_39.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc21_39: init %i32 = call %.loc21_39.4(%.loc21_39.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc21_39.5: %i32 = value_of_initializer %int.convert_checked.loc21_39 [template = constants.%.29] -// CHECK:STDOUT: %.loc21_39.6: %i32 = converted %.loc21_39.1, %.loc21_39.5 [template = constants.%.29] -// CHECK:STDOUT: %int.left_shift.loc21: init %i32 = call %LeftShift.ref.loc21(%.loc21_33.6, %.loc21_39.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc21_42.1: %i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%.42] -// CHECK:STDOUT: %.loc21_42.2: %i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%.42] +// CHECK:STDOUT: %.loc21_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_33.3: = bound_method %.loc21_33.1, %.loc21_33.2 [template = constants.%.43] +// CHECK:STDOUT: %.loc21_33.4: = specific_function %.loc21_33.3, @Convert.2(constants.%.1) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc21_33: init %i32 = call %.loc21_33.4(%.loc21_33.1) [template = constants.%.45] +// CHECK:STDOUT: %.loc21_33.5: %i32 = value_of_initializer %int.convert_checked.loc21_33 [template = constants.%.45] +// CHECK:STDOUT: %.loc21_33.6: %i32 = converted %.loc21_33.1, %.loc21_33.5 [template = constants.%.45] +// CHECK:STDOUT: %.loc21_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_39.3: = bound_method %.loc21_39.1, %.loc21_39.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc21_39.4: = specific_function %.loc21_39.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc21_39: init %i32 = call %.loc21_39.4(%.loc21_39.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc21_39.5: %i32 = value_of_initializer %int.convert_checked.loc21_39 [template = constants.%.33] +// CHECK:STDOUT: %.loc21_39.6: %i32 = converted %.loc21_39.1, %.loc21_39.5 [template = constants.%.33] +// CHECK:STDOUT: %int.left_shift.loc21: init %i32 = call %LeftShift.ref.loc21(%.loc21_33.6, %.loc21_39.6) [template = constants.%.46] +// CHECK:STDOUT: %.loc21_42.1: %i32 = value_of_initializer %int.left_shift.loc21 [template = constants.%.46] +// CHECK:STDOUT: %.loc21_42.2: %i32 = converted %int.left_shift.loc21, %.loc21_42.1 [template = constants.%.46] // CHECK:STDOUT: %overflow_1: %i32 = bind_name overflow_1, %.loc21_42.2 // CHECK:STDOUT: %LeftShift.ref.loc26: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc26_33.1: Core.IntLiteral = int_value 1000 [template = constants.%.38] +// CHECK:STDOUT: %.loc26_33.1: Core.IntLiteral = int_value 1000 [template = constants.%.42] // CHECK:STDOUT: %.loc26_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc26_33.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_33.3: = bound_method %.loc26_33.1, %.loc26_33.2 [template = constants.%.39] -// CHECK:STDOUT: %.loc26_33.4: = specific_function %.loc26_33.3, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc26_33: init %i32 = call %.loc26_33.4(%.loc26_33.1) [template = constants.%.41] -// CHECK:STDOUT: %.loc26_33.5: %i32 = value_of_initializer %int.convert_checked.loc26_33 [template = constants.%.41] -// CHECK:STDOUT: %.loc26_33.6: %i32 = converted %.loc26_33.1, %.loc26_33.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc26_39.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_39.3: = bound_method %.loc26_39.1, %.loc26_39.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc26_39.4: = specific_function %.loc26_39.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc26_39: init %i32 = call %.loc26_39.4(%.loc26_39.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc26_39.5: %i32 = value_of_initializer %int.convert_checked.loc26_39 [template = constants.%.33] -// CHECK:STDOUT: %.loc26_39.6: %i32 = converted %.loc26_39.1, %.loc26_39.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc26_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_33.3: = bound_method %.loc26_33.1, %.loc26_33.2 [template = constants.%.43] +// CHECK:STDOUT: %.loc26_33.4: = specific_function %.loc26_33.3, @Convert.2(constants.%.1) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc26_33: init %i32 = call %.loc26_33.4(%.loc26_33.1) [template = constants.%.45] +// CHECK:STDOUT: %.loc26_33.5: %i32 = value_of_initializer %int.convert_checked.loc26_33 [template = constants.%.45] +// CHECK:STDOUT: %.loc26_33.6: %i32 = converted %.loc26_33.1, %.loc26_33.5 [template = constants.%.45] +// CHECK:STDOUT: %.loc26_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_39.3: = bound_method %.loc26_39.1, %.loc26_39.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc26_39.4: = specific_function %.loc26_39.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc26_39: init %i32 = call %.loc26_39.4(%.loc26_39.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc26_39.5: %i32 = value_of_initializer %int.convert_checked.loc26_39 [template = constants.%.37] +// CHECK:STDOUT: %.loc26_39.6: %i32 = converted %.loc26_39.1, %.loc26_39.5 [template = constants.%.37] // CHECK:STDOUT: %int.left_shift.loc26: init %i32 = call %LeftShift.ref.loc26(%.loc26_33.6, %.loc26_39.6) [template = ] // CHECK:STDOUT: %.loc26_42.1: %i32 = value_of_initializer %int.left_shift.loc26 [template = ] // CHECK:STDOUT: %.loc26_42.2: %i32 = converted %int.left_shift.loc26, %.loc26_42.1 [template = ] // CHECK:STDOUT: %overflow_2: %i32 = bind_name overflow_2, %.loc26_42.2 // CHECK:STDOUT: %LeftShift.ref.loc29: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc29_36.1: Core.IntLiteral = int_value 0 [template = constants.%.43] +// CHECK:STDOUT: %.loc29_36.1: Core.IntLiteral = int_value 0 [template = constants.%.47] // CHECK:STDOUT: %.loc29_39.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc29_36.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_36.3: = bound_method %.loc29_36.1, %.loc29_36.2 [template = constants.%.44] -// CHECK:STDOUT: %.loc29_36.4: = specific_function %.loc29_36.3, @Convert.2(constants.%.1) [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc29_36: init %i32 = call %.loc29_36.4(%.loc29_36.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc29_36.5: %i32 = value_of_initializer %int.convert_checked.loc29_36 [template = constants.%.42] -// CHECK:STDOUT: %.loc29_36.6: %i32 = converted %.loc29_36.1, %.loc29_36.5 [template = constants.%.42] -// CHECK:STDOUT: %.loc29_39.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_39.3: = bound_method %.loc29_39.1, %.loc29_39.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc29_39.4: = specific_function %.loc29_39.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc29_39: init %i32 = call %.loc29_39.4(%.loc29_39.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc29_39.5: %i32 = value_of_initializer %int.convert_checked.loc29_39 [template = constants.%.29] -// CHECK:STDOUT: %.loc29_39.6: %i32 = converted %.loc29_39.1, %.loc29_39.5 [template = constants.%.29] -// CHECK:STDOUT: %int.left_shift.loc29: init %i32 = call %LeftShift.ref.loc29(%.loc29_36.6, %.loc29_39.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc29_42.1: %i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%.42] -// CHECK:STDOUT: %.loc29_42.2: %i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%.42] +// CHECK:STDOUT: %.loc29_36.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc29_36.3: = bound_method %.loc29_36.1, %.loc29_36.2 [template = constants.%.48] +// CHECK:STDOUT: %.loc29_36.4: = specific_function %.loc29_36.3, @Convert.2(constants.%.1) [template = constants.%.49] +// CHECK:STDOUT: %int.convert_checked.loc29_36: init %i32 = call %.loc29_36.4(%.loc29_36.1) [template = constants.%.46] +// CHECK:STDOUT: %.loc29_36.5: %i32 = value_of_initializer %int.convert_checked.loc29_36 [template = constants.%.46] +// CHECK:STDOUT: %.loc29_36.6: %i32 = converted %.loc29_36.1, %.loc29_36.5 [template = constants.%.46] +// CHECK:STDOUT: %.loc29_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc29_39.3: = bound_method %.loc29_39.1, %.loc29_39.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc29_39.4: = specific_function %.loc29_39.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc29_39: init %i32 = call %.loc29_39.4(%.loc29_39.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc29_39.5: %i32 = value_of_initializer %int.convert_checked.loc29_39 [template = constants.%.33] +// CHECK:STDOUT: %.loc29_39.6: %i32 = converted %.loc29_39.1, %.loc29_39.5 [template = constants.%.33] +// CHECK:STDOUT: %int.left_shift.loc29: init %i32 = call %LeftShift.ref.loc29(%.loc29_36.6, %.loc29_39.6) [template = constants.%.46] +// CHECK:STDOUT: %.loc29_42.1: %i32 = value_of_initializer %int.left_shift.loc29 [template = constants.%.46] +// CHECK:STDOUT: %.loc29_42.2: %i32 = converted %int.left_shift.loc29, %.loc29_42.1 [template = constants.%.46] // CHECK:STDOUT: %no_overflow_1: %i32 = bind_name no_overflow_1, %.loc29_42.2 // CHECK:STDOUT: %LeftShift.ref.loc34: %LeftShift.type = name_ref LeftShift, file.%LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %.loc34_36.1: Core.IntLiteral = int_value 0 [template = constants.%.43] +// CHECK:STDOUT: %.loc34_36.1: Core.IntLiteral = int_value 0 [template = constants.%.47] // CHECK:STDOUT: %.loc34_39.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc34_36.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_36.3: = bound_method %.loc34_36.1, %.loc34_36.2 [template = constants.%.44] -// CHECK:STDOUT: %.loc34_36.4: = specific_function %.loc34_36.3, @Convert.2(constants.%.1) [template = constants.%.45] -// CHECK:STDOUT: %int.convert_checked.loc34_36: init %i32 = call %.loc34_36.4(%.loc34_36.1) [template = constants.%.42] -// CHECK:STDOUT: %.loc34_36.5: %i32 = value_of_initializer %int.convert_checked.loc34_36 [template = constants.%.42] -// CHECK:STDOUT: %.loc34_36.6: %i32 = converted %.loc34_36.1, %.loc34_36.5 [template = constants.%.42] -// CHECK:STDOUT: %.loc34_39.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_39.3: = bound_method %.loc34_39.1, %.loc34_39.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc34_39.4: = specific_function %.loc34_39.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc34_39: init %i32 = call %.loc34_39.4(%.loc34_39.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc34_39.5: %i32 = value_of_initializer %int.convert_checked.loc34_39 [template = constants.%.33] -// CHECK:STDOUT: %.loc34_39.6: %i32 = converted %.loc34_39.1, %.loc34_39.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc34_36.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc34_36.3: = bound_method %.loc34_36.1, %.loc34_36.2 [template = constants.%.48] +// CHECK:STDOUT: %.loc34_36.4: = specific_function %.loc34_36.3, @Convert.2(constants.%.1) [template = constants.%.49] +// CHECK:STDOUT: %int.convert_checked.loc34_36: init %i32 = call %.loc34_36.4(%.loc34_36.1) [template = constants.%.46] +// CHECK:STDOUT: %.loc34_36.5: %i32 = value_of_initializer %int.convert_checked.loc34_36 [template = constants.%.46] +// CHECK:STDOUT: %.loc34_36.6: %i32 = converted %.loc34_36.1, %.loc34_36.5 [template = constants.%.46] +// CHECK:STDOUT: %.loc34_39.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc34_39.3: = bound_method %.loc34_39.1, %.loc34_39.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc34_39.4: = specific_function %.loc34_39.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc34_39: init %i32 = call %.loc34_39.4(%.loc34_39.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc34_39.5: %i32 = value_of_initializer %int.convert_checked.loc34_39 [template = constants.%.37] +// CHECK:STDOUT: %.loc34_39.6: %i32 = converted %.loc34_39.1, %.loc34_39.5 [template = constants.%.37] // CHECK:STDOUT: %int.left_shift.loc34: init %i32 = call %LeftShift.ref.loc34(%.loc34_36.6, %.loc34_39.6) [template = ] // CHECK:STDOUT: %.loc34_42.1: %i32 = value_of_initializer %int.left_shift.loc34 [template = ] // CHECK:STDOUT: %.loc34_42.2: %i32 = converted %int.left_shift.loc34, %.loc34_42.1 [template = ] @@ -520,21 +520,21 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %.loc40_31.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc40_41.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc40_41.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc40_41.3: = bound_method %.loc40_41.1, %.loc40_41.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc40_41.4: = specific_function %.loc40_41.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc40_41: init %i32 = call %.loc40_41.4(%.loc40_41.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc40_41.5: %i32 = value_of_initializer %int.convert_checked.loc40_41 [template = constants.%.26] -// CHECK:STDOUT: %.loc40_41.6: %i32 = converted %.loc40_41.1, %.loc40_41.5 [template = constants.%.26] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc40_41.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc40_31.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc40_31.3: = bound_method %.loc40_31.1, %.loc40_31.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc40_31.4: = specific_function %.loc40_31.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc40_31: init %i32 = call %.loc40_31.4(%.loc40_31.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc40_31.5: %i32 = value_of_initializer %int.convert_checked.loc40_31 [template = constants.%.26] -// CHECK:STDOUT: %.loc40_31.6: %i32 = converted %.loc40_31.1, %.loc40_31.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc40_40.1: %i32 = value_of_initializer %int.snegate [template = constants.%.46] -// CHECK:STDOUT: %.loc40_40.2: %i32 = converted %int.snegate, %.loc40_40.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc40_41.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc40_41.3: = bound_method %.loc40_41.1, %.loc40_41.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc40_41.4: = specific_function %.loc40_41.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc40_41: init %i32 = call %.loc40_41.4(%.loc40_41.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc40_41.5: %i32 = value_of_initializer %int.convert_checked.loc40_41 [template = constants.%.30] +// CHECK:STDOUT: %.loc40_41.6: %i32 = converted %.loc40_41.1, %.loc40_41.5 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc40_41.6) [template = constants.%.50] +// CHECK:STDOUT: %.loc40_31.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc40_31.3: = bound_method %.loc40_31.1, %.loc40_31.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc40_31.4: = specific_function %.loc40_31.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc40_31: init %i32 = call %.loc40_31.4(%.loc40_31.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc40_31.5: %i32 = value_of_initializer %int.convert_checked.loc40_31 [template = constants.%.30] +// CHECK:STDOUT: %.loc40_31.6: %i32 = converted %.loc40_31.1, %.loc40_31.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc40_40.1: %i32 = value_of_initializer %int.snegate [template = constants.%.50] +// CHECK:STDOUT: %.loc40_40.2: %i32 = converted %int.snegate, %.loc40_40.1 [template = constants.%.50] // CHECK:STDOUT: %int.left_shift.loc40: init %i32 = call %LeftShift.ref.loc40(%.loc40_31.6, %.loc40_40.2) [template = ] // CHECK:STDOUT: %.loc40_44.1: %i32 = value_of_initializer %int.left_shift.loc40 [template = ] // CHECK:STDOUT: %.loc40_44.2: %i32 = converted %int.left_shift.loc40, %.loc40_44.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 76a38c962864..c190fd080f56 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -52,20 +52,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.33: bool = bool_literal true [template] -// CHECK:STDOUT: %.34: bool = bool_literal false [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.39: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.37: bool = bool_literal true [template] +// CHECK:STDOUT: %.38: bool = bool_literal false [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -203,21 +203,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Less.ref.loc9: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc9_21.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_24.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_21.3: = bound_method %.loc9_21.1, %.loc9_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_21.4: = specific_function %.loc9_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_21: init %i32 = call %.loc9_21.4(%.loc9_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_21.5: %i32 = value_of_initializer %int.convert_checked.loc9_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_21.6: %i32 = converted %.loc9_21.1, %.loc9_21.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_24.3: = bound_method %.loc9_24.1, %.loc9_24.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_24.4: = specific_function %.loc9_24.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_24: init %i32 = call %.loc9_24.4(%.loc9_24.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_24.5: %i32 = value_of_initializer %int.convert_checked.loc9_24 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_24.6: %i32 = converted %.loc9_24.1, %.loc9_24.5 [template = constants.%.32] -// CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21.6, %.loc9_24.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less.loc9 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less.loc9, %.loc9_13.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_21.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_21.3: = bound_method %.loc9_21.1, %.loc9_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_21.4: = specific_function %.loc9_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_21: init %i32 = call %.loc9_21.4(%.loc9_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc9_21.5: %i32 = value_of_initializer %int.convert_checked.loc9_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_21.6: %i32 = converted %.loc9_21.1, %.loc9_21.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_24.3: = bound_method %.loc9_24.1, %.loc9_24.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_24.4: = specific_function %.loc9_24.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_24: init %i32 = call %.loc9_24.4(%.loc9_24.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_24.5: %i32 = value_of_initializer %int.convert_checked.loc9_24 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_24.6: %i32 = converted %.loc9_24.1, %.loc9_24.5 [template = constants.%.36] +// CHECK:STDOUT: %int.less.loc9: init bool = call %Less.ref.loc9(%.loc9_21.6, %.loc9_24.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less.loc9 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less.loc9, %.loc9_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,21 +234,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Less.ref.loc10: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_25.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_22.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_22.3: = bound_method %.loc10_22.1, %.loc10_22.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_22.4: = specific_function %.loc10_22.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_22: init %i32 = call %.loc10_22.4(%.loc10_22.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_22.5: %i32 = value_of_initializer %int.convert_checked.loc10_22 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_22.6: %i32 = converted %.loc10_22.1, %.loc10_22.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_25.3: = bound_method %.loc10_25.1, %.loc10_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_25.4: = specific_function %.loc10_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %.loc10_25.4(%.loc10_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_25.5: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_25.6: %i32 = converted %.loc10_25.1, %.loc10_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22.6, %.loc10_25.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.less.loc10 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.less.loc10, %.loc10_14.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc10_22.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_22.3: = bound_method %.loc10_22.1, %.loc10_22.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_22.4: = specific_function %.loc10_22.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_22: init %i32 = call %.loc10_22.4(%.loc10_22.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_22.5: %i32 = value_of_initializer %int.convert_checked.loc10_22 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_22.6: %i32 = converted %.loc10_22.1, %.loc10_22.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_25.3: = bound_method %.loc10_25.1, %.loc10_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_25.4: = specific_function %.loc10_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_25: init %i32 = call %.loc10_25.4(%.loc10_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_25.5: %i32 = value_of_initializer %int.convert_checked.loc10_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_25.6: %i32 = converted %.loc10_25.1, %.loc10_25.5 [template = constants.%.33] +// CHECK:STDOUT: %int.less.loc10: init bool = call %Less.ref.loc10(%.loc10_22.6, %.loc10_25.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc10_14.1: bool = value_of_initializer %int.less.loc10 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_14.2: bool = converted %int.less.loc10, %.loc10_14.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc10_14.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -264,22 +264,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc11: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %.loc11_22.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 0 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_22.1, %.loc11_22.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %.loc11_22.4(%.loc11_22.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_22.5: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_22.6: %i32 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.3: = bound_method %.loc11_25.1, %.loc11_25.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_25.4: = specific_function %.loc11_25.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.38] -// CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22.6, %.loc11_25.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less.loc11 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less.loc11, %.loc11_14.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_22.1, %.loc11_22.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %.loc11_22.4(%.loc11_22.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_22.5: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_22.6: %i32 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_25.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_25.3: = bound_method %.loc11_25.1, %.loc11_25.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc11_25.4: = specific_function %.loc11_25.3, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.42] +// CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.42] +// CHECK:STDOUT: %int.less.loc11: init bool = call %Less.ref.loc11(%.loc11_22.6, %.loc11_25.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less.loc11 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less.loc11, %.loc11_14.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -296,25 +296,25 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Less.ref.loc12: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_28.3: = bound_method %.loc12_28.1, %.loc12_28.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_28.4: = specific_function %.loc12_28.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_28: init %i32 = call %.loc12_28.4(%.loc12_28.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_28.5: %i32 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_28.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc12_32.1: Core.IntLiteral = int_value 0 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_27.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_27.2: %i32 = converted %int.snegate.loc12, %.loc12_27.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.38] -// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_32.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_28.3: = bound_method %.loc12_28.1, %.loc12_28.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_28.4: = specific_function %.loc12_28.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_28: init %i32 = call %.loc12_28.4(%.loc12_28.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_28.5: %i32 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_28.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc12_32.1: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_27.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_27.2: %i32 = converted %int.snegate.loc12, %.loc12_27.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.42] +// CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.42] +// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_32.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -329,27 +329,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %Less.ref.loc13: %Less.type = name_ref Less, file.%Less.decl [template = constants.%Less] -// CHECK:STDOUT: %.loc13_22.1: Core.IntLiteral = int_value 0 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_22.1: Core.IntLiteral = int_value 0 [template = constants.%.39] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_32.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_32.3: = bound_method %.loc13_32.1, %.loc13_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_32.4: = specific_function %.loc13_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %.loc13_32.4(%.loc13_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_32.5: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_32.6: %i32 = converted %.loc13_32.1, %.loc13_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_32.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc13_22.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_22.3: = bound_method %.loc13_22.1, %.loc13_22.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_22.4: = specific_function %.loc13_22.3, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc13_22: init %i32 = call %.loc13_22.4(%.loc13_22.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_22.5: %i32 = value_of_initializer %int.convert_checked.loc13_22 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_22.6: %i32 = converted %.loc13_22.1, %.loc13_22.5 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_31.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_31.2: %i32 = converted %int.snegate.loc13, %.loc13_31.1 [template = constants.%.39] -// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22.6, %.loc13_31.2) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_32.3: = bound_method %.loc13_32.1, %.loc13_32.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_32.4: = specific_function %.loc13_32.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc13_32: init %i32 = call %.loc13_32.4(%.loc13_32.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_32.5: %i32 = value_of_initializer %int.convert_checked.loc13_32 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_32.6: %i32 = converted %.loc13_32.1, %.loc13_32.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_32.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc13_22.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_22.3: = bound_method %.loc13_22.1, %.loc13_22.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc13_22.4: = specific_function %.loc13_22.3, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc13_22: init %i32 = call %.loc13_22.4(%.loc13_22.1) [template = constants.%.42] +// CHECK:STDOUT: %.loc13_22.5: %i32 = value_of_initializer %int.convert_checked.loc13_22 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_22.6: %i32 = converted %.loc13_22.1, %.loc13_22.5 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_31.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_31.2: %i32 = converted %int.snegate.loc13, %.loc13_31.1 [template = constants.%.43] +// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22.6, %.loc13_31.2) [template = constants.%.38] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 01a01fff8290..9a4dfe406b01 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -52,20 +52,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.33: bool = bool_literal true [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.38: bool = bool_literal false [template] -// CHECK:STDOUT: %.39: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.37: bool = bool_literal true [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.42: bool = bool_literal false [template] +// CHECK:STDOUT: %.43: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -203,21 +203,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %LessEq.ref.loc9: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc9_26.1: Core.IntLiteral = int_value 2 [template = constants.%.6] -// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_26.3: = bound_method %.loc9_26.1, %.loc9_26.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_26.4: = specific_function %.loc9_26.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i32 = call %.loc9_26.4(%.loc9_26.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_26.5: %i32 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_26.6: %i32 = converted %.loc9_26.1, %.loc9_26.5 [template = constants.%.32] -// CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23.6, %.loc9_26.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less_eq.loc9 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less_eq.loc9, %.loc9_13.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_26.3: = bound_method %.loc9_26.1, %.loc9_26.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_26.4: = specific_function %.loc9_26.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i32 = call %.loc9_26.4(%.loc9_26.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_26.5: %i32 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_26.6: %i32 = converted %.loc9_26.1, %.loc9_26.5 [template = constants.%.36] +// CHECK:STDOUT: %int.less_eq.loc9: init bool = call %LessEq.ref.loc9(%.loc9_23.6, %.loc9_26.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.less_eq.loc9 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.less_eq.loc9, %.loc9_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: @@ -234,21 +234,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %LessEq.ref.loc10: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc10_23.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc10_23.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_23.3: = bound_method %.loc10_23.1, %.loc10_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_23.4: = specific_function %.loc10_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %.loc10_23.4(%.loc10_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_23.5: %i32 = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_23.6: %i32 = converted %.loc10_23.1, %.loc10_23.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23.6, %.loc10_26.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.less_eq.loc10 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.less_eq.loc10, %.loc10_13.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_23.3: = bound_method %.loc10_23.1, %.loc10_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_23.4: = specific_function %.loc10_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %.loc10_23.4(%.loc10_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_23.5: %i32 = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_23.6: %i32 = converted %.loc10_23.1, %.loc10_23.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.33] +// CHECK:STDOUT: %int.less_eq.loc10: init bool = call %LessEq.ref.loc10(%.loc10_23.6, %.loc10_26.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc10_13.1: bool = value_of_initializer %int.less_eq.loc10 [template = constants.%.37] +// CHECK:STDOUT: %.loc10_13.2: bool = converted %int.less_eq.loc10, %.loc10_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc10_13.2 br !if.expr.then.loc10 else br !if.expr.else.loc10 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc10: @@ -264,22 +264,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.ref.loc11: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc11: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %.loc11_24.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 0 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_24.3: = bound_method %.loc11_24.1, %.loc11_24.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_24.4: = specific_function %.loc11_24.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %.loc11_24.4(%.loc11_24.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_24.5: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_24.6: %i32 = converted %.loc11_24.1, %.loc11_24.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_27.1, %.loc11_27.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %.loc11_27.4(%.loc11_27.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.5: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_27.6: %i32 = converted %.loc11_27.1, %.loc11_27.5 [template = constants.%.37] -// CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24.6, %.loc11_27.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less_eq.loc11 [template = constants.%.38] -// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less_eq.loc11, %.loc11_14.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_27.1: Core.IntLiteral = int_value 0 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_24.3: = bound_method %.loc11_24.1, %.loc11_24.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_24.4: = specific_function %.loc11_24.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_24: init %i32 = call %.loc11_24.4(%.loc11_24.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_24.5: %i32 = value_of_initializer %int.convert_checked.loc11_24 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_24.6: %i32 = converted %.loc11_24.1, %.loc11_24.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_27.1, %.loc11_27.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i32 = call %.loc11_27.4(%.loc11_27.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc11_27.5: %i32 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.41] +// CHECK:STDOUT: %.loc11_27.6: %i32 = converted %.loc11_27.1, %.loc11_27.5 [template = constants.%.41] +// CHECK:STDOUT: %int.less_eq.loc11: init bool = call %LessEq.ref.loc11(%.loc11_24.6, %.loc11_27.6) [template = constants.%.42] +// CHECK:STDOUT: %.loc11_14.1: bool = value_of_initializer %int.less_eq.loc11 [template = constants.%.42] +// CHECK:STDOUT: %.loc11_14.2: bool = converted %int.less_eq.loc11, %.loc11_14.1 [template = constants.%.42] // CHECK:STDOUT: if %.loc11_14.2 br !if.expr.then.loc11 else br !if.expr.else.loc11 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc11: @@ -296,25 +296,25 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %LessEq.ref.loc12: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_30.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc12_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_30.3: = bound_method %.loc12_30.1, %.loc12_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_30.4: = specific_function %.loc12_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_30: init %i32 = call %.loc12_30.4(%.loc12_30.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_30.5: %i32 = value_of_initializer %int.convert_checked.loc12_30 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_30.6: %i32 = converted %.loc12_30.1, %.loc12_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_30.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 0 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.37] -// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_34.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_30.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_30.3: = bound_method %.loc12_30.1, %.loc12_30.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_30.4: = specific_function %.loc12_30.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_30: init %i32 = call %.loc12_30.4(%.loc12_30.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_30.5: %i32 = value_of_initializer %int.convert_checked.loc12_30 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_30.6: %i32 = converted %.loc12_30.1, %.loc12_30.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_30.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 0 [template = constants.%.38] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.41] +// CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.41] +// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_34.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12: @@ -329,27 +329,27 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_13.3: type = block_arg !if.expr.result.loc12 [template = constants.%True] // CHECK:STDOUT: %false_.ref.loc13: %False = name_ref false_, %false_ // CHECK:STDOUT: %LessEq.ref.loc13: %LessEq.type = name_ref LessEq, file.%LessEq.decl [template = constants.%LessEq] -// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 0 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_24.1: Core.IntLiteral = int_value 0 [template = constants.%.38] // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_34.1, %.loc13_34.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %.loc13_34.4(%.loc13_34.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_34.5: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_34.6: %i32 = converted %.loc13_34.1, %.loc13_34.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_24.1, %.loc13_24.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.39] -// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24.6, %.loc13_33.2) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_34.3: = bound_method %.loc13_34.1, %.loc13_34.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_34.4: = specific_function %.loc13_34.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc13_34: init %i32 = call %.loc13_34.4(%.loc13_34.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_34.5: %i32 = value_of_initializer %int.convert_checked.loc13_34 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_34.6: %i32 = converted %.loc13_34.1, %.loc13_34.5 [template = constants.%.33] +// CHECK:STDOUT: %int.snegate.loc13: init %i32 = call %Negate.ref.loc13(%.loc13_34.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_24.1, %.loc13_24.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.41] +// CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.41] +// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.43] +// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24.6, %.loc13_33.2) [template = constants.%.42] +// CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%.42] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc13: diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index 4342d927ce2c..9919fe9715e4 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -526,17 +526,17 @@ var m: Int(1000000000); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.28: = bound_method %.26, %Convert.15 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -582,21 +582,21 @@ var m: Int(1000000000); // CHECK:STDOUT: %Int.ref: %Int.type.2 = name_ref Int, imports.%import_ref.2 [template = constants.%Int.2] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_19.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_19.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_19.3: = bound_method %.loc12_19.1, %.loc12_19.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_19.4: = specific_function %.loc12_19.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_19: init %i32 = call %.loc12_19.4(%.loc12_19.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_19.5: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_19.6: %i32 = converted %.loc12_19.1, %.loc12_19.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_18.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc12_18.2: = bound_method %int.snegate, %.loc12_18.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_18.3: = specific_function %.loc12_18.2, @Convert.4(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_18.4: %i32 = value_of_initializer %int.snegate [template = constants.%.26] -// CHECK:STDOUT: %.loc12_18.5: %i32 = converted %int.snegate, %.loc12_18.4 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc12_18: init Core.IntLiteral = call %.loc12_18.3(%.loc12_18.5) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.7: Core.IntLiteral = converted %int.snegate, %.loc12_18.6 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_19.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_19.3: = bound_method %.loc12_19.1, %.loc12_19.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_19.4: = specific_function %.loc12_19.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_19: init %i32 = call %.loc12_19.4(%.loc12_19.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_19.5: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_19.6: %i32 = converted %.loc12_19.1, %.loc12_19.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_18.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc12_18.2: = bound_method %int.snegate, %.loc12_18.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_18.3: = specific_function %.loc12_18.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_18.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] +// CHECK:STDOUT: %.loc12_18.5: %i32 = converted %int.snegate, %.loc12_18.4 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc12_18: init Core.IntLiteral = call %.loc12_18.3(%.loc12_18.5) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_18.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_18.7: Core.IntLiteral = converted %int.snegate, %.loc12_18.6 [template = constants.%.34] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_18.7) [template = ] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 6064066bfac6..973beff8097e 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -325,17 +325,17 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.28: = bound_method %.26, %Convert.15 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value -1 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -381,21 +381,21 @@ var m: UInt(1000000000); // CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_20.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_20.3: = bound_method %.loc12_20.1, %.loc12_20.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_20.4: = specific_function %.loc12_20.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_20: init %i32 = call %.loc12_20.4(%.loc12_20.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_20.5: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_20.6: %i32 = converted %.loc12_20.1, %.loc12_20.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_19.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc12_19.2: = bound_method %int.snegate, %.loc12_19.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_19.3: = specific_function %.loc12_19.2, @Convert.4(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_19.4: %i32 = value_of_initializer %int.snegate [template = constants.%.26] -// CHECK:STDOUT: %.loc12_19.5: %i32 = converted %int.snegate, %.loc12_19.4 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc12_19: init Core.IntLiteral = call %.loc12_19.3(%.loc12_19.5) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_19.7: Core.IntLiteral = converted %int.snegate, %.loc12_19.6 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_20.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_20.3: = bound_method %.loc12_20.1, %.loc12_20.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_20.4: = specific_function %.loc12_20.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_20: init %i32 = call %.loc12_20.4(%.loc12_20.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_20.5: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_20.6: %i32 = converted %.loc12_20.1, %.loc12_20.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc12_19.2: = bound_method %int.snegate, %.loc12_19.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_19.3: = specific_function %.loc12_19.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_19.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] +// CHECK:STDOUT: %.loc12_19.5: %i32 = converted %int.snegate, %.loc12_19.4 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc12_19: init Core.IntLiteral = call %.loc12_19.3(%.loc12_19.5) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_19.7: Core.IntLiteral = converted %int.snegate, %.loc12_19.6 [template = constants.%.34] // CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_19.7) [template = ] // CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_unsigned, %.loc12_22.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index ce7201a8f300..27e3edb47c9d 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -45,16 +45,16 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.29: bool = bool_literal false [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: bool = bool_literal true [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.33: bool = bool_literal false [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: bool = bool_literal true [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -170,21 +170,21 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %Neq.ref.loc8: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %.loc8_21.1: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc8_24.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_21.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_21.3: = bound_method %.loc8_21.1, %.loc8_21.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_21.4: = specific_function %.loc8_21.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc8_21: init %i32 = call %.loc8_21.4(%.loc8_21.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc8_21.5: %i32 = value_of_initializer %int.convert_checked.loc8_21 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_21.6: %i32 = converted %.loc8_21.1, %.loc8_21.5 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_24.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_24.3: = bound_method %.loc8_24.1, %.loc8_24.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_24.4: = specific_function %.loc8_24.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc8_24: init %i32 = call %.loc8_24.4(%.loc8_24.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc8_24.5: %i32 = value_of_initializer %int.convert_checked.loc8_24 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_24.6: %i32 = converted %.loc8_24.1, %.loc8_24.5 [template = constants.%.28] -// CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21.6, %.loc8_24.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_14.1: bool = value_of_initializer %int.neq.loc8 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_14.2: bool = converted %int.neq.loc8, %.loc8_14.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_21.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_21.3: = bound_method %.loc8_21.1, %.loc8_21.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_21.4: = specific_function %.loc8_21.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc8_21: init %i32 = call %.loc8_21.4(%.loc8_21.1) [template = constants.%.32] +// CHECK:STDOUT: %.loc8_21.5: %i32 = value_of_initializer %int.convert_checked.loc8_21 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_21.6: %i32 = converted %.loc8_21.1, %.loc8_21.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_24.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_24.3: = bound_method %.loc8_24.1, %.loc8_24.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_24.4: = specific_function %.loc8_24.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc8_24: init %i32 = call %.loc8_24.4(%.loc8_24.1) [template = constants.%.32] +// CHECK:STDOUT: %.loc8_24.5: %i32 = value_of_initializer %int.convert_checked.loc8_24 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_24.6: %i32 = converted %.loc8_24.1, %.loc8_24.5 [template = constants.%.32] +// CHECK:STDOUT: %int.neq.loc8: init bool = call %Neq.ref.loc8(%.loc8_21.6, %.loc8_24.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_14.1: bool = value_of_initializer %int.neq.loc8 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_14.2: bool = converted %int.neq.loc8, %.loc8_14.1 [template = constants.%.33] // CHECK:STDOUT: if %.loc8_14.2 br !if.expr.then.loc8 else br !if.expr.else.loc8 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc8: @@ -200,22 +200,22 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %true_.ref: %True = name_ref true_, %true_ // CHECK:STDOUT: %Neq.ref.loc9: %Neq.type = name_ref Neq, file.%Neq.decl [template = constants.%Neq] // CHECK:STDOUT: %.loc9_20.1: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_20.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_20.3: = bound_method %.loc9_20.1, %.loc9_20.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_20.4: = specific_function %.loc9_20.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %.loc9_20.4(%.loc9_20.1) [template = constants.%.28] -// CHECK:STDOUT: %.loc9_20.5: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_20.6: %i32 = converted %.loc9_20.1, %.loc9_20.5 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.33] -// CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20.6, %.loc9_23.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.neq.loc9 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.neq.loc9, %.loc9_13.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_23.1: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_20.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_20.3: = bound_method %.loc9_20.1, %.loc9_20.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_20.4: = specific_function %.loc9_20.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_20: init %i32 = call %.loc9_20.4(%.loc9_20.1) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_20.5: %i32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_20.6: %i32 = converted %.loc9_20.1, %.loc9_20.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_23.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_23.3: = bound_method %.loc9_23.1, %.loc9_23.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_23.4: = specific_function %.loc9_23.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc9_23: init %i32 = call %.loc9_23.4(%.loc9_23.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_23.5: %i32 = value_of_initializer %int.convert_checked.loc9_23 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_23.6: %i32 = converted %.loc9_23.1, %.loc9_23.5 [template = constants.%.37] +// CHECK:STDOUT: %int.neq.loc9: init bool = call %Neq.ref.loc9(%.loc9_20.6, %.loc9_23.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc9_13.1: bool = value_of_initializer %int.neq.loc9 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_13.2: bool = converted %int.neq.loc9, %.loc9_13.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc9_13.2 br !if.expr.then.loc9 else br !if.expr.else.loc9 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc9: diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 55d3154c10e1..1c368dd09c0f 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -34,22 +34,22 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 10 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 14 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 14 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 14 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -104,39 +104,39 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, %Or.decl [template = constants.%Or] // CHECK:STDOUT: %.loc4_19.1: Core.IntLiteral = int_value 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_19.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_19.3: = bound_method %.loc4_19.1, %.loc4_19.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_19.4: = specific_function %.loc4_19.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %.loc4_19.4(%.loc4_19.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_19.5: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_19.6: %i32 = converted %.loc4_19.1, %.loc4_19.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_19.3: = bound_method %.loc4_19.1, %.loc4_19.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_19.4: = specific_function %.loc4_19.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %.loc4_19.4(%.loc4_19.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_19.5: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_19.6: %i32 = converted %.loc4_19.1, %.loc4_19.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_18.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_18.2: = bound_method %int.or, %.loc4_18.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_18.3: = specific_function %.loc4_18.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_18.4: %i32 = value_of_initializer %int.or [template = constants.%.30] -// CHECK:STDOUT: %.loc4_18.5: %i32 = converted %int.or, %.loc4_18.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_18: init Core.IntLiteral = call %.loc4_18.3(%.loc4_18.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_18.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_18 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_18.7: Core.IntLiteral = converted %int.or, %.loc4_18.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_26: type = array_type %.loc4_18.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_18.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_18.2: = bound_method %int.or, %.loc4_18.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_18.3: = specific_function %.loc4_18.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_18.4: %i32 = value_of_initializer %int.or [template = constants.%.34] +// CHECK:STDOUT: %.loc4_18.5: %i32 = converted %int.or, %.loc4_18.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_18: init Core.IntLiteral = call %.loc4_18.3(%.loc4_18.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_18.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_18 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_18.7: Core.IntLiteral = converted %int.or, %.loc4_18.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26: type = array_type %.loc4_18.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 14 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 14 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_21: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_20: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_21: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -181,9 +181,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 468c4b63a232..cc70e28a5e4c 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -79,22 +79,22 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 22 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 22 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 5 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -149,39 +149,39 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %RightShift.ref: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc4_27.1: Core.IntLiteral = int_value 22 [template = constants.%.2] // CHECK:STDOUT: %.loc4_31.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_27.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_27.3: = bound_method %.loc4_27.1, %.loc4_27.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_27.4: = specific_function %.loc4_27.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_27: init %i32 = call %.loc4_27.4(%.loc4_27.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_27.5: %i32 = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_27.6: %i32 = converted %.loc4_27.1, %.loc4_27.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_31.3: = bound_method %.loc4_31.1, %.loc4_31.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_31.4: = specific_function %.loc4_31.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_31: init %i32 = call %.loc4_31.4(%.loc4_31.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_31.5: %i32 = value_of_initializer %int.convert_checked.loc4_31 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_31.6: %i32 = converted %.loc4_31.1, %.loc4_31.5 [template = constants.%.29] -// CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.6, %.loc4_31.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_27.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_27.3: = bound_method %.loc4_27.1, %.loc4_27.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_27.4: = specific_function %.loc4_27.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_27: init %i32 = call %.loc4_27.4(%.loc4_27.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_27.5: %i32 = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_27.6: %i32 = converted %.loc4_27.1, %.loc4_27.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_31.3: = bound_method %.loc4_31.1, %.loc4_31.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_31.4: = specific_function %.loc4_31.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_31: init %i32 = call %.loc4_31.4(%.loc4_31.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_31.5: %i32 = value_of_initializer %int.convert_checked.loc4_31 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_31.6: %i32 = converted %.loc4_31.1, %.loc4_31.5 [template = constants.%.33] +// CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.6, %.loc4_31.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.right_shift, %.loc4_26.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.right_shift [template = constants.%.30] -// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.right_shift, %.loc4_26.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.right_shift, %.loc4_26.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_33: type = array_type %.loc4_26.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.right_shift, %.loc4_26.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.right_shift [template = constants.%.34] +// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.right_shift, %.loc4_26.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.right_shift, %.loc4_26.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_33: type = array_type %.loc4_26.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 5 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 5 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -226,9 +226,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -248,34 +248,34 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.28: = bound_method %.25, %Convert.15 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.30: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.31: type = ptr_type %.30 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.36: %i32 = int_value -10 [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.37, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.41: %i32 = int_value -3 [template] -// CHECK:STDOUT: %.42: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.15 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.46: type = array_type %.45, %i32 [template] -// CHECK:STDOUT: %.47: type = ptr_type %.46 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.15 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.34: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %.35: type = ptr_type %.34 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 10 [template] +// CHECK:STDOUT: %.40: %i32 = int_value -10 [template] +// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.42: = bound_method %.41, %Convert.14 [template] +// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.44: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.45: %i32 = int_value -3 [template] +// CHECK:STDOUT: %.46: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.47: = bound_method %.46, %Convert.15 [template] +// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.49: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.50: type = array_type %.49, %i32 [template] +// CHECK:STDOUT: %.51: type = ptr_type %.50 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -350,92 +350,92 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %RightShift.ref.loc10: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %Negate.ref.loc10_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc10_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_42.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_42.3: = bound_method %.loc10_42.1, %.loc10_42.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_42.4: = specific_function %.loc10_42.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %.loc10_42.4(%.loc10_42.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc10_42.5: %i32 = value_of_initializer %int.convert_checked.loc10_42 [template = constants.%.25] -// CHECK:STDOUT: %.loc10_42.6: %i32 = converted %.loc10_42.1, %.loc10_42.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc10_41: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc10_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_42.3: = bound_method %.loc10_42.1, %.loc10_42.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc10_42.4: = specific_function %.loc10_42.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %.loc10_42.4(%.loc10_42.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc10_42.5: %i32 = value_of_initializer %int.convert_checked.loc10_42 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_42.6: %i32 = converted %.loc10_42.1, %.loc10_42.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc10_41: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.6) [template = constants.%.30] // CHECK:STDOUT: %.loc10_46.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_41.1: %i32 = value_of_initializer %int.snegate.loc10_41 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_41.2: %i32 = converted %int.snegate.loc10_41, %.loc10_41.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_46.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_46.3: = bound_method %.loc10_46.1, %.loc10_46.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_46.4: = specific_function %.loc10_46.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %.loc10_46.4(%.loc10_46.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc10_46.5: %i32 = value_of_initializer %int.convert_checked.loc10_46 [template = constants.%.25] -// CHECK:STDOUT: %.loc10_46.6: %i32 = converted %.loc10_46.1, %.loc10_46.5 [template = constants.%.25] -// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_41.2, %.loc10_46.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.right_shift.loc10, %.loc10_34.1 [template = constants.%.26] -// CHECK:STDOUT: %int.snegate.loc10_23: init %i32 = call %Negate.ref.loc10_17(%.loc10_34.2) [template = constants.%.25] +// CHECK:STDOUT: %.loc10_41.1: %i32 = value_of_initializer %int.snegate.loc10_41 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_41.2: %i32 = converted %int.snegate.loc10_41, %.loc10_41.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_46.3: = bound_method %.loc10_46.1, %.loc10_46.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc10_46.4: = specific_function %.loc10_46.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %.loc10_46.4(%.loc10_46.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc10_46.5: %i32 = value_of_initializer %int.convert_checked.loc10_46 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_46.6: %i32 = converted %.loc10_46.1, %.loc10_46.5 [template = constants.%.29] +// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_41.2, %.loc10_46.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.right_shift.loc10, %.loc10_34.1 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc10_23: init %i32 = call %Negate.ref.loc10_17(%.loc10_34.2) [template = constants.%.29] // CHECK:STDOUT: %.loc10_12.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] // CHECK:STDOUT: %.loc10_12.3: type = converted %int.make_type_signed.loc10, %.loc10_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_23.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc10_23.2: = bound_method %int.snegate.loc10_23, %.loc10_23.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc10_23.3: = specific_function %.loc10_23.2, @Convert.4(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_23.4: %i32 = value_of_initializer %int.snegate.loc10_23 [template = constants.%.25] -// CHECK:STDOUT: %.loc10_23.5: %i32 = converted %int.snegate.loc10_23, %.loc10_23.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc10_23.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc10_23.2: = bound_method %int.snegate.loc10_23, %.loc10_23.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc10_23.3: = specific_function %.loc10_23.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_23.4: %i32 = value_of_initializer %int.snegate.loc10_23 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_23.5: %i32 = converted %int.snegate.loc10_23, %.loc10_23.4 [template = constants.%.29] // CHECK:STDOUT: %int.convert_checked.loc10_23: init Core.IntLiteral = call %.loc10_23.3(%.loc10_23.5) [template = constants.%.2] // CHECK:STDOUT: %.loc10_23.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%.2] // CHECK:STDOUT: %.loc10_23.7: Core.IntLiteral = converted %int.snegate.loc10_23, %.loc10_23.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_49: type = array_type %.loc10_23.7, %i32 [template = constants.%.30] -// CHECK:STDOUT: %arr1.var: ref %.30 = var arr1 -// CHECK:STDOUT: %arr1: ref %.30 = bind_name arr1, %arr1.var +// CHECK:STDOUT: %.loc10_49: type = array_type %.loc10_23.7, %i32 [template = constants.%.34] +// CHECK:STDOUT: %arr1.var: ref %.34 = var arr1 +// CHECK:STDOUT: %arr1: ref %.34 = bind_name arr1, %arr1.var // CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_14.1) [template = constants.%i32] // CHECK:STDOUT: %.loc11_19: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc11_14.2: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] // CHECK:STDOUT: %.loc11_14.3: type = converted %int.make_type_signed.loc11, %.loc11_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_20: type = array_type %.loc11_19, %i32 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_21: type = ptr_type %.30 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_20: type = array_type %.loc11_19, %i32 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_21: type = ptr_type %.34 [template = constants.%.35] // CHECK:STDOUT: %.loc14_12.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_12.1) [template = constants.%i32] // CHECK:STDOUT: %Negate.ref.loc14_17: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %RightShift.ref.loc14: %RightShift.type = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %Negate.ref.loc14_35: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 10 [template = constants.%.32] -// CHECK:STDOUT: %.loc14_42.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_42.3: = bound_method %.loc14_42.1, %.loc14_42.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_42.4: = specific_function %.loc14_42.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.35] -// CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.35] -// CHECK:STDOUT: %int.snegate.loc14_41: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_47.1: Core.IntLiteral = int_value 2 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_41.1: %i32 = value_of_initializer %int.snegate.loc14_41 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_41.2: %i32 = converted %int.snegate.loc14_41, %.loc14_41.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_47.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_47.3: = bound_method %.loc14_47.1, %.loc14_47.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_47.4: = specific_function %.loc14_47.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %.loc14_47.4(%.loc14_47.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc14_47.5: %i32 = value_of_initializer %int.convert_checked.loc14_47 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_47.6: %i32 = converted %.loc14_47.1, %.loc14_47.5 [template = constants.%.40] -// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_41.2, %.loc14_47.6) [template = constants.%.41] -// CHECK:STDOUT: %.loc14_34.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.41] -// CHECK:STDOUT: %.loc14_34.2: %i32 = converted %int.right_shift.loc14, %.loc14_34.1 [template = constants.%.41] -// CHECK:STDOUT: %int.snegate.loc14_23: init %i32 = call %Negate.ref.loc14_17(%.loc14_34.2) [template = constants.%.42] +// CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 10 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_42.3: = bound_method %.loc14_42.1, %.loc14_42.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_42.4: = specific_function %.loc14_42.3, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.39] +// CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.39] +// CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.39] +// CHECK:STDOUT: %int.snegate.loc14_41: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.6) [template = constants.%.40] +// CHECK:STDOUT: %.loc14_47.1: Core.IntLiteral = int_value 2 [template = constants.%.41] +// CHECK:STDOUT: %.loc14_41.1: %i32 = value_of_initializer %int.snegate.loc14_41 [template = constants.%.40] +// CHECK:STDOUT: %.loc14_41.2: %i32 = converted %int.snegate.loc14_41, %.loc14_41.1 [template = constants.%.40] +// CHECK:STDOUT: %.loc14_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_47.3: = bound_method %.loc14_47.1, %.loc14_47.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc14_47.4: = specific_function %.loc14_47.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %.loc14_47.4(%.loc14_47.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc14_47.5: %i32 = value_of_initializer %int.convert_checked.loc14_47 [template = constants.%.44] +// CHECK:STDOUT: %.loc14_47.6: %i32 = converted %.loc14_47.1, %.loc14_47.5 [template = constants.%.44] +// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_41.2, %.loc14_47.6) [template = constants.%.45] +// CHECK:STDOUT: %.loc14_34.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.45] +// CHECK:STDOUT: %.loc14_34.2: %i32 = converted %int.right_shift.loc14, %.loc14_34.1 [template = constants.%.45] +// CHECK:STDOUT: %int.snegate.loc14_23: init %i32 = call %Negate.ref.loc14_17(%.loc14_34.2) [template = constants.%.46] // CHECK:STDOUT: %.loc14_12.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] // CHECK:STDOUT: %.loc14_12.3: type = converted %int.make_type_signed.loc14, %.loc14_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc14_23.2: = bound_method %int.snegate.loc14_23, %.loc14_23.1 [template = constants.%.43] -// CHECK:STDOUT: %.loc14_23.3: = specific_function %.loc14_23.2, @Convert.4(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %.loc14_23.4: %i32 = value_of_initializer %int.snegate.loc14_23 [template = constants.%.42] -// CHECK:STDOUT: %.loc14_23.5: %i32 = converted %int.snegate.loc14_23, %.loc14_23.4 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc14_23: init Core.IntLiteral = call %.loc14_23.3(%.loc14_23.5) [template = constants.%.45] -// CHECK:STDOUT: %.loc14_23.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_23 [template = constants.%.45] -// CHECK:STDOUT: %.loc14_23.7: Core.IntLiteral = converted %int.snegate.loc14_23, %.loc14_23.6 [template = constants.%.45] -// CHECK:STDOUT: %.loc14_50: type = array_type %.loc14_23.7, %i32 [template = constants.%.46] -// CHECK:STDOUT: %arr2.var: ref %.46 = var arr2 -// CHECK:STDOUT: %arr2: ref %.46 = bind_name arr2, %arr2.var +// CHECK:STDOUT: %.loc14_23.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc14_23.2: = bound_method %int.snegate.loc14_23, %.loc14_23.1 [template = constants.%.47] +// CHECK:STDOUT: %.loc14_23.3: = specific_function %.loc14_23.2, @Convert.4(constants.%.1) [template = constants.%.48] +// CHECK:STDOUT: %.loc14_23.4: %i32 = value_of_initializer %int.snegate.loc14_23 [template = constants.%.46] +// CHECK:STDOUT: %.loc14_23.5: %i32 = converted %int.snegate.loc14_23, %.loc14_23.4 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc14_23: init Core.IntLiteral = call %.loc14_23.3(%.loc14_23.5) [template = constants.%.49] +// CHECK:STDOUT: %.loc14_23.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_23 [template = constants.%.49] +// CHECK:STDOUT: %.loc14_23.7: Core.IntLiteral = converted %int.snegate.loc14_23, %.loc14_23.6 [template = constants.%.49] +// CHECK:STDOUT: %.loc14_50: type = array_type %.loc14_23.7, %i32 [template = constants.%.50] +// CHECK:STDOUT: %arr2.var: ref %.50 = var arr2 +// CHECK:STDOUT: %arr2: ref %.50 = bind_name arr2, %arr2.var // CHECK:STDOUT: %.loc15_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_14.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19: Core.IntLiteral = int_value 3 [template = constants.%.45] +// CHECK:STDOUT: %.loc15_19: Core.IntLiteral = int_value 3 [template = constants.%.49] // CHECK:STDOUT: %.loc15_14.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_14.3: type = converted %int.make_type_signed.loc15, %.loc15_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_20: type = array_type %.loc15_19, %i32 [template = constants.%.46] -// CHECK:STDOUT: %.loc15_21: type = ptr_type %.46 [template = constants.%.47] +// CHECK:STDOUT: %.loc15_20: type = array_type %.loc15_19, %i32 [template = constants.%.50] +// CHECK:STDOUT: %.loc15_21: type = ptr_type %.50 [template = constants.%.51] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RightShift(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; @@ -444,12 +444,12 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr1.ref: ref %.30 = name_ref arr1, file.%arr1 -// CHECK:STDOUT: %.loc11: %.31 = addr_of %arr1.ref -// CHECK:STDOUT: %arr1_p: %.31 = bind_name arr1_p, %.loc11 -// CHECK:STDOUT: %arr2.ref: ref %.46 = name_ref arr2, file.%arr2 -// CHECK:STDOUT: %.loc15: %.47 = addr_of %arr2.ref -// CHECK:STDOUT: %arr2_p: %.47 = bind_name arr2_p, %.loc15 +// CHECK:STDOUT: %arr1.ref: ref %.34 = name_ref arr1, file.%arr1 +// CHECK:STDOUT: %.loc11: %.35 = addr_of %arr1.ref +// CHECK:STDOUT: %arr1_p: %.35 = bind_name arr1_p, %.loc11 +// CHECK:STDOUT: %arr2.ref: ref %.50 = name_ref arr2, file.%arr2 +// CHECK:STDOUT: %.loc15: %.51 = addr_of %arr2.ref +// CHECK:STDOUT: %arr2_p: %.51 = bind_name arr2_p, %.loc15 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -469,22 +469,22 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 31 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.31: = bound_method %.1, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 32 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 33 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 31 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.35: = bound_method %.1, %Convert.14 [template] // CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 33 [template] -// CHECK:STDOUT: %.38: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 32 [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 33 [template] +// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 33 [template] +// CHECK:STDOUT: %.42: %i32 = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -580,56 +580,56 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %RightShift.ref.loc8: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc8_30.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_33.1: Core.IntLiteral = int_value 31 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_30.3: = bound_method %.loc8_30.1, %.loc8_30.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc8_30.4: = specific_function %.loc8_30.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %.loc8_30.4(%.loc8_30.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_30.5: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_30.6: %i32 = converted %.loc8_30.1, %.loc8_30.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_33.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_33.3: = bound_method %.loc8_33.1, %.loc8_33.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_33.4: = specific_function %.loc8_33.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i32 = call %.loc8_33.4(%.loc8_33.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_33.5: %i32 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_33.6: %i32 = converted %.loc8_33.1, %.loc8_33.5 [template = constants.%.29] -// CHECK:STDOUT: %int.right_shift.loc8: init %i32 = call %RightShift.ref.loc8(%.loc8_30.6, %.loc8_33.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_36.1: %i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_36.2: %i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_30.3: = bound_method %.loc8_30.1, %.loc8_30.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc8_30.4: = specific_function %.loc8_30.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %.loc8_30.4(%.loc8_30.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_30.5: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_30.6: %i32 = converted %.loc8_30.1, %.loc8_30.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_33.3: = bound_method %.loc8_33.1, %.loc8_33.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc8_33.4: = specific_function %.loc8_33.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i32 = call %.loc8_33.4(%.loc8_33.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_33.5: %i32 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_33.6: %i32 = converted %.loc8_33.1, %.loc8_33.5 [template = constants.%.33] +// CHECK:STDOUT: %int.right_shift.loc8: init %i32 = call %RightShift.ref.loc8(%.loc8_30.6, %.loc8_33.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc8_36.1: %i32 = value_of_initializer %int.right_shift.loc8 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_36.2: %i32 = converted %int.right_shift.loc8, %.loc8_36.1 [template = constants.%.34] // CHECK:STDOUT: %size_1: %i32 = bind_name size_1, %.loc8_36.2 // CHECK:STDOUT: %RightShift.ref.loc13: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc13_30.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_33.1: Core.IntLiteral = int_value 32 [template = constants.%.1] -// CHECK:STDOUT: %.loc13_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_30.3: = bound_method %.loc13_30.1, %.loc13_30.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_30.4: = specific_function %.loc13_30.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc13_30: init %i32 = call %.loc13_30.4(%.loc13_30.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_30.5: %i32 = value_of_initializer %int.convert_checked.loc13_30 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_30.6: %i32 = converted %.loc13_30.1, %.loc13_30.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_33.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_33.3: = bound_method %.loc13_33.1, %.loc13_33.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc13_33.4: = specific_function %.loc13_33.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc13_33: init %i32 = call %.loc13_33.4(%.loc13_33.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_33.5: %i32 = value_of_initializer %int.convert_checked.loc13_33 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_33.6: %i32 = converted %.loc13_33.1, %.loc13_33.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_30.3: = bound_method %.loc13_30.1, %.loc13_30.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_30.4: = specific_function %.loc13_30.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc13_30: init %i32 = call %.loc13_30.4(%.loc13_30.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_30.5: %i32 = value_of_initializer %int.convert_checked.loc13_30 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_30.6: %i32 = converted %.loc13_30.1, %.loc13_30.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_33.3: = bound_method %.loc13_33.1, %.loc13_33.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_33.4: = specific_function %.loc13_33.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc13_33: init %i32 = call %.loc13_33.4(%.loc13_33.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_33.5: %i32 = value_of_initializer %int.convert_checked.loc13_33 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_33.6: %i32 = converted %.loc13_33.1, %.loc13_33.5 [template = constants.%.37] // CHECK:STDOUT: %int.right_shift.loc13: init %i32 = call %RightShift.ref.loc13(%.loc13_30.6, %.loc13_33.6) [template = ] // CHECK:STDOUT: %.loc13_36.1: %i32 = value_of_initializer %int.right_shift.loc13 [template = ] // CHECK:STDOUT: %.loc13_36.2: %i32 = converted %int.right_shift.loc13, %.loc13_36.1 [template = ] // CHECK:STDOUT: %size_2: %i32 = bind_name size_2, %.loc13_36.2 // CHECK:STDOUT: %RightShift.ref.loc18: %RightShift.type = name_ref RightShift, file.%RightShift.decl [template = constants.%RightShift] // CHECK:STDOUT: %.loc18_30.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 33 [template = constants.%.34] -// CHECK:STDOUT: %.loc18_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_30.3: = bound_method %.loc18_30.1, %.loc18_30.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc18_30.4: = specific_function %.loc18_30.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc18_30: init %i32 = call %.loc18_30.4(%.loc18_30.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc18_30.5: %i32 = value_of_initializer %int.convert_checked.loc18_30 [template = constants.%.26] -// CHECK:STDOUT: %.loc18_30.6: %i32 = converted %.loc18_30.1, %.loc18_30.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc18_33.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_33.3: = bound_method %.loc18_33.1, %.loc18_33.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc18_33.4: = specific_function %.loc18_33.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc18_33: init %i32 = call %.loc18_33.4(%.loc18_33.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc18_33.5: %i32 = value_of_initializer %int.convert_checked.loc18_33 [template = constants.%.37] -// CHECK:STDOUT: %.loc18_33.6: %i32 = converted %.loc18_33.1, %.loc18_33.5 [template = constants.%.37] +// CHECK:STDOUT: %.loc18_33.1: Core.IntLiteral = int_value 33 [template = constants.%.38] +// CHECK:STDOUT: %.loc18_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_30.3: = bound_method %.loc18_30.1, %.loc18_30.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc18_30.4: = specific_function %.loc18_30.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc18_30: init %i32 = call %.loc18_30.4(%.loc18_30.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc18_30.5: %i32 = value_of_initializer %int.convert_checked.loc18_30 [template = constants.%.30] +// CHECK:STDOUT: %.loc18_30.6: %i32 = converted %.loc18_30.1, %.loc18_30.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc18_33.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_33.3: = bound_method %.loc18_33.1, %.loc18_33.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc18_33.4: = specific_function %.loc18_33.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc18_33: init %i32 = call %.loc18_33.4(%.loc18_33.1) [template = constants.%.41] +// CHECK:STDOUT: %.loc18_33.5: %i32 = value_of_initializer %int.convert_checked.loc18_33 [template = constants.%.41] +// CHECK:STDOUT: %.loc18_33.6: %i32 = converted %.loc18_33.1, %.loc18_33.5 [template = constants.%.41] // CHECK:STDOUT: %int.right_shift.loc18: init %i32 = call %RightShift.ref.loc18(%.loc18_30.6, %.loc18_33.6) [template = ] // CHECK:STDOUT: %.loc18_36.1: %i32 = value_of_initializer %int.right_shift.loc18 [template = ] // CHECK:STDOUT: %.loc18_36.2: %i32 = converted %int.right_shift.loc18, %.loc18_36.1 [template = ] @@ -638,21 +638,21 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %.loc24_32.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc24_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc24_42.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_42.3: = bound_method %.loc24_42.1, %.loc24_42.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc24_42.4: = specific_function %.loc24_42.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc24_42: init %i32 = call %.loc24_42.4(%.loc24_42.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc24_42.5: %i32 = value_of_initializer %int.convert_checked.loc24_42 [template = constants.%.26] -// CHECK:STDOUT: %.loc24_42.6: %i32 = converted %.loc24_42.1, %.loc24_42.5 [template = constants.%.26] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc24_42.6) [template = constants.%.38] -// CHECK:STDOUT: %.loc24_32.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_32.3: = bound_method %.loc24_32.1, %.loc24_32.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc24_32.4: = specific_function %.loc24_32.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc24_32: init %i32 = call %.loc24_32.4(%.loc24_32.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc24_32.5: %i32 = value_of_initializer %int.convert_checked.loc24_32 [template = constants.%.26] -// CHECK:STDOUT: %.loc24_32.6: %i32 = converted %.loc24_32.1, %.loc24_32.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc24_41.1: %i32 = value_of_initializer %int.snegate [template = constants.%.38] -// CHECK:STDOUT: %.loc24_41.2: %i32 = converted %int.snegate, %.loc24_41.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc24_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_42.3: = bound_method %.loc24_42.1, %.loc24_42.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc24_42.4: = specific_function %.loc24_42.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc24_42: init %i32 = call %.loc24_42.4(%.loc24_42.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc24_42.5: %i32 = value_of_initializer %int.convert_checked.loc24_42 [template = constants.%.30] +// CHECK:STDOUT: %.loc24_42.6: %i32 = converted %.loc24_42.1, %.loc24_42.5 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc24_42.6) [template = constants.%.42] +// CHECK:STDOUT: %.loc24_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_32.3: = bound_method %.loc24_32.1, %.loc24_32.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc24_32.4: = specific_function %.loc24_32.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc24_32: init %i32 = call %.loc24_32.4(%.loc24_32.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc24_32.5: %i32 = value_of_initializer %int.convert_checked.loc24_32 [template = constants.%.30] +// CHECK:STDOUT: %.loc24_32.6: %i32 = converted %.loc24_32.1, %.loc24_32.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc24_41.1: %i32 = value_of_initializer %int.snegate [template = constants.%.42] +// CHECK:STDOUT: %.loc24_41.2: %i32 = converted %int.snegate, %.loc24_41.1 [template = constants.%.42] // CHECK:STDOUT: %int.right_shift.loc24: init %i32 = call %RightShift.ref.loc24(%.loc24_32.6, %.loc24_41.2) [template = ] // CHECK:STDOUT: %.loc24_45.1: %i32 = value_of_initializer %int.right_shift.loc24 [template = ] // CHECK:STDOUT: %.loc24_45.2: %i32 = converted %int.right_shift.loc24, %.loc24_45.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 3133e90a6c1a..268f1c1a8ace 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -104,22 +104,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -174,39 +174,39 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.sadd, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.sadd [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.sadd, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.sadd, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.sadd, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.sadd, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.sadd, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 3 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 3 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -251,9 +251,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -278,18 +278,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.28: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.35: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -435,12 +435,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_15.1) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %.loc25_27.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc25_27.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_27.3: = bound_method %.loc25_27.1, %.loc25_27.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc25_27.4: = specific_function %.loc25_27.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %.loc25_27.4(%.loc25_27.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc25_27.5: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%.25] -// CHECK:STDOUT: %.loc25_27.6: %i32 = converted %.loc25_27.1, %.loc25_27.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc25_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_27.3: = bound_method %.loc25_27.1, %.loc25_27.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc25_27.4: = specific_function %.loc25_27.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %.loc25_27.4(%.loc25_27.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc25_27.5: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%.29] +// CHECK:STDOUT: %.loc25_27.6: %i32 = converted %.loc25_27.1, %.loc25_27.5 [template = constants.%.29] // CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.6) // CHECK:STDOUT: %.loc25_15.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] // CHECK:STDOUT: %.loc25_15.3: type = converted %int.make_type_signed.loc25, %.loc25_15.2 [template = constants.%i32] @@ -450,26 +450,26 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_16.1) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc30_35.1: Core.IntLiteral = int_value 3 [template = constants.%.27] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.25] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_35.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_35.3: = bound_method %.loc30_35.1, %.loc30_35.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc30_35.4: = specific_function %.loc30_35.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %.loc30_35.4(%.loc30_35.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc30_35.5: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%.33] -// CHECK:STDOUT: %.loc30_35.6: %i32 = converted %.loc30_35.1, %.loc30_35.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc30_35.1: Core.IntLiteral = int_value 3 [template = constants.%.31] +// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.34] +// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.34] +// CHECK:STDOUT: %.loc30_35.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_35.3: = bound_method %.loc30_35.1, %.loc30_35.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc30_35.4: = specific_function %.loc30_35.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %.loc30_35.4(%.loc30_35.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc30_35.5: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%.37] +// CHECK:STDOUT: %.loc30_35.6: %i32 = converted %.loc30_35.1, %.loc30_35.5 [template = constants.%.37] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6, %.loc30_35.6) // CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] // CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] @@ -479,19 +479,19 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_45.1: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%.25] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.25] -// CHECK:STDOUT: %.loc35_45.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_45.3: = bound_method %.loc35_45.1, %.loc35_45.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc35_45.4: = specific_function %.loc35_45.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %.loc35_45.4(%.loc35_45.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc35_45.5: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%.30] -// CHECK:STDOUT: %.loc35_45.6: %i32 = converted %.loc35_45.1, %.loc35_45.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc35_45.1: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%.29] +// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc35_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_45.3: = bound_method %.loc35_45.1, %.loc35_45.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc35_45.4: = specific_function %.loc35_45.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %.loc35_45.4(%.loc35_45.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc35_45.5: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%.34] +// CHECK:STDOUT: %.loc35_45.6: %i32 = converted %.loc35_45.1, %.loc35_45.5 [template = constants.%.34] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6, %.loc35_45.6) // CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] // CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] @@ -501,8 +501,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc44: init type = call constants.%Int(%.loc44_16.1) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc44_31: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc44_34: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc44_37: Core.IntLiteral = int_value 3 [template = constants.%.27] +// CHECK:STDOUT: %.loc44_34: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc44_37: Core.IntLiteral = int_value 3 [template = constants.%.31] // CHECK:STDOUT: %.loc44_16.2: type = value_of_initializer %int.make_type_signed.loc44 [template = constants.%i32] // CHECK:STDOUT: %.loc44_16.3: type = converted %int.make_type_signed.loc44, %.loc44_16.2 [template = constants.%i32] // CHECK:STDOUT: %.loc44_39: type = array_type , %i32 [template = ] @@ -645,18 +645,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.38: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -720,40 +720,40 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Add.ref.loc6: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc6_30.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_30.3: = bound_method %.loc6_30.1, %.loc6_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_30.4: = specific_function %.loc6_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_30: init %i32 = call %.loc6_30.4(%.loc6_30.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_30.5: %i32 = value_of_initializer %int.convert_checked.loc6_30 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_30.6: %i32 = converted %.loc6_30.1, %.loc6_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.sadd.loc6: init %i32 = call %Add.ref.loc6(%.loc6_18.6, %.loc6_30.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.sadd.loc6 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_30.3: = bound_method %.loc6_30.1, %.loc6_30.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_30.4: = specific_function %.loc6_30.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc6_30: init %i32 = call %.loc6_30.4(%.loc6_30.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_30.5: %i32 = value_of_initializer %int.convert_checked.loc6_30 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_30.6: %i32 = converted %.loc6_30.1, %.loc6_30.5 [template = constants.%.33] +// CHECK:STDOUT: %int.sadd.loc6: init %i32 = call %Add.ref.loc6(%.loc6_18.6, %.loc6_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.sadd.loc6 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.sadd.loc6, %.loc6_32.1 [template = constants.%.30] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Add.ref.loc10: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_30.1: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_30.3: = bound_method %.loc10_30.1, %.loc10_30.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_30.4: = specific_function %.loc10_30.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_30: init %i32 = call %.loc10_30.4(%.loc10_30.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_30.5: %i32 = value_of_initializer %int.convert_checked.loc10_30 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_30.6: %i32 = converted %.loc10_30.1, %.loc10_30.5 [template = constants.%.33] -// CHECK:STDOUT: %int.sadd.loc10: init %i32 = call %Add.ref.loc10(%.loc10_18.6, %.loc10_30.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc10_32.1: %i32 = value_of_initializer %int.sadd.loc10 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_32.2: %i32 = converted %int.sadd.loc10, %.loc10_32.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc10_30.1: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_30.3: = bound_method %.loc10_30.1, %.loc10_30.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc10_30.4: = specific_function %.loc10_30.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc10_30: init %i32 = call %.loc10_30.4(%.loc10_30.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc10_30.5: %i32 = value_of_initializer %int.convert_checked.loc10_30 [template = constants.%.37] +// CHECK:STDOUT: %.loc10_30.6: %i32 = converted %.loc10_30.1, %.loc10_30.5 [template = constants.%.37] +// CHECK:STDOUT: %int.sadd.loc10: init %i32 = call %Add.ref.loc10(%.loc10_18.6, %.loc10_30.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc10_32.1: %i32 = value_of_initializer %int.sadd.loc10 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_32.2: %i32 = converted %int.sadd.loc10, %.loc10_32.1 [template = constants.%.38] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc10_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index f503e41124c6..a5222a1cdf70 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -72,22 +72,22 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -142,39 +142,39 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.sdiv, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.sdiv [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.sdiv, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.sdiv, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.sdiv, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.sdiv [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.sdiv, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.sdiv, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -219,9 +219,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -242,17 +242,17 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.32: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.36: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -373,101 +373,101 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.31] -// CHECK:STDOUT: %int.sdiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.25] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.25] +// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] +// CHECK:STDOUT: %int.snegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.35] +// CHECK:STDOUT: %int.sdiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.30] -// CHECK:STDOUT: %int.sdiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] +// CHECK:STDOUT: %int.sdiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.36] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Div.ref.loc19: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc19: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc19_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc19_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc19_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_29.3: = bound_method %.loc19_29.1, %.loc19_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc19_29.4: = specific_function %.loc19_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc19_29: init %i32 = call %.loc19_29.4(%.loc19_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc19_29.5: %i32 = value_of_initializer %int.convert_checked.loc19_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc19_29.6: %i32 = converted %.loc19_29.1, %.loc19_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc19_28: init %i32 = call %Negate.ref.loc19_22(%.loc19_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc19_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc19_28.1: %i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.26] -// CHECK:STDOUT: %.loc19_28.2: %i32 = converted %int.snegate.loc19_28, %.loc19_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc19_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_43.3: = bound_method %.loc19_43.1, %.loc19_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc19_43.4: = specific_function %.loc19_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc19_43: init %i32 = call %.loc19_43.4(%.loc19_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc19_43.5: %i32 = value_of_initializer %int.convert_checked.loc19_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_43.6: %i32 = converted %.loc19_43.1, %.loc19_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_28.2, %.loc19_43.6) [template = constants.%.32] +// CHECK:STDOUT: %.loc19_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_29.3: = bound_method %.loc19_29.1, %.loc19_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc19_29.4: = specific_function %.loc19_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc19_29: init %i32 = call %.loc19_29.4(%.loc19_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc19_29.5: %i32 = value_of_initializer %int.convert_checked.loc19_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc19_29.6: %i32 = converted %.loc19_29.1, %.loc19_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc19_28: init %i32 = call %Negate.ref.loc19_22(%.loc19_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc19_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc19_28.1: %i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.30] +// CHECK:STDOUT: %.loc19_28.2: %i32 = converted %int.snegate.loc19_28, %.loc19_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc19_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_43.3: = bound_method %.loc19_43.1, %.loc19_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc19_43.4: = specific_function %.loc19_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc19_43: init %i32 = call %.loc19_43.4(%.loc19_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc19_43.5: %i32 = value_of_initializer %int.convert_checked.loc19_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc19_43.6: %i32 = converted %.loc19_43.1, %.loc19_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_28.2, %.loc19_43.6) [template = constants.%.36] // CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc19_54.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc19_54.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_54.3: = bound_method %.loc19_54.1, %.loc19_54.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc19_54.4: = specific_function %.loc19_54.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc19_54: init %i32 = call %.loc19_54.4(%.loc19_54.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc19_54.5: %i32 = value_of_initializer %int.convert_checked.loc19_54 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_54.6: %i32 = converted %.loc19_54.1, %.loc19_54.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc19_53: init %i32 = call %Negate.ref.loc19_47(%.loc19_54.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_21.2: %i32 = converted %int.ssub.loc19, %.loc19_21.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_53.1: %i32 = value_of_initializer %int.snegate.loc19_53 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_53.2: %i32 = converted %int.snegate.loc19_53, %.loc19_53.1 [template = constants.%.31] -// CHECK:STDOUT: %int.sdiv.loc19: init %i32 = call %Div.ref.loc19(%.loc19_21.2, %.loc19_53.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc19_57.1: %i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_57.2: %i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc19_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc19_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_54.3: = bound_method %.loc19_54.1, %.loc19_54.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc19_54.4: = specific_function %.loc19_54.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc19_54: init %i32 = call %.loc19_54.4(%.loc19_54.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc19_54.5: %i32 = value_of_initializer %int.convert_checked.loc19_54 [template = constants.%.34] +// CHECK:STDOUT: %.loc19_54.6: %i32 = converted %.loc19_54.1, %.loc19_54.5 [template = constants.%.34] +// CHECK:STDOUT: %int.snegate.loc19_53: init %i32 = call %Negate.ref.loc19_47(%.loc19_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_21.2: %i32 = converted %int.ssub.loc19, %.loc19_21.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_53.1: %i32 = value_of_initializer %int.snegate.loc19_53 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_53.2: %i32 = converted %int.snegate.loc19_53, %.loc19_53.1 [template = constants.%.35] +// CHECK:STDOUT: %int.sdiv.loc19: init %i32 = call %Div.ref.loc19(%.loc19_21.2, %.loc19_53.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc19_57.1: %i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_57.2: %i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc19_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -486,13 +486,13 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -556,18 +556,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_21.3: = bound_method %.loc10_21.1, %.loc10_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_21.4: = specific_function %.loc10_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %.loc10_21.4(%.loc10_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_21.5: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_21.6: %i32 = converted %.loc10_21.1, %.loc10_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_21.3: = bound_method %.loc10_21.1, %.loc10_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_21.4: = specific_function %.loc10_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %.loc10_21.4(%.loc10_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_21.5: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_21.6: %i32 = converted %.loc10_21.1, %.loc10_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.sdiv.loc10: init %i32 = call %Div.ref.loc10(%.loc10_18.6, %.loc10_21.6) [template = ] // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.sdiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int.sdiv.loc10, %.loc10_23.1 [template = ] @@ -575,18 +575,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc15_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_18.3: = bound_method %.loc15_18.1, %.loc15_18.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_18.4: = specific_function %.loc15_18.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %.loc15_18.4(%.loc15_18.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_18.5: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_18.6: %i32 = converted %.loc15_18.1, %.loc15_18.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_21.1, %.loc15_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %.loc15_21.4(%.loc15_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_21.5: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_21.6: %i32 = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_18.3: = bound_method %.loc15_18.1, %.loc15_18.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_18.4: = specific_function %.loc15_18.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %.loc15_18.4(%.loc15_18.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_18.5: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_18.6: %i32 = converted %.loc15_18.1, %.loc15_18.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_21.1, %.loc15_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %.loc15_21.4(%.loc15_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_21.5: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_21.6: %i32 = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.sdiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_18.6, %.loc15_21.6) [template = ] // CHECK:STDOUT: %.loc15_23.1: %i32 = value_of_initializer %int.sdiv.loc15 [template = ] // CHECK:STDOUT: %.loc15_23.2: %i32 = converted %int.sdiv.loc15, %.loc15_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 7c1d99d71e05..3da6e6a24af1 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -75,22 +75,22 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -145,39 +145,39 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.smod, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.smod [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.smod, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.smod, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.smod, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.smod [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.smod, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.smod, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 2 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -222,9 +222,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -245,18 +245,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.33: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.37: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -377,101 +377,101 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.31] -// CHECK:STDOUT: %int.smod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.smod.loc9 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] +// CHECK:STDOUT: %int.snegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.35] +// CHECK:STDOUT: %int.smod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.smod.loc9 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.36] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.30] -// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.smod.loc12 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] +// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.smod.loc12 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.36] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Mod.ref.loc20: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc20: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc20_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc20_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc20_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_29.3: = bound_method %.loc20_29.1, %.loc20_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc20_29.4: = specific_function %.loc20_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc20_29: init %i32 = call %.loc20_29.4(%.loc20_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc20_29.5: %i32 = value_of_initializer %int.convert_checked.loc20_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc20_29.6: %i32 = converted %.loc20_29.1, %.loc20_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc20_28: init %i32 = call %Negate.ref.loc20_22(%.loc20_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc20_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc20_28.1: %i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.26] -// CHECK:STDOUT: %.loc20_28.2: %i32 = converted %int.snegate.loc20_28, %.loc20_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc20_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_43.3: = bound_method %.loc20_43.1, %.loc20_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc20_43.4: = specific_function %.loc20_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc20_43: init %i32 = call %.loc20_43.4(%.loc20_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc20_43.5: %i32 = value_of_initializer %int.convert_checked.loc20_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc20_43.6: %i32 = converted %.loc20_43.1, %.loc20_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_28.2, %.loc20_43.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc20_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc20_29.3: = bound_method %.loc20_29.1, %.loc20_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc20_29.4: = specific_function %.loc20_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc20_29: init %i32 = call %.loc20_29.4(%.loc20_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc20_29.5: %i32 = value_of_initializer %int.convert_checked.loc20_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc20_29.6: %i32 = converted %.loc20_29.1, %.loc20_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc20_28: init %i32 = call %Negate.ref.loc20_22(%.loc20_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc20_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc20_28.1: %i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.30] +// CHECK:STDOUT: %.loc20_28.2: %i32 = converted %int.snegate.loc20_28, %.loc20_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc20_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc20_43.3: = bound_method %.loc20_43.1, %.loc20_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc20_43.4: = specific_function %.loc20_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc20_43: init %i32 = call %.loc20_43.4(%.loc20_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc20_43.5: %i32 = value_of_initializer %int.convert_checked.loc20_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc20_43.6: %i32 = converted %.loc20_43.1, %.loc20_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_28.2, %.loc20_43.6) [template = constants.%.37] // CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc20_54.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc20_54.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_54.3: = bound_method %.loc20_54.1, %.loc20_54.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc20_54.4: = specific_function %.loc20_54.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc20_54: init %i32 = call %.loc20_54.4(%.loc20_54.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc20_54.5: %i32 = value_of_initializer %int.convert_checked.loc20_54 [template = constants.%.30] -// CHECK:STDOUT: %.loc20_54.6: %i32 = converted %.loc20_54.1, %.loc20_54.5 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc20_53: init %i32 = call %Negate.ref.loc20_47(%.loc20_54.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc20_21.1: %i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.33] -// CHECK:STDOUT: %.loc20_21.2: %i32 = converted %int.ssub.loc20, %.loc20_21.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc20_53.1: %i32 = value_of_initializer %int.snegate.loc20_53 [template = constants.%.31] -// CHECK:STDOUT: %.loc20_53.2: %i32 = converted %int.snegate.loc20_53, %.loc20_53.1 [template = constants.%.31] -// CHECK:STDOUT: %int.smod.loc20: init %i32 = call %Mod.ref.loc20(%.loc20_21.2, %.loc20_53.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc20_57.1: %i32 = value_of_initializer %int.smod.loc20 [template = constants.%.32] -// CHECK:STDOUT: %.loc20_57.2: %i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc20_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc20_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc20_54.3: = bound_method %.loc20_54.1, %.loc20_54.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc20_54.4: = specific_function %.loc20_54.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc20_54: init %i32 = call %.loc20_54.4(%.loc20_54.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc20_54.5: %i32 = value_of_initializer %int.convert_checked.loc20_54 [template = constants.%.34] +// CHECK:STDOUT: %.loc20_54.6: %i32 = converted %.loc20_54.1, %.loc20_54.5 [template = constants.%.34] +// CHECK:STDOUT: %int.snegate.loc20_53: init %i32 = call %Negate.ref.loc20_47(%.loc20_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc20_21.1: %i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.37] +// CHECK:STDOUT: %.loc20_21.2: %i32 = converted %int.ssub.loc20, %.loc20_21.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc20_53.1: %i32 = value_of_initializer %int.snegate.loc20_53 [template = constants.%.35] +// CHECK:STDOUT: %.loc20_53.2: %i32 = converted %int.snegate.loc20_53, %.loc20_53.1 [template = constants.%.35] +// CHECK:STDOUT: %int.smod.loc20: init %i32 = call %Mod.ref.loc20(%.loc20_21.2, %.loc20_53.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc20_57.1: %i32 = value_of_initializer %int.smod.loc20 [template = constants.%.36] +// CHECK:STDOUT: %.loc20_57.2: %i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc20_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -490,13 +490,13 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -560,18 +560,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc12_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_18.3: = bound_method %.loc12_18.1, %.loc12_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc12_18.4: = specific_function %.loc12_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %.loc12_18.4(%.loc12_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_18.5: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_18.6: %i32 = converted %.loc12_18.1, %.loc12_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_21.3: = bound_method %.loc12_21.1, %.loc12_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_21.4: = specific_function %.loc12_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %.loc12_21.4(%.loc12_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_21.5: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_21.6: %i32 = converted %.loc12_21.1, %.loc12_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_18.3: = bound_method %.loc12_18.1, %.loc12_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc12_18.4: = specific_function %.loc12_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %.loc12_18.4(%.loc12_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_18.5: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_18.6: %i32 = converted %.loc12_18.1, %.loc12_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_21.3: = bound_method %.loc12_21.1, %.loc12_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_21.4: = specific_function %.loc12_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %.loc12_21.4(%.loc12_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_21.5: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_21.6: %i32 = converted %.loc12_21.1, %.loc12_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_18.6, %.loc12_21.6) [template = ] // CHECK:STDOUT: %.loc12_23.1: %i32 = value_of_initializer %int.smod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: %i32 = converted %int.smod.loc12, %.loc12_23.1 [template = ] @@ -579,18 +579,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc17_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_18.3: = bound_method %.loc17_18.1, %.loc17_18.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc17_18.4: = specific_function %.loc17_18.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %.loc17_18.4(%.loc17_18.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc17_18.5: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_18.6: %i32 = converted %.loc17_18.1, %.loc17_18.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc17_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_18.3: = bound_method %.loc17_18.1, %.loc17_18.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_18.4: = specific_function %.loc17_18.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %.loc17_18.4(%.loc17_18.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc17_18.5: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_18.6: %i32 = converted %.loc17_18.1, %.loc17_18.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.smod.loc17: init %i32 = call %Mod.ref.loc17(%.loc17_18.6, %.loc17_21.6) [template = ] // CHECK:STDOUT: %.loc17_23.1: %i32 = value_of_initializer %int.smod.loc17 [template = ] // CHECK:STDOUT: %.loc17_23.2: %i32 = converted %int.smod.loc17, %.loc17_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index c4a04a3cbd7c..bf2985d37fd1 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -46,22 +46,22 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -116,39 +116,39 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.smul, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.smul [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.smul, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.smul, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.smul, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.smul [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.smul, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.smul, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -193,9 +193,9 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -213,19 +213,19 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2147418112 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 32767 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2147418112 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -289,40 +289,40 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32767 [template = constants.%.2] // CHECK:STDOUT: %.loc6_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_26.3: = bound_method %.loc6_26.1, %.loc6_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_26.4: = specific_function %.loc6_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %.loc6_26.4(%.loc6_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_26.5: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_26.6: %i32 = converted %.loc6_26.1, %.loc6_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.smul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.6, %.loc6_26.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.smul.loc6 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_26.3: = bound_method %.loc6_26.1, %.loc6_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_26.4: = specific_function %.loc6_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %.loc6_26.4(%.loc6_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_26.5: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_26.6: %i32 = converted %.loc6_26.1, %.loc6_26.5 [template = constants.%.33] +// CHECK:STDOUT: %int.smul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.6, %.loc6_26.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.smul.loc6 [template = constants.%.34] +// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.smul.loc6, %.loc6_34.1 [template = constants.%.34] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_34.2 // CHECK:STDOUT: %Mul.ref.loc10: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 32768 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 32768 [template = constants.%.35] // CHECK:STDOUT: %.loc10_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.smul.loc10: init %i32 = call %Mul.ref.loc10(%.loc10_18.6, %.loc10_26.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.smul.loc10 [template = constants.%.35] -// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.smul.loc10, %.loc10_34.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_26.1, %.loc10_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_26: init %i32 = call %.loc10_26.4(%.loc10_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_26.1, %.loc10_26.5 [template = constants.%.33] +// CHECK:STDOUT: %int.smul.loc10: init %i32 = call %Mul.ref.loc10(%.loc10_18.6, %.loc10_26.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.smul.loc10 [template = constants.%.39] +// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.smul.loc10, %.loc10_34.1 [template = constants.%.39] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc10_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 4e707a911fb7..521b2fc3e6d2 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -130,23 +130,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 123 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -123 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 123 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -123 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.28: = bound_method %.25, %Convert.15 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.30: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.31: type = ptr_type %.30 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.15 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.34: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %.35: type = ptr_type %.34 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.40: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -194,36 +194,36 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc4_30.1: Core.IntLiteral = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_30.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_30.3: = bound_method %.loc4_30.1, %.loc4_30.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_30.4: = specific_function %.loc4_30.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.25] -// CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc4_29: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int.snegate.loc4_29, %.loc4_29.1 [template = constants.%.26] -// CHECK:STDOUT: %int.snegate.loc4_22: init %i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.25] +// CHECK:STDOUT: %.loc4_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_30.3: = bound_method %.loc4_30.1, %.loc4_30.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_30.4: = specific_function %.loc4_30.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc4_29: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int.snegate.loc4_29, %.loc4_29.1 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc4_22: init %i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.29] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_22.2: = bound_method %int.snegate.loc4_22, %.loc4_22.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_22.3: = specific_function %.loc4_22.2, @Convert.4(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_22.4: %i32 = value_of_initializer %int.snegate.loc4_22 [template = constants.%.25] -// CHECK:STDOUT: %.loc4_22.5: %i32 = converted %int.snegate.loc4_22, %.loc4_22.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc4_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_22.2: = bound_method %int.snegate.loc4_22, %.loc4_22.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc4_22.3: = specific_function %.loc4_22.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_22.4: %i32 = value_of_initializer %int.snegate.loc4_22 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_22.5: %i32 = converted %int.snegate.loc4_22, %.loc4_22.4 [template = constants.%.29] // CHECK:STDOUT: %int.convert_checked.loc4_22: init Core.IntLiteral = call %.loc4_22.3(%.loc4_22.5) [template = constants.%.2] // CHECK:STDOUT: %.loc4_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_22 [template = constants.%.2] // CHECK:STDOUT: %.loc4_22.7: Core.IntLiteral = converted %int.snegate.loc4_22, %.loc4_22.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_22.7, %i32 [template = constants.%.30] -// CHECK:STDOUT: %arr.var: ref %.30 = var arr -// CHECK:STDOUT: %arr: ref %.30 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_22.7, %i32 [template = constants.%.34] +// CHECK:STDOUT: %arr.var: ref %.34 = var arr +// CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 123 [template = constants.%.2] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, %i32 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_22: type = ptr_type %.30 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, %i32 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_22: type = ptr_type %.34 [template = constants.%.35] // CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] // CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] @@ -271,20 +271,20 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.30 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.31 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.31 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.34 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.35 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.35 = bind_name arr_p, %.loc5 // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc7_21.1: Core.IntLiteral = int_value 1 [template = constants.%.32] -// CHECK:STDOUT: %.loc7_21.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_21.3: = bound_method %.loc7_21.1, %.loc7_21.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_21.4: = specific_function %.loc7_21.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_21.4(%.loc7_21.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.35] -// CHECK:STDOUT: %.loc7_21.6: %i32 = converted %.loc7_21.1, %.loc7_21.5 [template = constants.%.35] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc7_21.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.snegate [template = constants.%.36] -// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.snegate, %.loc7_23.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_21.1: Core.IntLiteral = int_value 1 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_21.3: = bound_method %.loc7_21.1, %.loc7_21.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc7_21.4: = specific_function %.loc7_21.3, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_21.4(%.loc7_21.1) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.39] +// CHECK:STDOUT: %.loc7_21.6: %i32 = converted %.loc7_21.1, %.loc7_21.5 [template = constants.%.39] +// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc7_21.6) [template = constants.%.40] +// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.snegate [template = constants.%.40] +// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.snegate, %.loc7_23.1 [template = constants.%.40] // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc7_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -311,13 +311,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -440,18 +440,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.33] +// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.33] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6) // CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] // CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] @@ -461,12 +461,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%.26] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%.30] +// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.30] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6) // CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] // CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] @@ -611,16 +611,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -706,45 +706,45 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_28.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_28.3: = bound_method %.loc8_28.1, %.loc8_28.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc8_28.4: = specific_function %.loc8_28.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.25] -// CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc8_27: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int.snegate.loc8_27, %.loc8_27.1 [template = constants.%.26] -// CHECK:STDOUT: %int.snegate.loc8_20: init %i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.25] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_20 [template = constants.%.25] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_20, %.loc8_40.1 [template = constants.%.25] +// CHECK:STDOUT: %.loc8_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_28.3: = bound_method %.loc8_28.1, %.loc8_28.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc8_28.4: = specific_function %.loc8_28.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc8_27: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int.snegate.loc8_27, %.loc8_27.1 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc8_20: init %i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_20 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_20, %.loc8_40.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc14_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc14_32.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_32.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_32.3: = bound_method %.loc14_32.1, %.loc14_32.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc14_32.4: = specific_function %.loc14_32.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc14_32: init %i32 = call %.loc14_32.4(%.loc14_32.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc14_32.5: %i32 = value_of_initializer %int.convert_checked.loc14_32 [template = constants.%.25] -// CHECK:STDOUT: %.loc14_32.6: %i32 = converted %.loc14_32.1, %.loc14_32.5 [template = constants.%.25] -// CHECK:STDOUT: %int.snegate.loc14_31: init %i32 = call %Negate.ref.loc14_25(%.loc14_32.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_45.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_31.1: %i32 = value_of_initializer %int.snegate.loc14_31 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_31.2: %i32 = converted %int.snegate.loc14_31, %.loc14_31.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_45.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_45.3: = bound_method %.loc14_45.1, %.loc14_45.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_45.4: = specific_function %.loc14_45.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_45: init %i32 = call %.loc14_45.4(%.loc14_45.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_45.5: %i32 = value_of_initializer %int.convert_checked.loc14_45 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_45.6: %i32 = converted %.loc14_45.1, %.loc14_45.5 [template = constants.%.30] -// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc14_31.2, %.loc14_45.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc14_24.1: %i32 = value_of_initializer %int.ssub [template = constants.%.31] -// CHECK:STDOUT: %.loc14_24.2: %i32 = converted %int.ssub, %.loc14_24.1 [template = constants.%.31] -// CHECK:STDOUT: %int.snegate.loc14_20: init %i32 = call %Negate.ref.loc14_14(%.loc14_24.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.snegate.loc14_20 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.snegate.loc14_20, %.loc14_48.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_32.3: = bound_method %.loc14_32.1, %.loc14_32.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_32.4: = specific_function %.loc14_32.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc14_32: init %i32 = call %.loc14_32.4(%.loc14_32.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc14_32.5: %i32 = value_of_initializer %int.convert_checked.loc14_32 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_32.6: %i32 = converted %.loc14_32.1, %.loc14_32.5 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc14_31: init %i32 = call %Negate.ref.loc14_25(%.loc14_32.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_45.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_31.1: %i32 = value_of_initializer %int.snegate.loc14_31 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_31.2: %i32 = converted %int.snegate.loc14_31, %.loc14_31.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_45.3: = bound_method %.loc14_45.1, %.loc14_45.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_45.4: = specific_function %.loc14_45.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc14_45: init %i32 = call %.loc14_45.4(%.loc14_45.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc14_45.5: %i32 = value_of_initializer %int.convert_checked.loc14_45 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_45.6: %i32 = converted %.loc14_45.1, %.loc14_45.5 [template = constants.%.34] +// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc14_31.2, %.loc14_45.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc14_24.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] +// CHECK:STDOUT: %.loc14_24.2: %i32 = converted %int.ssub, %.loc14_24.1 [template = constants.%.35] +// CHECK:STDOUT: %int.snegate.loc14_20: init %i32 = call %Negate.ref.loc14_14(%.loc14_24.2) [template = constants.%.35] +// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.snegate.loc14_20 [template = constants.%.35] +// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.snegate.loc14_20, %.loc14_48.1 [template = constants.%.35] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc14_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 9aad99ce26f9..e3cdd30a650c 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -47,22 +47,22 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -117,39 +117,39 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.ssub, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.ssub [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.ssub, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.ssub, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.ssub, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.ssub [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.ssub, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.ssub, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -194,9 +194,9 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -214,23 +214,23 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.34: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -299,81 +299,81 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_21.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_21.3: = bound_method %.loc6_21.1, %.loc6_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_21.4: = specific_function %.loc6_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %.loc6_21.4(%.loc6_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_21.5: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_21.6: %i32 = converted %.loc6_21.1, %.loc6_21.5 [template = constants.%.29] -// CHECK:STDOUT: %int.ssub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.6, %.loc6_21.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.ssub.loc6 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_21.3: = bound_method %.loc6_21.1, %.loc6_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_21.4: = specific_function %.loc6_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %.loc6_21.4(%.loc6_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_21.5: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_21.6: %i32 = converted %.loc6_21.1, %.loc6_21.5 [template = constants.%.33] +// CHECK:STDOUT: %int.ssub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.6, %.loc6_21.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.ssub.loc6 [template = constants.%.34] +// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.ssub.loc6, %.loc6_32.1 [template = constants.%.34] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc7_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc7_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_22.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_22.3: = bound_method %.loc7_22.1, %.loc7_22.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc7_22.4: = specific_function %.loc7_22.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %.loc7_22.4(%.loc7_22.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc7_22.5: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_22.6: %i32 = converted %.loc7_22.1, %.loc7_22.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_25.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_25.3: = bound_method %.loc7_25.1, %.loc7_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_25.4: = specific_function %.loc7_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.ssub.loc7_21: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.ssub.loc7_21 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int.ssub.loc7_21, %.loc7_21.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc7_17: init %i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_17 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_17, %.loc7_40.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_22.3: = bound_method %.loc7_22.1, %.loc7_22.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc7_22.4: = specific_function %.loc7_22.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %.loc7_22.4(%.loc7_22.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc7_22.5: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_22.6: %i32 = converted %.loc7_22.1, %.loc7_22.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_25.3: = bound_method %.loc7_25.1, %.loc7_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_25.4: = specific_function %.loc7_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.33] +// CHECK:STDOUT: %int.ssub.loc7_21: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.ssub.loc7_21 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int.ssub.loc7_21, %.loc7_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.38] +// CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.38] +// CHECK:STDOUT: %int.ssub.loc7_17: init %i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_17 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_17, %.loc7_40.1 [template = constants.%.39] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc11_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc11_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_22.1, %.loc11_22.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %.loc11_22.4(%.loc11_22.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc11_22.5: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_22.6: %i32 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_25.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.3: = bound_method %.loc11_25.1, %.loc11_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_25.4: = specific_function %.loc11_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.ssub.loc11_21: init %i32 = call %Sub.ref.loc11_18(%.loc11_22.6, %.loc11_25.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_38.1: Core.IntLiteral = int_value 2 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_21.1: %i32 = value_of_initializer %int.ssub.loc11_21 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_21.2: %i32 = converted %int.ssub.loc11_21, %.loc11_21.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_38.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_38.3: = bound_method %.loc11_38.1, %.loc11_38.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_38.4: = specific_function %.loc11_38.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc11_38: init %i32 = call %.loc11_38.4(%.loc11_38.1) [template = constants.%.39] -// CHECK:STDOUT: %.loc11_38.5: %i32 = value_of_initializer %int.convert_checked.loc11_38 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_38.6: %i32 = converted %.loc11_38.1, %.loc11_38.5 [template = constants.%.39] -// CHECK:STDOUT: %int.ssub.loc11_17: init %i32 = call %Sub.ref.loc11_14(%.loc11_21.2, %.loc11_38.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_40.1: %i32 = value_of_initializer %int.ssub.loc11_17 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_40.2: %i32 = converted %int.ssub.loc11_17, %.loc11_40.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_22.3: = bound_method %.loc11_22.1, %.loc11_22.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc11_22.4: = specific_function %.loc11_22.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc11_22: init %i32 = call %.loc11_22.4(%.loc11_22.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc11_22.5: %i32 = value_of_initializer %int.convert_checked.loc11_22 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_22.6: %i32 = converted %.loc11_22.1, %.loc11_22.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_25.3: = bound_method %.loc11_25.1, %.loc11_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_25.4: = specific_function %.loc11_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.33] +// CHECK:STDOUT: %int.ssub.loc11_21: init %i32 = call %Sub.ref.loc11_18(%.loc11_22.6, %.loc11_25.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_38.1: Core.IntLiteral = int_value 2 [template = constants.%.40] +// CHECK:STDOUT: %.loc11_21.1: %i32 = value_of_initializer %int.ssub.loc11_21 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_21.2: %i32 = converted %int.ssub.loc11_21, %.loc11_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_38.3: = bound_method %.loc11_38.1, %.loc11_38.2 [template = constants.%.41] +// CHECK:STDOUT: %.loc11_38.4: = specific_function %.loc11_38.3, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc11_38: init %i32 = call %.loc11_38.4(%.loc11_38.1) [template = constants.%.43] +// CHECK:STDOUT: %.loc11_38.5: %i32 = value_of_initializer %int.convert_checked.loc11_38 [template = constants.%.43] +// CHECK:STDOUT: %.loc11_38.6: %i32 = converted %.loc11_38.1, %.loc11_38.5 [template = constants.%.43] +// CHECK:STDOUT: %int.ssub.loc11_17: init %i32 = call %Sub.ref.loc11_14(%.loc11_21.2, %.loc11_38.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_40.1: %i32 = value_of_initializer %int.ssub.loc11_17 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_40.2: %i32 = converted %int.ssub.loc11_17, %.loc11_40.1 [template = constants.%.33] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc11_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 503a0efdb13f..ae9bc75dd324 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -101,22 +101,22 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -171,39 +171,39 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.uadd, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.uadd [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.uadd, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.uadd, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.uadd, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.uadd [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.uadd, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.uadd, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 3 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 3 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -248,9 +248,9 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -275,18 +275,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.28: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.35: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -432,12 +432,12 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc25: init type = call constants.%Int(%.loc25_15.1) [template = constants.%i32] // CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] // CHECK:STDOUT: %.loc25_27.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc25_27.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_27.3: = bound_method %.loc25_27.1, %.loc25_27.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc25_27.4: = specific_function %.loc25_27.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %.loc25_27.4(%.loc25_27.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc25_27.5: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%.25] -// CHECK:STDOUT: %.loc25_27.6: %i32 = converted %.loc25_27.1, %.loc25_27.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc25_27.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_27.3: = bound_method %.loc25_27.1, %.loc25_27.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc25_27.4: = specific_function %.loc25_27.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %.loc25_27.4(%.loc25_27.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc25_27.5: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%.29] +// CHECK:STDOUT: %.loc25_27.6: %i32 = converted %.loc25_27.1, %.loc25_27.5 [template = constants.%.29] // CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.6) // CHECK:STDOUT: %.loc25_15.2: type = value_of_initializer %int.make_type_signed.loc25 [template = constants.%i32] // CHECK:STDOUT: %.loc25_15.3: type = converted %int.make_type_signed.loc25, %.loc25_15.2 [template = constants.%i32] @@ -447,26 +447,26 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_16.1) [template = constants.%i32] // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc30_35.1: Core.IntLiteral = int_value 3 [template = constants.%.27] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.25] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc30_35.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_35.3: = bound_method %.loc30_35.1, %.loc30_35.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc30_35.4: = specific_function %.loc30_35.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %.loc30_35.4(%.loc30_35.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc30_35.5: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%.33] -// CHECK:STDOUT: %.loc30_35.6: %i32 = converted %.loc30_35.1, %.loc30_35.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc30_35.1: Core.IntLiteral = int_value 3 [template = constants.%.31] +// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.34] +// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.34] +// CHECK:STDOUT: %.loc30_35.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_35.3: = bound_method %.loc30_35.1, %.loc30_35.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc30_35.4: = specific_function %.loc30_35.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %.loc30_35.4(%.loc30_35.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc30_35.5: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%.37] +// CHECK:STDOUT: %.loc30_35.6: %i32 = converted %.loc30_35.1, %.loc30_35.5 [template = constants.%.37] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6, %.loc30_35.6) // CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] // CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] @@ -476,19 +476,19 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_45.1: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%.25] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.25] -// CHECK:STDOUT: %.loc35_45.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_45.3: = bound_method %.loc35_45.1, %.loc35_45.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc35_45.4: = specific_function %.loc35_45.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %.loc35_45.4(%.loc35_45.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc35_45.5: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%.30] -// CHECK:STDOUT: %.loc35_45.6: %i32 = converted %.loc35_45.1, %.loc35_45.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc35_45.1: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%.29] +// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc35_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_45.3: = bound_method %.loc35_45.1, %.loc35_45.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc35_45.4: = specific_function %.loc35_45.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %.loc35_45.4(%.loc35_45.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc35_45.5: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%.34] +// CHECK:STDOUT: %.loc35_45.6: %i32 = converted %.loc35_45.1, %.loc35_45.5 [template = constants.%.34] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6, %.loc35_45.6) // CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] // CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] @@ -498,8 +498,8 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.make_type_signed.loc43: init type = call constants.%Int(%.loc43_16.1) [template = constants.%i32] // CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] // CHECK:STDOUT: %.loc43_31: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc43_34: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc43_37: Core.IntLiteral = int_value 3 [template = constants.%.27] +// CHECK:STDOUT: %.loc43_34: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc43_37: Core.IntLiteral = int_value 3 [template = constants.%.31] // CHECK:STDOUT: %.loc43_16.2: type = value_of_initializer %int.make_type_signed.loc43 [template = constants.%i32] // CHECK:STDOUT: %.loc43_16.3: type = converted %int.make_type_signed.loc43, %.loc43_16.2 [template = constants.%i32] // CHECK:STDOUT: %.loc43_39: type = array_type , %i32 [template = ] @@ -642,18 +642,18 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.38: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -717,40 +717,40 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %Add.ref.loc7: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc7_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] // CHECK:STDOUT: %.loc7_30.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_18.3: = bound_method %.loc7_18.1, %.loc7_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc7_18.4: = specific_function %.loc7_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %.loc7_18.4(%.loc7_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc7_18.5: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_18.6: %i32 = converted %.loc7_18.1, %.loc7_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_30.3: = bound_method %.loc7_30.1, %.loc7_30.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_30.4: = specific_function %.loc7_30.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7_30: init %i32 = call %.loc7_30.4(%.loc7_30.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_30.5: %i32 = value_of_initializer %int.convert_checked.loc7_30 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_30.6: %i32 = converted %.loc7_30.1, %.loc7_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.uadd.loc7: init %i32 = call %Add.ref.loc7(%.loc7_18.6, %.loc7_30.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc7_32.1: %i32 = value_of_initializer %int.uadd.loc7 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_32.2: %i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc7_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_18.3: = bound_method %.loc7_18.1, %.loc7_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc7_18.4: = specific_function %.loc7_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %.loc7_18.4(%.loc7_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc7_18.5: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_18.6: %i32 = converted %.loc7_18.1, %.loc7_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_30.3: = bound_method %.loc7_30.1, %.loc7_30.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_30.4: = specific_function %.loc7_30.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc7_30: init %i32 = call %.loc7_30.4(%.loc7_30.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_30.5: %i32 = value_of_initializer %int.convert_checked.loc7_30 [template = constants.%.33] +// CHECK:STDOUT: %.loc7_30.6: %i32 = converted %.loc7_30.1, %.loc7_30.5 [template = constants.%.33] +// CHECK:STDOUT: %int.uadd.loc7: init %i32 = call %Add.ref.loc7(%.loc7_18.6, %.loc7_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc7_32.1: %i32 = value_of_initializer %int.uadd.loc7 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_32.2: %i32 = converted %int.uadd.loc7, %.loc7_32.1 [template = constants.%.30] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc7_32.2 // CHECK:STDOUT: %Add.ref.loc8: %Add.type = name_ref Add, file.%Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc8_18.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_30.1: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_18.3: = bound_method %.loc8_18.1, %.loc8_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc8_18.4: = specific_function %.loc8_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc8_18: init %i32 = call %.loc8_18.4(%.loc8_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_18.5: %i32 = value_of_initializer %int.convert_checked.loc8_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_18.6: %i32 = converted %.loc8_18.1, %.loc8_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_30.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_30.3: = bound_method %.loc8_30.1, %.loc8_30.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_30.4: = specific_function %.loc8_30.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %.loc8_30.4(%.loc8_30.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_30.5: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_30.6: %i32 = converted %.loc8_30.1, %.loc8_30.5 [template = constants.%.33] -// CHECK:STDOUT: %int.uadd.loc8: init %i32 = call %Add.ref.loc8(%.loc8_18.6, %.loc8_30.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc8_32.1: %i32 = value_of_initializer %int.uadd.loc8 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_32.2: %i32 = converted %int.uadd.loc8, %.loc8_32.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_30.1: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_18.3: = bound_method %.loc8_18.1, %.loc8_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc8_18.4: = specific_function %.loc8_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc8_18: init %i32 = call %.loc8_18.4(%.loc8_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_18.5: %i32 = value_of_initializer %int.convert_checked.loc8_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_18.6: %i32 = converted %.loc8_18.1, %.loc8_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_30.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_30.3: = bound_method %.loc8_30.1, %.loc8_30.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc8_30.4: = specific_function %.loc8_30.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc8_30: init %i32 = call %.loc8_30.4(%.loc8_30.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc8_30.5: %i32 = value_of_initializer %int.convert_checked.loc8_30 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_30.6: %i32 = converted %.loc8_30.1, %.loc8_30.5 [template = constants.%.37] +// CHECK:STDOUT: %int.uadd.loc8: init %i32 = call %Add.ref.loc8(%.loc8_18.6, %.loc8_30.6) [template = constants.%.38] +// CHECK:STDOUT: %.loc8_32.1: %i32 = value_of_initializer %int.uadd.loc8 [template = constants.%.38] +// CHECK:STDOUT: %.loc8_32.2: %i32 = converted %int.uadd.loc8, %.loc8_32.1 [template = constants.%.38] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc8_32.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index 4941b2e20be3..7ba3aeab8c94 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -68,22 +68,22 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -138,39 +138,39 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref: %Div.type = name_ref Div, %Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.udiv, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.udiv [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.udiv, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.udiv, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.udiv, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.udiv [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.udiv, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.udiv, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -215,9 +215,9 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -238,18 +238,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.33: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.37: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -370,101 +370,101 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref.loc9: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.31] -// CHECK:STDOUT: %int.udiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] +// CHECK:STDOUT: %int.unegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.35] +// CHECK:STDOUT: %int.udiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.36] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Div.ref.loc12: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.30] -// CHECK:STDOUT: %int.udiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] +// CHECK:STDOUT: %int.udiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.37] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_29.3: = bound_method %.loc15_29.1, %.loc15_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc15_29.4: = specific_function %.loc15_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc15_28: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_29.3: = bound_method %.loc15_29.1, %.loc15_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc15_29.4: = specific_function %.loc15_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc15_28: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43.6) [template = constants.%.37] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_54.3: = bound_method %.loc15_54.1, %.loc15_54.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_54.4: = specific_function %.loc15_54.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc15_53: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_53.1: %i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_53.2: %i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.31] -// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.udiv.loc15 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_54.3: = bound_method %.loc15_54.1, %.loc15_54.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_54.4: = specific_function %.loc15_54.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.34] +// CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.34] +// CHECK:STDOUT: %int.unegate.loc15_53: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_53.1: %i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_53.2: %i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.35] +// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.udiv.loc15 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc15_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -483,13 +483,13 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -553,18 +553,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref.loc10: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc10_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc10_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc10_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_21.3: = bound_method %.loc10_21.1, %.loc10_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_21.4: = specific_function %.loc10_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %.loc10_21.4(%.loc10_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_21.5: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_21.6: %i32 = converted %.loc10_21.1, %.loc10_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_18.3: = bound_method %.loc10_18.1, %.loc10_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc10_18.4: = specific_function %.loc10_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc10_18: init %i32 = call %.loc10_18.4(%.loc10_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc10_18.5: %i32 = value_of_initializer %int.convert_checked.loc10_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_18.6: %i32 = converted %.loc10_18.1, %.loc10_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_21.3: = bound_method %.loc10_21.1, %.loc10_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_21.4: = specific_function %.loc10_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_21: init %i32 = call %.loc10_21.4(%.loc10_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_21.5: %i32 = value_of_initializer %int.convert_checked.loc10_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_21.6: %i32 = converted %.loc10_21.1, %.loc10_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.udiv.loc10: init %i32 = call %Div.ref.loc10(%.loc10_18.6, %.loc10_21.6) [template = ] // CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.udiv.loc10 [template = ] // CHECK:STDOUT: %.loc10_23.2: %i32 = converted %int.udiv.loc10, %.loc10_23.1 [template = ] @@ -572,18 +572,18 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %Div.ref.loc15: %Div.type = name_ref Div, file.%Div.decl [template = constants.%Div] // CHECK:STDOUT: %.loc15_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc15_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_18.3: = bound_method %.loc15_18.1, %.loc15_18.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_18.4: = specific_function %.loc15_18.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %.loc15_18.4(%.loc15_18.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_18.5: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_18.6: %i32 = converted %.loc15_18.1, %.loc15_18.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_21.1, %.loc15_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %.loc15_21.4(%.loc15_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_21.5: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_21.6: %i32 = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_18.3: = bound_method %.loc15_18.1, %.loc15_18.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_18.4: = specific_function %.loc15_18.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc15_18: init %i32 = call %.loc15_18.4(%.loc15_18.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_18.5: %i32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_18.6: %i32 = converted %.loc15_18.1, %.loc15_18.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_21.1, %.loc15_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc15_21: init %i32 = call %.loc15_21.4(%.loc15_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_21.5: %i32 = value_of_initializer %int.convert_checked.loc15_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_21.6: %i32 = converted %.loc15_21.1, %.loc15_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_18.6, %.loc15_21.6) [template = ] // CHECK:STDOUT: %.loc15_23.1: %i32 = value_of_initializer %int.udiv.loc15 [template = ] // CHECK:STDOUT: %.loc15_23.2: %i32 = converted %int.udiv.loc15, %.loc15_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 19104219b209..a25ddddfb2be 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -70,22 +70,22 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -140,39 +140,39 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref: %Mod.type = name_ref Mod, %Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 5 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.umod, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.umod [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.umod, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.umod, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.umod, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.umod [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.umod, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.umod, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 2 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -217,9 +217,9 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -240,18 +240,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -1 [template] -// CHECK:STDOUT: %.32: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.36: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -372,101 +372,101 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref.loc9: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Negate.ref.loc9_18: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.26] +// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_25.1, %.loc9_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.31] -// CHECK:STDOUT: %int.umod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.26] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.umod.loc9 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_46.3: = bound_method %.loc9_46.1, %.loc9_46.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_46.4: = specific_function %.loc9_46.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] +// CHECK:STDOUT: %int.unegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.35] +// CHECK:STDOUT: %int.umod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.30] +// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.umod.loc9 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.30] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc12: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc12: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc12_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.30] -// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.umod.loc12 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_29.3: = bound_method %.loc12_29.1, %.loc12_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_29.4: = specific_function %.loc12_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %.loc12_29.4(%.loc12_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.5: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] +// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.umod.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.37] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 // CHECK:STDOUT: %Mod.ref.loc15: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %Sub.ref.loc15: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc15_22: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_29.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_29.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_29.3: = bound_method %.loc15_29.1, %.loc15_29.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc15_29.4: = specific_function %.loc15_29.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.25] -// CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc15_28: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43.6) [template = constants.%.32] +// CHECK:STDOUT: %.loc15_29.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_29.3: = bound_method %.loc15_29.1, %.loc15_29.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc15_29.4: = specific_function %.loc15_29.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc15_28: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.34] +// CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.34] +// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43.6) [template = constants.%.36] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_54.3: = bound_method %.loc15_54.1, %.loc15_54.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_54.4: = specific_function %.loc15_54.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc15_53: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_53.1: %i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_53.2: %i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.31] -// CHECK:STDOUT: %int.umod.loc15: init %i32 = call %Mod.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.umod.loc15 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_54.3: = bound_method %.loc15_54.1, %.loc15_54.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_54.4: = specific_function %.loc15_54.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.34] +// CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.34] +// CHECK:STDOUT: %int.unegate.loc15_53: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_53.1: %i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_53.2: %i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.35] +// CHECK:STDOUT: %int.umod.loc15: init %i32 = call %Mod.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.umod.loc15 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc15_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -485,13 +485,13 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -555,18 +555,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref.loc12: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc12_18.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc12_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc12_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_18.3: = bound_method %.loc12_18.1, %.loc12_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc12_18.4: = specific_function %.loc12_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %.loc12_18.4(%.loc12_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc12_18.5: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_18.6: %i32 = converted %.loc12_18.1, %.loc12_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_21.3: = bound_method %.loc12_21.1, %.loc12_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_21.4: = specific_function %.loc12_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %.loc12_21.4(%.loc12_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_21.5: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_21.6: %i32 = converted %.loc12_21.1, %.loc12_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_18.3: = bound_method %.loc12_18.1, %.loc12_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc12_18.4: = specific_function %.loc12_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc12_18: init %i32 = call %.loc12_18.4(%.loc12_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc12_18.5: %i32 = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_18.6: %i32 = converted %.loc12_18.1, %.loc12_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_21.3: = bound_method %.loc12_21.1, %.loc12_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_21.4: = specific_function %.loc12_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_21: init %i32 = call %.loc12_21.4(%.loc12_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_21.5: %i32 = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_21.6: %i32 = converted %.loc12_21.1, %.loc12_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_18.6, %.loc12_21.6) [template = ] // CHECK:STDOUT: %.loc12_23.1: %i32 = value_of_initializer %int.umod.loc12 [template = ] // CHECK:STDOUT: %.loc12_23.2: %i32 = converted %int.umod.loc12, %.loc12_23.1 [template = ] @@ -574,18 +574,18 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %Mod.ref.loc17: %Mod.type = name_ref Mod, file.%Mod.decl [template = constants.%Mod] // CHECK:STDOUT: %.loc17_18.1: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_18.3: = bound_method %.loc17_18.1, %.loc17_18.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc17_18.4: = specific_function %.loc17_18.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %.loc17_18.4(%.loc17_18.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc17_18.5: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_18.6: %i32 = converted %.loc17_18.1, %.loc17_18.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc17_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_18.3: = bound_method %.loc17_18.1, %.loc17_18.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_18.4: = specific_function %.loc17_18.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc17_18: init %i32 = call %.loc17_18.4(%.loc17_18.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc17_18.5: %i32 = value_of_initializer %int.convert_checked.loc17_18 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_18.6: %i32 = converted %.loc17_18.1, %.loc17_18.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc17_21: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.33] // CHECK:STDOUT: %int.umod.loc17: init %i32 = call %Mod.ref.loc17(%.loc17_18.6, %.loc17_21.6) [template = ] // CHECK:STDOUT: %.loc17_23.1: %i32 = value_of_initializer %int.umod.loc17 [template = ] // CHECK:STDOUT: %.loc17_23.2: %i32 = converted %int.umod.loc17, %.loc17_23.1 [template = ] diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 8b23a46c1294..9ffab00ac16c 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -43,22 +43,22 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -113,39 +113,39 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Mul.ref: %Mul.type = name_ref Mul, %Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.umul, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.umul [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.umul, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.umul, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.umul, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.umul [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.umul, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.umul, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -190,9 +190,9 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -210,19 +210,19 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 32767 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 65536 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2147418112 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 32768 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 32768 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 32767 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 65536 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2147418112 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 32768 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 32768 [template] +// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -286,40 +286,40 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %Mul.ref.loc6: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32767 [template = constants.%.2] // CHECK:STDOUT: %.loc6_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_26.3: = bound_method %.loc6_26.1, %.loc6_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_26.4: = specific_function %.loc6_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %.loc6_26.4(%.loc6_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_26.5: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_26.6: %i32 = converted %.loc6_26.1, %.loc6_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.umul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.6, %.loc6_26.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.umul.loc6 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_26.3: = bound_method %.loc6_26.1, %.loc6_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_26.4: = specific_function %.loc6_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %.loc6_26.4(%.loc6_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_26.5: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_26.6: %i32 = converted %.loc6_26.1, %.loc6_26.5 [template = constants.%.33] +// CHECK:STDOUT: %int.umul.loc6: init %i32 = call %Mul.ref.loc6(%.loc6_18.6, %.loc6_26.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc6_34.1: %i32 = value_of_initializer %int.umul.loc6 [template = constants.%.34] +// CHECK:STDOUT: %.loc6_34.2: %i32 = converted %int.umul.loc6, %.loc6_34.1 [template = constants.%.34] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_34.2 // CHECK:STDOUT: %Mul.ref.loc7: %Mul.type = name_ref Mul, file.%Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %.loc7_18.1: Core.IntLiteral = int_value 32768 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_18.1: Core.IntLiteral = int_value 32768 [template = constants.%.35] // CHECK:STDOUT: %.loc7_26.1: Core.IntLiteral = int_value 65536 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_18.3: = bound_method %.loc7_18.1, %.loc7_18.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc7_18.4: = specific_function %.loc7_18.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %.loc7_18.4(%.loc7_18.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_18.5: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_18.6: %i32 = converted %.loc7_18.1, %.loc7_18.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_26.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_26.3: = bound_method %.loc7_26.1, %.loc7_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_26.4: = specific_function %.loc7_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %.loc7_26.4(%.loc7_26.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_26.5: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_26.6: %i32 = converted %.loc7_26.1, %.loc7_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.umul.loc7: init %i32 = call %Mul.ref.loc7(%.loc7_18.6, %.loc7_26.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_34.1: %i32 = value_of_initializer %int.umul.loc7 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_34.2: %i32 = converted %int.umul.loc7, %.loc7_34.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_18.3: = bound_method %.loc7_18.1, %.loc7_18.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_18.4: = specific_function %.loc7_18.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc7_18: init %i32 = call %.loc7_18.4(%.loc7_18.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc7_18.5: %i32 = value_of_initializer %int.convert_checked.loc7_18 [template = constants.%.38] +// CHECK:STDOUT: %.loc7_18.6: %i32 = converted %.loc7_18.1, %.loc7_18.5 [template = constants.%.38] +// CHECK:STDOUT: %.loc7_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_26.3: = bound_method %.loc7_26.1, %.loc7_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_26.4: = specific_function %.loc7_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %.loc7_26.4(%.loc7_26.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_26.5: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%.33] +// CHECK:STDOUT: %.loc7_26.6: %i32 = converted %.loc7_26.1, %.loc7_26.5 [template = constants.%.33] +// CHECK:STDOUT: %int.umul.loc7: init %i32 = call %Mul.ref.loc7(%.loc7_18.6, %.loc7_26.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_34.1: %i32 = value_of_initializer %int.umul.loc7 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_34.2: %i32 = converted %int.umul.loc7, %.loc7_34.1 [template = constants.%.39] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_34.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 9bdf1e6b8e2d..39d74f0a4832 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -126,23 +126,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 123 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -123 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 123 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -123 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.28: = bound_method %.25, %Convert.15 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.30: type = array_type %.2, %i32 [template] -// CHECK:STDOUT: %.31: type = ptr_type %.30 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: %i32 = int_value -1 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.15 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.34: type = array_type %.2, %i32 [template] +// CHECK:STDOUT: %.35: type = ptr_type %.34 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.40: %i32 = int_value -1 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -190,36 +190,36 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type = name_ref Negate, %Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc4_30.1: Core.IntLiteral = int_value 123 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_30.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_30.3: = bound_method %.loc4_30.1, %.loc4_30.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_30.4: = specific_function %.loc4_30.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.25] -// CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc4_29: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int.unegate.loc4_29, %.loc4_29.1 [template = constants.%.26] -// CHECK:STDOUT: %int.unegate.loc4_22: init %i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.25] +// CHECK:STDOUT: %.loc4_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_30.3: = bound_method %.loc4_30.1, %.loc4_30.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_30.4: = specific_function %.loc4_30.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc4_29: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int.unegate.loc4_29, %.loc4_29.1 [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc4_22: init %i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.29] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: %Convert.type.6 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_22.2: = bound_method %int.unegate.loc4_22, %.loc4_22.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_22.3: = specific_function %.loc4_22.2, @Convert.4(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_22.4: %i32 = value_of_initializer %int.unegate.loc4_22 [template = constants.%.25] -// CHECK:STDOUT: %.loc4_22.5: %i32 = converted %int.unegate.loc4_22, %.loc4_22.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc4_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_22.2: = bound_method %int.unegate.loc4_22, %.loc4_22.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc4_22.3: = specific_function %.loc4_22.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_22.4: %i32 = value_of_initializer %int.unegate.loc4_22 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_22.5: %i32 = converted %int.unegate.loc4_22, %.loc4_22.4 [template = constants.%.29] // CHECK:STDOUT: %int.convert_checked.loc4_22: init Core.IntLiteral = call %.loc4_22.3(%.loc4_22.5) [template = constants.%.2] // CHECK:STDOUT: %.loc4_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_22 [template = constants.%.2] // CHECK:STDOUT: %.loc4_22.7: Core.IntLiteral = converted %int.unegate.loc4_22, %.loc4_22.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_22.7, %i32 [template = constants.%.30] -// CHECK:STDOUT: %arr.var: ref %.30 = var arr -// CHECK:STDOUT: %arr: ref %.30 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_22.7, %i32 [template = constants.%.34] +// CHECK:STDOUT: %arr.var: ref %.34 = var arr +// CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 123 [template = constants.%.2] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, %i32 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_22: type = ptr_type %.30 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_21: type = array_type %.loc5_18, %i32 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_22: type = ptr_type %.34 [template = constants.%.35] // CHECK:STDOUT: %.loc7_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_8.1) [template = constants.%i32] // CHECK:STDOUT: %.loc7_8.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] @@ -267,20 +267,20 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.30 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.31 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.31 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.34 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.35 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.35 = bind_name arr_p, %.loc5 // CHECK:STDOUT: %Negate.ref: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %.loc7_21.1: Core.IntLiteral = int_value 1 [template = constants.%.32] -// CHECK:STDOUT: %.loc7_21.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_21.3: = bound_method %.loc7_21.1, %.loc7_21.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc7_21.4: = specific_function %.loc7_21.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_21.4(%.loc7_21.1) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.35] -// CHECK:STDOUT: %.loc7_21.6: %i32 = converted %.loc7_21.1, %.loc7_21.5 [template = constants.%.35] -// CHECK:STDOUT: %int.unegate: init %i32 = call %Negate.ref(%.loc7_21.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.unegate [template = constants.%.36] -// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.unegate, %.loc7_23.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_21.1: Core.IntLiteral = int_value 1 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_21.3: = bound_method %.loc7_21.1, %.loc7_21.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc7_21.4: = specific_function %.loc7_21.3, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_21.4(%.loc7_21.1) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.39] +// CHECK:STDOUT: %.loc7_21.6: %i32 = converted %.loc7_21.1, %.loc7_21.5 [template = constants.%.39] +// CHECK:STDOUT: %int.unegate: init %i32 = call %Negate.ref(%.loc7_21.6) [template = constants.%.40] +// CHECK:STDOUT: %.loc7_23.1: %i32 = value_of_initializer %int.unegate [template = constants.%.40] +// CHECK:STDOUT: %.loc7_23.2: %i32 = converted %int.unegate, %.loc7_23.1 [template = constants.%.40] // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc7_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -307,13 +307,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -436,18 +436,18 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] // CHECK:STDOUT: %.loc30_29.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc30_32.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.26] -// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc30_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_29.3: = bound_method %.loc30_29.1, %.loc30_29.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc30_29.4: = specific_function %.loc30_29.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %.loc30_29.4(%.loc30_29.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc30_29.5: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%.30] +// CHECK:STDOUT: %.loc30_29.6: %i32 = converted %.loc30_29.1, %.loc30_29.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc30_32.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_32.3: = bound_method %.loc30_32.1, %.loc30_32.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc30_32.4: = specific_function %.loc30_32.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %.loc30_32.4(%.loc30_32.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc30_32.5: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%.33] +// CHECK:STDOUT: %.loc30_32.6: %i32 = converted %.loc30_32.1, %.loc30_32.5 [template = constants.%.33] // CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.6, %.loc30_32.6) // CHECK:STDOUT: %.loc30_16.2: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] // CHECK:STDOUT: %.loc30_16.3: type = converted %int.make_type_signed.loc30, %.loc30_16.2 [template = constants.%i32] @@ -457,12 +457,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.make_type_signed.loc35: init type = call constants.%Int(%.loc35_23.1) [template = constants.%i32] // CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] // CHECK:STDOUT: %.loc35_42.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%.26] -// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc35_42.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_42.3: = bound_method %.loc35_42.1, %.loc35_42.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc35_42.4: = specific_function %.loc35_42.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %.loc35_42.4(%.loc35_42.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc35_42.5: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%.30] +// CHECK:STDOUT: %.loc35_42.6: %i32 = converted %.loc35_42.1, %.loc35_42.5 [template = constants.%.30] // CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.6) // CHECK:STDOUT: %.loc35_23.2: type = value_of_initializer %int.make_type_signed.loc35 [template = constants.%i32] // CHECK:STDOUT: %.loc35_23.3: type = converted %int.make_type_signed.loc35, %.loc35_23.2 [template = constants.%i32] @@ -607,16 +607,16 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.26: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -702,45 +702,45 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Negate.ref.loc8_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Negate.ref.loc8_21: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc8_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc8_28.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_28.3: = bound_method %.loc8_28.1, %.loc8_28.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc8_28.4: = specific_function %.loc8_28.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.25] -// CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc8_27: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int.unegate.loc8_27, %.loc8_27.1 [template = constants.%.26] -// CHECK:STDOUT: %int.unegate.loc8_20: init %i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.25] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_20 [template = constants.%.25] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_20, %.loc8_40.1 [template = constants.%.25] +// CHECK:STDOUT: %.loc8_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_28.3: = bound_method %.loc8_28.1, %.loc8_28.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc8_28.4: = specific_function %.loc8_28.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc8_27: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int.unegate.loc8_27, %.loc8_27.1 [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc8_20: init %i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_20 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_20, %.loc8_40.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Negate.ref.loc11_25: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc11_32.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_32.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_32.3: = bound_method %.loc11_32.1, %.loc11_32.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_32.4: = specific_function %.loc11_32.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc11_32: init %i32 = call %.loc11_32.4(%.loc11_32.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_32.5: %i32 = value_of_initializer %int.convert_checked.loc11_32 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_32.6: %i32 = converted %.loc11_32.1, %.loc11_32.5 [template = constants.%.25] -// CHECK:STDOUT: %int.unegate.loc11_31: init %i32 = call %Negate.ref.loc11_25(%.loc11_32.6) [template = constants.%.26] -// CHECK:STDOUT: %.loc11_45.1: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_31.1: %i32 = value_of_initializer %int.unegate.loc11_31 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_31.2: %i32 = converted %int.unegate.loc11_31, %.loc11_31.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_45.1, %.loc11_45.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_45: init %i32 = call %.loc11_45.4(%.loc11_45.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_45.5: %i32 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_45.6: %i32 = converted %.loc11_45.1, %.loc11_45.5 [template = constants.%.30] -// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc11_31.2, %.loc11_45.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.usub [template = constants.%.31] -// CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int.usub, %.loc11_24.1 [template = constants.%.31] -// CHECK:STDOUT: %int.unegate.loc11_20: init %i32 = call %Negate.ref.loc11_14(%.loc11_24.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_48.1: %i32 = value_of_initializer %int.unegate.loc11_20 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_48.2: %i32 = converted %int.unegate.loc11_20, %.loc11_48.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_32.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_32.3: = bound_method %.loc11_32.1, %.loc11_32.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_32.4: = specific_function %.loc11_32.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc11_32: init %i32 = call %.loc11_32.4(%.loc11_32.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_32.5: %i32 = value_of_initializer %int.convert_checked.loc11_32 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_32.6: %i32 = converted %.loc11_32.1, %.loc11_32.5 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc11_31: init %i32 = call %Negate.ref.loc11_25(%.loc11_32.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc11_45.1: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_31.1: %i32 = value_of_initializer %int.unegate.loc11_31 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_31.2: %i32 = converted %int.unegate.loc11_31, %.loc11_31.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_45.1, %.loc11_45.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_45: init %i32 = call %.loc11_45.4(%.loc11_45.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_45.5: %i32 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_45.6: %i32 = converted %.loc11_45.1, %.loc11_45.5 [template = constants.%.34] +// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc11_31.2, %.loc11_45.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.usub [template = constants.%.35] +// CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int.usub, %.loc11_24.1 [template = constants.%.35] +// CHECK:STDOUT: %int.unegate.loc11_20: init %i32 = call %Negate.ref.loc11_14(%.loc11_24.2) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_48.1: %i32 = value_of_initializer %int.unegate.loc11_20 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_48.2: %i32 = converted %int.unegate.loc11_20, %.loc11_48.1 [template = constants.%.35] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc11_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 2a03481636b8..3e3e0a27d36b 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -44,22 +44,22 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -114,39 +114,39 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, %Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc4_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_23.3: = bound_method %.loc4_23.1, %.loc4_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_23.4: = specific_function %.loc4_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %.loc4_23.4(%.loc4_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.5: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_23.6: %i32 = converted %.loc4_23.1, %.loc4_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.usub, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.usub [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.usub, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.usub, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.usub, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.usub [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.usub, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.usub, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 1 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -191,9 +191,9 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -211,23 +211,23 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2147483647 [template] -// CHECK:STDOUT: %.30: %i32 = int_value -2147483647 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.35: %i32 = int_value -2147483648 [template] -// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.34: %i32 = int_value -2147483647 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.39: %i32 = int_value -2147483648 [template] +// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -296,81 +296,81 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %Sub.ref.loc6: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc6_21.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_21.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_21.3: = bound_method %.loc6_21.1, %.loc6_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_21.4: = specific_function %.loc6_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %.loc6_21.4(%.loc6_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_21.5: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_21.6: %i32 = converted %.loc6_21.1, %.loc6_21.5 [template = constants.%.29] -// CHECK:STDOUT: %int.usub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.6, %.loc6_21.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.usub.loc6 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_18.3: = bound_method %.loc6_18.1, %.loc6_18.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_18.4: = specific_function %.loc6_18.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_18: init %i32 = call %.loc6_18.4(%.loc6_18.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.5: %i32 = value_of_initializer %int.convert_checked.loc6_18 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_18.6: %i32 = converted %.loc6_18.1, %.loc6_18.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_21.3: = bound_method %.loc6_21.1, %.loc6_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_21.4: = specific_function %.loc6_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc6_21: init %i32 = call %.loc6_21.4(%.loc6_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_21.5: %i32 = value_of_initializer %int.convert_checked.loc6_21 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_21.6: %i32 = converted %.loc6_21.1, %.loc6_21.5 [template = constants.%.33] +// CHECK:STDOUT: %int.usub.loc6: init %i32 = call %Sub.ref.loc6(%.loc6_18.6, %.loc6_21.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc6_32.1: %i32 = value_of_initializer %int.usub.loc6 [template = constants.%.34] +// CHECK:STDOUT: %.loc6_32.2: %i32 = converted %int.usub.loc6, %.loc6_32.1 [template = constants.%.34] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc6_32.2 // CHECK:STDOUT: %Sub.ref.loc7_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc7_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc7_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc7_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc7_22.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_22.3: = bound_method %.loc7_22.1, %.loc7_22.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc7_22.4: = specific_function %.loc7_22.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %.loc7_22.4(%.loc7_22.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc7_22.5: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_22.6: %i32 = converted %.loc7_22.1, %.loc7_22.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_25.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_25.3: = bound_method %.loc7_25.1, %.loc7_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_25.4: = specific_function %.loc7_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.usub.loc7_21: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.usub.loc7_21 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int.usub.loc7_21, %.loc7_21.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc7_17: init %i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_17 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_17, %.loc7_40.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_22.3: = bound_method %.loc7_22.1, %.loc7_22.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc7_22.4: = specific_function %.loc7_22.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc7_22: init %i32 = call %.loc7_22.4(%.loc7_22.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc7_22.5: %i32 = value_of_initializer %int.convert_checked.loc7_22 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_22.6: %i32 = converted %.loc7_22.1, %.loc7_22.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_25.3: = bound_method %.loc7_25.1, %.loc7_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_25.4: = specific_function %.loc7_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.33] +// CHECK:STDOUT: %int.usub.loc7_21: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.usub.loc7_21 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int.usub.loc7_21, %.loc7_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.38] +// CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.38] +// CHECK:STDOUT: %int.usub.loc7_17: init %i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_17 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_17, %.loc7_40.1 [template = constants.%.39] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %.loc8_22.1: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.3] -// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_22.1, %.loc8_22.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %.loc8_22.4(%.loc8_22.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_22.1, %.loc8_22.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_25.1, %.loc8_25.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc8_25: init %i32 = call %.loc8_25.4(%.loc8_25.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_25.1, %.loc8_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.usub.loc8_21: init %i32 = call %Sub.ref.loc8_18(%.loc8_22.6, %.loc8_25.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_38.1: Core.IntLiteral = int_value 2 [template = constants.%.36] -// CHECK:STDOUT: %.loc8_21.1: %i32 = value_of_initializer %int.usub.loc8_21 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_21.2: %i32 = converted %int.usub.loc8_21, %.loc8_21.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_38.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_38.3: = bound_method %.loc8_38.1, %.loc8_38.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_38.4: = specific_function %.loc8_38.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc8_38: init %i32 = call %.loc8_38.4(%.loc8_38.1) [template = constants.%.39] -// CHECK:STDOUT: %.loc8_38.5: %i32 = value_of_initializer %int.convert_checked.loc8_38 [template = constants.%.39] -// CHECK:STDOUT: %.loc8_38.6: %i32 = converted %.loc8_38.1, %.loc8_38.5 [template = constants.%.39] -// CHECK:STDOUT: %int.usub.loc8_17: init %i32 = call %Sub.ref.loc8_14(%.loc8_21.2, %.loc8_38.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.usub.loc8_17 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.usub.loc8_17, %.loc8_40.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_22.1, %.loc8_22.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc8_22: init %i32 = call %.loc8_22.4(%.loc8_22.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_22.1, %.loc8_22.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_25.1, %.loc8_25.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc8_25: init %i32 = call %.loc8_25.4(%.loc8_25.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_25.1, %.loc8_25.5 [template = constants.%.33] +// CHECK:STDOUT: %int.usub.loc8_21: init %i32 = call %Sub.ref.loc8_18(%.loc8_22.6, %.loc8_25.6) [template = constants.%.34] +// CHECK:STDOUT: %.loc8_38.1: Core.IntLiteral = int_value 2 [template = constants.%.40] +// CHECK:STDOUT: %.loc8_21.1: %i32 = value_of_initializer %int.usub.loc8_21 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_21.2: %i32 = converted %int.usub.loc8_21, %.loc8_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_38.3: = bound_method %.loc8_38.1, %.loc8_38.2 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_38.4: = specific_function %.loc8_38.3, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc8_38: init %i32 = call %.loc8_38.4(%.loc8_38.1) [template = constants.%.43] +// CHECK:STDOUT: %.loc8_38.5: %i32 = value_of_initializer %int.convert_checked.loc8_38 [template = constants.%.43] +// CHECK:STDOUT: %.loc8_38.6: %i32 = converted %.loc8_38.1, %.loc8_38.5 [template = constants.%.43] +// CHECK:STDOUT: %int.usub.loc8_17: init %i32 = call %Sub.ref.loc8_14(%.loc8_21.2, %.loc8_38.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.usub.loc8_17 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.usub.loc8_17, %.loc8_40.1 [template = constants.%.33] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc8_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 85c9f139c72a..562d3d5e57cf 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -34,22 +34,22 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 10 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 10 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] -// CHECK:STDOUT: %.36: type = ptr_type %.35 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] +// CHECK:STDOUT: %.40: type = ptr_type %.39 [template] // CHECK:STDOUT: %RuntimeCall.type: type = fn_type @RuntimeCall [template] // CHECK:STDOUT: %RuntimeCall: %RuntimeCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -104,39 +104,39 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, %Xor.decl [template = constants.%Xor] // CHECK:STDOUT: %.loc4_20.1: Core.IntLiteral = int_value 12 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24.1: Core.IntLiteral = int_value 10 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_24.1, %.loc4_24.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %.loc4_24.4(%.loc4_24.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc4_24.5: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_24.6: %i32 = converted %.loc4_24.1, %.loc4_24.5 [template = constants.%.29] -// CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.3: = bound_method %.loc4_20.1, %.loc4_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_20.4: = specific_function %.loc4_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %.loc4_20.4(%.loc4_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.5: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_20.6: %i32 = converted %.loc4_20.1, %.loc4_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_24.1, %.loc4_24.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %.loc4_24.4(%.loc4_24.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_24.5: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_24.6: %i32 = converted %.loc4_24.1, %.loc4_24.5 [template = constants.%.33] +// CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.xor, %.loc4_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.xor [template = constants.%.30] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.xor, %.loc4_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.xor, %.loc4_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.xor, %.loc4_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.xor [template = constants.%.34] +// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.xor, %.loc4_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.xor, %.loc4_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_13.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 6 [template = constants.%.38] // CHECK:STDOUT: %.loc5_13.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_13.3: type = converted %int.make_type_signed.loc5, %.loc5_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_20: type = ptr_type %.35 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_19: type = array_type %.loc5_18, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_20: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -181,9 +181,9 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %arr.ref: ref %.35 = name_ref arr, file.%arr -// CHECK:STDOUT: %.loc5: %.36 = addr_of %arr.ref -// CHECK:STDOUT: %arr_p: %.36 = bind_name arr_p, %.loc5 +// CHECK:STDOUT: %arr.ref: ref %.39 = name_ref arr, file.%arr +// CHECK:STDOUT: %.loc5: %.40 = addr_of %arr.ref +// CHECK:STDOUT: %arr_p: %.40 = bind_name arr_p, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/print.carbon b/toolchain/check/testdata/builtins/print.carbon index 5f31ed2ec1b0..27518d7abc87 100644 --- a/toolchain/check/testdata/builtins/print.carbon +++ b/toolchain/check/testdata/builtins/print.carbon @@ -32,16 +32,16 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: %Print.type.2: type = fn_type @Print.2 [template] // CHECK:STDOUT: %Print.2: %Print.type.2 = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,22 +82,22 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc14: %Print.type.1 = name_ref Print, file.%Print.decl [template = constants.%Print.1] // CHECK:STDOUT: %.loc14_9.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_9.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_9.3: = bound_method %.loc14_9.1, %.loc14_9.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc14_9.4: = specific_function %.loc14_9.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_9.4(%.loc14_9.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc14_9.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.25] -// CHECK:STDOUT: %.loc14_9.6: %i32 = converted %.loc14_9.1, %.loc14_9.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc14_9.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_9.3: = bound_method %.loc14_9.1, %.loc14_9.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_9.4: = specific_function %.loc14_9.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_9.4(%.loc14_9.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc14_9.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_9.6: %i32 = converted %.loc14_9.1, %.loc14_9.5 [template = constants.%.29] // CHECK:STDOUT: %print.int.loc14: init %empty_tuple.type = call %Print.ref.loc14(%.loc14_9.6) // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Print.ref.loc16: %Print.type.2 = name_ref Print, imports.%import_ref.38 [template = constants.%Print.2] -// CHECK:STDOUT: %.loc16_14.1: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc16_14.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_14.3: = bound_method %.loc16_14.1, %.loc16_14.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc16_14.4: = specific_function %.loc16_14.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_14.4(%.loc16_14.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc16_14.5: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%.29] -// CHECK:STDOUT: %.loc16_14.6: %i32 = converted %.loc16_14.1, %.loc16_14.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc16_14.1: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc16_14.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_14.3: = bound_method %.loc16_14.1, %.loc16_14.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc16_14.4: = specific_function %.loc16_14.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_14.4(%.loc16_14.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc16_14.5: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%.33] +// CHECK:STDOUT: %.loc16_14.6: %i32 = converted %.loc16_14.1, %.loc16_14.5 [template = constants.%.33] // CHECK:STDOUT: %print.int.loc16: init %empty_tuple.type = call %Print.ref.loc16(%.loc16_14.6) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 1a5060d280af..19ebebcc852e 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -158,22 +158,22 @@ class A { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] // CHECK:STDOUT: %SomeInternalFunction: %SomeInternalFunction.type = struct_value () [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] -// CHECK:STDOUT: %.27: type = struct_type {.radius: %i32} [template] -// CHECK:STDOUT: %.28: = complete_type_witness %.27 [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.30: = bound_method %.29, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.34: type = struct_type {.radius: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %Circle = struct_value (%.26) [template] +// CHECK:STDOUT: %.31: type = struct_type {.radius: %i32} [template] +// CHECK:STDOUT: %.32: = complete_type_witness %.31 [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.38: type = struct_type {.radius: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %Circle = struct_value (%.30) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -209,12 +209,12 @@ class A { // CHECK:STDOUT: %.loc6_39.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_39.3: type = converted %int.make_type_signed.loc6, %.loc6_39.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_45: Core.IntLiteral = int_value 5 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_46.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_46.2: = bound_method %.loc6_45, %.loc6_46.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_46.3: = specific_function %.loc6_46.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_46.3(%.loc6_45) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_46.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.26] -// CHECK:STDOUT: %.loc6_46.5: %i32 = converted %.loc6_45, %.loc6_46.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc6_46.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_46.2: = bound_method %.loc6_45, %.loc6_46.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_46.3: = specific_function %.loc6_46.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_46.3(%.loc6_45) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_46.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] +// CHECK:STDOUT: %.loc6_46.5: %i32 = converted %.loc6_45, %.loc6_46.4 [template = constants.%.30] // CHECK:STDOUT: %SOME_INTERNAL_CONSTANT: %i32 = bind_name SOME_INTERNAL_CONSTANT, %.loc6_46.5 // CHECK:STDOUT: %SomeInternalFunction.decl: %SomeInternalFunction.type = fn_decl @SomeInternalFunction [template = constants.%SomeInternalFunction] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -235,7 +235,7 @@ class A { // CHECK:STDOUT: %return.param: ref %Circle = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Circle = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = complete_type_witness %.27 [template = constants.%.28] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.31 [template = constants.%.32] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Circle @@ -247,27 +247,27 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_12: Core.IntLiteral = int_value 0 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_13.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_13.2: = bound_method %.loc9_12, %.loc9_13.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_13.3: = specific_function %.loc9_13.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_13.3(%.loc9_12) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc9_13.5: %i32 = converted %.loc9_12, %.loc9_13.4 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_12: Core.IntLiteral = int_value 0 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_13.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_13.2: = bound_method %.loc9_12, %.loc9_13.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_13.3: = specific_function %.loc9_13.2, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_13.3(%.loc9_12) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.36] +// CHECK:STDOUT: %.loc9_13.5: %i32 = converted %.loc9_12, %.loc9_13.4 [template = constants.%.36] // CHECK:STDOUT: return %.loc9_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return: %Circle { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_23: Core.IntLiteral = int_value 5 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_24.1: %.34 = struct_literal (%.loc13_23) -// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_23, %.loc13_24.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_24.4(%.loc13_23) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_24.5: init %i32 = converted %.loc13_23, %int.convert_checked [template = constants.%.26] +// CHECK:STDOUT: %.loc13_24.1: %.38 = struct_literal (%.loc13_23) +// CHECK:STDOUT: %.loc13_24.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_24.3: = bound_method %.loc13_23, %.loc13_24.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_24.4: = specific_function %.loc13_24.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_24.4(%.loc13_23) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_24.5: init %i32 = converted %.loc13_23, %int.convert_checked [template = constants.%.30] // CHECK:STDOUT: %.loc13_24.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc13_24.7: init %i32 = initialize_from %.loc13_24.5 to %.loc13_24.6 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_24.7: init %i32 = initialize_from %.loc13_24.5 to %.loc13_24.6 [template = constants.%.30] // CHECK:STDOUT: %.loc13_24.8: init %Circle = class_init (%.loc13_24.7), %return [template = constants.%struct] // CHECK:STDOUT: %.loc13_25: init %Circle = converted %.loc13_24.1, %.loc13_24.8 [template = constants.%struct] // CHECK:STDOUT: return %.loc13_25 to %return @@ -381,10 +381,10 @@ class A { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -476,12 +476,12 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_12: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc12_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_13.2: = bound_method %.loc12_12, %.loc12_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_13.3: = specific_function %.loc12_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_13.3(%.loc12_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_13.5: %i32 = converted %.loc12_12, %.loc12_13.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_13.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_13.2: = bound_method %.loc12_12, %.loc12_13.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_13.3: = specific_function %.loc12_13.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_13.3(%.loc12_12) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc12_13.5: %i32 = converted %.loc12_12, %.loc12_13.4 [template = constants.%.33] // CHECK:STDOUT: return %.loc12_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -507,12 +507,12 @@ class A { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.26: type = struct_type {} [template] -// CHECK:STDOUT: %.27: = complete_type_witness %.26 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.30: type = struct_type {} [template] +// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -544,14 +544,14 @@ class A { // CHECK:STDOUT: %.loc5_10.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc5_10.3: type = converted %int.make_type_signed, %.loc5_10.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_16: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_17.2: = bound_method %.loc5_16, %.loc5_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_17.3: = specific_function %.loc5_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_17.3(%.loc5_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_17.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc5_17.5: %i32 = converted %.loc5_16, %.loc5_17.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_17.2: = bound_method %.loc5_16, %.loc5_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_17.3: = specific_function %.loc5_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_17.3(%.loc5_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_17.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc5_17.5: %i32 = converted %.loc5_16, %.loc5_17.4 [template = constants.%.29] // CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_17.5 -// CHECK:STDOUT: %.loc6: = complete_type_witness %.26 [template = constants.%.27] +// CHECK:STDOUT: %.loc6: = complete_type_witness %.30 [template = constants.%.31] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -578,12 +578,12 @@ class A { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.26: type = struct_type {} [template] -// CHECK:STDOUT: %.27: = complete_type_witness %.26 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.30: type = struct_type {} [template] +// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -620,26 +620,26 @@ class A { // CHECK:STDOUT: %.loc5_20.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_20.3: type = converted %int.make_type_signed.loc5, %.loc5_20.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_26: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_27.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_27.2: = bound_method %.loc5_26, %.loc5_27.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_27.3: = specific_function %.loc5_27.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_27.3(%.loc5_26) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_27.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_27.5: %i32 = converted %.loc5_26, %.loc5_27.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_27.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_27.2: = bound_method %.loc5_26, %.loc5_27.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_27.3: = specific_function %.loc5_27.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_27.3(%.loc5_26) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_27.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_27.5: %i32 = converted %.loc5_26, %.loc5_27.4 [template = constants.%.29] // CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_27.5 // CHECK:STDOUT: %.loc6_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_18.1) [template = constants.%i32] // CHECK:STDOUT: %.loc6_18.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_18.3: type = converted %int.make_type_signed.loc6, %.loc6_18.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_25.2: = bound_method %.loc6_24, %.loc6_25.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc6_25.3: = specific_function %.loc6_25.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_25.3(%.loc6_24) [template = constants.%.25] -// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %.loc6_24, %.loc6_25.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc6_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_25.2: = bound_method %.loc6_24, %.loc6_25.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_25.3: = specific_function %.loc6_25.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_25.3(%.loc6_24) [template = constants.%.29] +// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %.loc6_24, %.loc6_25.4 [template = constants.%.29] // CHECK:STDOUT: %y: %i32 = bind_name y, %.loc6_25.5 -// CHECK:STDOUT: %.loc7: = complete_type_witness %.26 [template = constants.%.27] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.30 [template = constants.%.31] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 46509a9c9db9..deeaf30bd418 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -69,15 +69,15 @@ class Derived { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.36: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.37: = bound_method %.13, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.1: %Base = struct_value (%.39) [template] -// CHECK:STDOUT: %.40: = bound_method %.15, %Convert.14 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.42: %i32 = int_value 7 [template] -// CHECK:STDOUT: %struct.2: %Derived = struct_value (%struct.1, %.42) [template] +// CHECK:STDOUT: %.40: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.41: = bound_method %.13, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct.1: %Base = struct_value (%.43) [template] +// CHECK:STDOUT: %.44: = bound_method %.15, %Convert.14 [template] +// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.46: %i32 = int_value 7 [template] +// CHECK:STDOUT: %struct.2: %Derived = struct_value (%struct.1, %.46) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %Access.type: type = fn_type @Access [template] @@ -172,23 +172,23 @@ class Derived { // CHECK:STDOUT: %.loc14_26.1: %.14 = struct_literal (%.loc14_25) // CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 7 [template = constants.%.15] // CHECK:STDOUT: %.loc14_35.1: %.16 = struct_literal (%.loc14_26.1, %.loc14_34) -// CHECK:STDOUT: %.loc14_26.2: %Convert.type.2 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_26.3: = bound_method %.loc14_25, %.loc14_26.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_26.4: = specific_function %.loc14_26.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_25) [template = constants.%.39] -// CHECK:STDOUT: %.loc14_26.5: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_26 [template = constants.%.39] +// CHECK:STDOUT: %.loc14_26.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_26.3: = bound_method %.loc14_25, %.loc14_26.2 [template = constants.%.41] +// CHECK:STDOUT: %.loc14_26.4: = specific_function %.loc14_26.3, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_25) [template = constants.%.43] +// CHECK:STDOUT: %.loc14_26.5: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_26 [template = constants.%.43] // CHECK:STDOUT: %.loc14_35.2: ref %Base = class_element_access %return, element0 // CHECK:STDOUT: %.loc14_26.6: ref %i32 = class_element_access %.loc14_35.2, element0 -// CHECK:STDOUT: %.loc14_26.7: init %i32 = initialize_from %.loc14_26.5 to %.loc14_26.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc14_26.7: init %i32 = initialize_from %.loc14_26.5 to %.loc14_26.6 [template = constants.%.43] // CHECK:STDOUT: %.loc14_26.8: init %Base = class_init (%.loc14_26.7), %.loc14_35.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.8 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc14_35.4: %Convert.type.2 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_35.5: = bound_method %.loc14_34, %.loc14_35.4 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_35.6: = specific_function %.loc14_35.5, @Convert.2(constants.%.1) [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %.loc14_35.6(%.loc14_34) [template = constants.%.42] -// CHECK:STDOUT: %.loc14_35.7: init %i32 = converted %.loc14_34, %int.convert_checked.loc14_35 [template = constants.%.42] +// CHECK:STDOUT: %.loc14_35.4: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_35.5: = bound_method %.loc14_34, %.loc14_35.4 [template = constants.%.44] +// CHECK:STDOUT: %.loc14_35.6: = specific_function %.loc14_35.5, @Convert.2(constants.%.1) [template = constants.%.45] +// CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %.loc14_35.6(%.loc14_34) [template = constants.%.46] +// CHECK:STDOUT: %.loc14_35.7: init %i32 = converted %.loc14_34, %int.convert_checked.loc14_35 [template = constants.%.46] // CHECK:STDOUT: %.loc14_35.8: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc14_35.9: init %i32 = initialize_from %.loc14_35.7 to %.loc14_35.8 [template = constants.%.42] +// CHECK:STDOUT: %.loc14_35.9: init %i32 = initialize_from %.loc14_35.7 to %.loc14_35.8 [template = constants.%.46] // CHECK:STDOUT: %.loc14_35.10: init %Derived = class_init (%.loc14_35.3, %.loc14_35.9), %return [template = constants.%struct.2] // CHECK:STDOUT: %.loc14_36: init %Derived = converted %.loc14_35.1, %.loc14_35.10 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc14_36 to %return diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index 921337824b94..ae49f4faf545 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -45,15 +45,15 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] -// CHECK:STDOUT: %.31: type = unbound_element_type %Derived, %Base [template] -// CHECK:STDOUT: %.32: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.33: = complete_type_witness %.32 [template] -// CHECK:STDOUT: %.34: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.35: type = unbound_element_type %Derived, %Base [template] +// CHECK:STDOUT: %.36: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.37: = complete_type_witness %.36 [template] +// CHECK:STDOUT: %.38: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: } @@ -88,13 +88,13 @@ fn Call(p: Derived*) { // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {} // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %p.patt: %.34 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.34 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.38 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.38 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.34] -// CHECK:STDOUT: %p.param: %.34 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.34 = bind_name p, %p.param +// CHECK:STDOUT: %.loc25: type = ptr_type %Derived [template = constants.%.38] +// CHECK:STDOUT: %p.param: %.38 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.38 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -124,8 +124,8 @@ fn Call(p: Derived*) { // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %.loc22: %.31 = base_decl %Base, element0 [template] -// CHECK:STDOUT: %.loc23: = complete_type_witness %.32 [template = constants.%.33] +// CHECK:STDOUT: %.loc22: %.35 = base_decl %Base, element0 [template] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.36 [template = constants.%.37] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Derived @@ -140,22 +140,22 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc18_10: ref %i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %.loc18_15: Core.IntLiteral = int_value 1 [template = constants.%.7] -// CHECK:STDOUT: %.loc18_13.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_13.2: = bound_method %.loc18_15, %.loc18_13.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc18_13.3: = specific_function %.loc18_13.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc18_13.3(%.loc18_15) [template = constants.%.30] -// CHECK:STDOUT: %.loc18_13.4: init %i32 = converted %.loc18_15, %int.convert_checked [template = constants.%.30] +// CHECK:STDOUT: %.loc18_13.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_13.2: = bound_method %.loc18_15, %.loc18_13.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_13.3: = specific_function %.loc18_13.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc18_13.3(%.loc18_15) [template = constants.%.34] +// CHECK:STDOUT: %.loc18_13.4: init %i32 = converted %.loc18_15, %int.convert_checked [template = constants.%.34] // CHECK:STDOUT: assign %.loc18_10, %.loc18_13.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p.param_patt: %.34) { +// CHECK:STDOUT: fn @Call(%p.param_patt: %.38) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.34 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.38 = name_ref p, %p // CHECK:STDOUT: %.loc26_4.1: ref %Derived = deref %p.ref // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Base.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc26_7: = bound_method %.loc26_4.1, %F.ref -// CHECK:STDOUT: %.loc26_4.2: %.34 = addr_of %.loc26_4.1 +// CHECK:STDOUT: %.loc26_4.2: %.38 = addr_of %.loc26_4.1 // CHECK:STDOUT: %.loc26_4.3: ref %Derived = deref %.loc26_4.2 // CHECK:STDOUT: %.loc26_4.4: ref %Base = class_element_access %.loc26_4.3, element0 // CHECK:STDOUT: %.loc26_4.5: %.3 = addr_of %.loc26_4.4 diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 36f4eabc2b01..cff857382f6a 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -47,10 +47,10 @@ fn Run() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -172,12 +172,12 @@ fn Run() -> i32 { // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc26_18.1: Core.IntLiteral = int_value 4 [template = constants.%.6] -// CHECK:STDOUT: %.loc26_18.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_18.3: = bound_method %.loc26_18.1, %.loc26_18.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc26_18.4: = specific_function %.loc26_18.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc26_18.4(%.loc26_18.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc26_18.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc26_18.6: %i32 = converted %.loc26_18.1, %.loc26_18.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc26_18.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_18.3: = bound_method %.loc26_18.1, %.loc26_18.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc26_18.4: = specific_function %.loc26_18.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc26_18.4(%.loc26_18.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc26_18.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc26_18.6: %i32 = converted %.loc26_18.1, %.loc26_18.5 [template = constants.%.33] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc26_18.6) // CHECK:STDOUT: %.loc26_20.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc26_20.2: %i32 = converted %F.call, %.loc26_20.1 diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index ca6e53ccd8a8..b4ff67e9f8fe 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -83,19 +83,19 @@ fn ConvertInit() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.48: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.49: = bound_method %.23, %Convert.14 [template] -// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.51: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %A = struct_value (%.51) [template] -// CHECK:STDOUT: %.52: = bound_method %.25, %Convert.14 [template] -// CHECK:STDOUT: %.53: = specific_function %.52, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.54: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.2: %B = struct_value (%struct.1, %.54) [template] -// CHECK:STDOUT: %.55: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.56: = specific_function %.55, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.57: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.3: %C = struct_value (%struct.2, %.57) [template] +// CHECK:STDOUT: %.52: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.53: = bound_method %.23, %Convert.14 [template] +// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.55: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.1: %A = struct_value (%.55) [template] +// CHECK:STDOUT: %.56: = bound_method %.25, %Convert.14 [template] +// CHECK:STDOUT: %.57: = specific_function %.56, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.58: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct.2: %B = struct_value (%struct.1, %.58) [template] +// CHECK:STDOUT: %.59: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.60: = specific_function %.59, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.61: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct.3: %C = struct_value (%struct.2, %.61) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -307,34 +307,34 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_56: Core.IntLiteral = int_value 3 [template = constants.%.27] // CHECK:STDOUT: %.loc38_57.1: %.28 = struct_literal (%.loc38_48.1, %.loc38_56) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc38_39.2: %Convert.type.2 = interface_witness_access constants.%.48, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc38_39.3: = bound_method %.loc38_38, %.loc38_39.2 [template = constants.%.49] -// CHECK:STDOUT: %.loc38_39.4: = specific_function %.loc38_39.3, @Convert.2(constants.%.1) [template = constants.%.50] -// CHECK:STDOUT: %int.convert_checked.loc38_39: init %i32 = call %.loc38_39.4(%.loc38_38) [template = constants.%.51] -// CHECK:STDOUT: %.loc38_39.5: init %i32 = converted %.loc38_38, %int.convert_checked.loc38_39 [template = constants.%.51] +// CHECK:STDOUT: %.loc38_39.2: %Convert.type.2 = interface_witness_access constants.%.52, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc38_39.3: = bound_method %.loc38_38, %.loc38_39.2 [template = constants.%.53] +// CHECK:STDOUT: %.loc38_39.4: = specific_function %.loc38_39.3, @Convert.2(constants.%.1) [template = constants.%.54] +// CHECK:STDOUT: %int.convert_checked.loc38_39: init %i32 = call %.loc38_39.4(%.loc38_38) [template = constants.%.55] +// CHECK:STDOUT: %.loc38_39.5: init %i32 = converted %.loc38_38, %int.convert_checked.loc38_39 [template = constants.%.55] // CHECK:STDOUT: %.loc38_57.2: ref %C = temporary_storage // CHECK:STDOUT: %.loc38_57.3: ref %B = class_element_access %.loc38_57.2, element0 // CHECK:STDOUT: %.loc38_48.2: ref %A = class_element_access %.loc38_57.3, element0 // CHECK:STDOUT: %.loc38_39.6: ref %i32 = class_element_access %.loc38_48.2, element0 -// CHECK:STDOUT: %.loc38_39.7: init %i32 = initialize_from %.loc38_39.5 to %.loc38_39.6 [template = constants.%.51] +// CHECK:STDOUT: %.loc38_39.7: init %i32 = initialize_from %.loc38_39.5 to %.loc38_39.6 [template = constants.%.55] // CHECK:STDOUT: %.loc38_39.8: init %A = class_init (%.loc38_39.7), %.loc38_48.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.8 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc38_48.4: %Convert.type.2 = interface_witness_access constants.%.48, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc38_48.5: = bound_method %.loc38_47, %.loc38_48.4 [template = constants.%.52] -// CHECK:STDOUT: %.loc38_48.6: = specific_function %.loc38_48.5, @Convert.2(constants.%.1) [template = constants.%.53] -// CHECK:STDOUT: %int.convert_checked.loc38_48: init %i32 = call %.loc38_48.6(%.loc38_47) [template = constants.%.54] -// CHECK:STDOUT: %.loc38_48.7: init %i32 = converted %.loc38_47, %int.convert_checked.loc38_48 [template = constants.%.54] +// CHECK:STDOUT: %.loc38_48.4: %Convert.type.2 = interface_witness_access constants.%.52, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc38_48.5: = bound_method %.loc38_47, %.loc38_48.4 [template = constants.%.56] +// CHECK:STDOUT: %.loc38_48.6: = specific_function %.loc38_48.5, @Convert.2(constants.%.1) [template = constants.%.57] +// CHECK:STDOUT: %int.convert_checked.loc38_48: init %i32 = call %.loc38_48.6(%.loc38_47) [template = constants.%.58] +// CHECK:STDOUT: %.loc38_48.7: init %i32 = converted %.loc38_47, %int.convert_checked.loc38_48 [template = constants.%.58] // CHECK:STDOUT: %.loc38_48.8: ref %i32 = class_element_access %.loc38_57.3, element1 -// CHECK:STDOUT: %.loc38_48.9: init %i32 = initialize_from %.loc38_48.7 to %.loc38_48.8 [template = constants.%.54] +// CHECK:STDOUT: %.loc38_48.9: init %i32 = initialize_from %.loc38_48.7 to %.loc38_48.8 [template = constants.%.58] // CHECK:STDOUT: %.loc38_48.10: init %B = class_init (%.loc38_48.3, %.loc38_48.9), %.loc38_57.3 [template = constants.%struct.2] // CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.10 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc38_57.5: %Convert.type.2 = interface_witness_access constants.%.48, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc38_57.6: = bound_method %.loc38_56, %.loc38_57.5 [template = constants.%.55] -// CHECK:STDOUT: %.loc38_57.7: = specific_function %.loc38_57.6, @Convert.2(constants.%.1) [template = constants.%.56] -// CHECK:STDOUT: %int.convert_checked.loc38_57: init %i32 = call %.loc38_57.7(%.loc38_56) [template = constants.%.57] -// CHECK:STDOUT: %.loc38_57.8: init %i32 = converted %.loc38_56, %int.convert_checked.loc38_57 [template = constants.%.57] +// CHECK:STDOUT: %.loc38_57.5: %Convert.type.2 = interface_witness_access constants.%.52, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc38_57.6: = bound_method %.loc38_56, %.loc38_57.5 [template = constants.%.59] +// CHECK:STDOUT: %.loc38_57.7: = specific_function %.loc38_57.6, @Convert.2(constants.%.1) [template = constants.%.60] +// CHECK:STDOUT: %int.convert_checked.loc38_57: init %i32 = call %.loc38_57.7(%.loc38_56) [template = constants.%.61] +// CHECK:STDOUT: %.loc38_57.8: init %i32 = converted %.loc38_56, %int.convert_checked.loc38_57 [template = constants.%.61] // CHECK:STDOUT: %.loc38_57.9: ref %i32 = class_element_access %.loc38_57.2, element1 -// CHECK:STDOUT: %.loc38_57.10: init %i32 = initialize_from %.loc38_57.8 to %.loc38_57.9 [template = constants.%.57] +// CHECK:STDOUT: %.loc38_57.10: init %i32 = initialize_from %.loc38_57.8 to %.loc38_57.9 [template = constants.%.61] // CHECK:STDOUT: %.loc38_57.11: init %C = class_init (%.loc38_57.4, %.loc38_57.10), %.loc38_57.2 [template = constants.%struct.3] // CHECK:STDOUT: %.loc38_57.12: ref %C = temporary %.loc38_57.2, %.loc38_57.11 // CHECK:STDOUT: %.loc38_59: ref %C = converted %.loc38_57.1, %.loc38_57.12 diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index 3189bf60ac05..f03532bcbd39 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -250,7 +250,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DeriveFromNonType: type = class_type @DeriveFromNonType [template] // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %.21: type = ptr_type %DeriveFromNonType [template] +// CHECK:STDOUT: %.25: type = ptr_type %DeriveFromNonType [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] @@ -276,19 +276,19 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %DeriveFromNonType.decl: type = class_decl @DeriveFromNonType [template = constants.%DeriveFromNonType] {} {} // CHECK:STDOUT: %AccessMemberWithInvalidBasNonType.decl: %AccessMemberWithInvalidBasNonType.type = fn_decl @AccessMemberWithInvalidBasNonType [template = constants.%AccessMemberWithInvalidBasNonType] { -// CHECK:STDOUT: %p.patt: %.21 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.21 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.25 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.25 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] -// CHECK:STDOUT: %.loc15_58: type = ptr_type %DeriveFromNonType [template = constants.%.21] +// CHECK:STDOUT: %.loc15_58: type = ptr_type %DeriveFromNonType [template = constants.%.25] // CHECK:STDOUT: %.loc15_64.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_64.1) [template = constants.%i32] // CHECK:STDOUT: %.loc15_64.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc15_64.3: type = converted %int.make_type_signed, %.loc15_64.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.21 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.21 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.25 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.25 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -306,9 +306,9 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: has_error // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %.21) -> %i32 { +// CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %.25) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.21 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.25 = name_ref p, %p // CHECK:STDOUT: %.loc15_78: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return @@ -427,10 +427,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.5: type = ptr_type %tuple.type.2 [template] // CHECK:STDOUT: %ConvertToBadBaseTuple.type: type = fn_type @ConvertToBadBaseTuple [template] // CHECK:STDOUT: %ConvertToBadBaseTuple: %ConvertToBadBaseTuple.type = struct_value () [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.25 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.29 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple.type: type = fn_type @AccessMemberWithInvalidBaseTuple [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseTuple: %AccessMemberWithInvalidBaseTuple.type = struct_value () [template] // CHECK:STDOUT: } @@ -480,7 +480,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] // CHECK:STDOUT: %.loc23_55: type = ptr_type %DeriveFromTuple [template = constants.%.4] -// CHECK:STDOUT: %.loc23_61.1: Core.IntLiteral = int_value 32 [template = constants.%.25] +// CHECK:STDOUT: %.loc23_61.1: Core.IntLiteral = int_value 32 [template = constants.%.29] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_61.1) [template = constants.%i32] // CHECK:STDOUT: %.loc23_61.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc23_61.3: type = converted %int.make_type_signed, %.loc23_61.2 [template = constants.%i32] @@ -646,10 +646,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %.2: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete.type: type = fn_type @ConvertToBadBaseIncomplete [template] // CHECK:STDOUT: %ConvertToBadBaseIncomplete: %ConvertToBadBaseIncomplete.type = struct_value () [template] -// CHECK:STDOUT: %.22: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.22 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.26 [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete.type: type = fn_type @AccessMemberWithInvalidBaseIncomplete [template] // CHECK:STDOUT: %AccessMemberWithInvalidBaseIncomplete: %AccessMemberWithInvalidBaseIncomplete.type = struct_value () [template] // CHECK:STDOUT: } @@ -697,7 +697,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } { // CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] // CHECK:STDOUT: %.loc30_65: type = ptr_type %DeriveFromIncomplete [template = constants.%.1] -// CHECK:STDOUT: %.loc30_71.1: Core.IntLiteral = int_value 32 [template = constants.%.22] +// CHECK:STDOUT: %.loc30_71.1: Core.IntLiteral = int_value 32 [template = constants.%.26] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc30_71.1) [template = constants.%i32] // CHECK:STDOUT: %.loc30_71.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc30_71.3: type = converted %int.make_type_signed, %.loc30_71.2 [template = constants.%i32] diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index c2bf80fe6081..c20178aed147 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -63,8 +63,8 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %ConvertUnrelated.type: type = fn_type @ConvertUnrelated [template] // CHECK:STDOUT: %ConvertUnrelated: %ConvertUnrelated.type = struct_value () [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.35: type = ptr_type %Incomplete [template] -// CHECK:STDOUT: %.36: type = ptr_type %A2 [template] +// CHECK:STDOUT: %.39: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.40: type = ptr_type %A2 [template] // CHECK:STDOUT: %ConvertIncomplete.type: type = fn_type @ConvertIncomplete [template] // CHECK:STDOUT: %ConvertIncomplete: %ConvertIncomplete.type = struct_value () [template] // CHECK:STDOUT: } @@ -109,19 +109,19 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} // CHECK:STDOUT: %ConvertIncomplete.decl: %ConvertIncomplete.type = fn_decl @ConvertIncomplete [template = constants.%ConvertIncomplete] { -// CHECK:STDOUT: %p.patt: %.35 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.35 = value_param_pattern %p.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.36 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.36 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %p.patt: %.39 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.39 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.40 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.40 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.35] +// CHECK:STDOUT: %.loc41_35: type = ptr_type %Incomplete [template = constants.%.39] // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] -// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.36] -// CHECK:STDOUT: %p.param: %.35 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.35 = bind_name p, %p.param -// CHECK:STDOUT: %return.param: ref %.36 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.36 = return_slot %return.param +// CHECK:STDOUT: %.loc41_43: type = ptr_type %A2 [template = constants.%.40] +// CHECK:STDOUT: %p.param: %.39 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.39 = bind_name p, %p.param +// CHECK:STDOUT: %return.param: ref %.40 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.40 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -177,10 +177,10 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %.35) -> %.36 { +// CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %.39) -> %.40 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.35 = name_ref p, %p -// CHECK:STDOUT: %.loc41_55: %.36 = converted %p.ref, [template = ] +// CHECK:STDOUT: %p.ref: %.39 = name_ref p, %p +// CHECK:STDOUT: %.loc41_55: %.40 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index c5e26229511f..196bda5f0aee 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -47,16 +47,16 @@ class Class { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: type = struct_type {.j: %i32, .k: %i32} [template] -// CHECK:STDOUT: %.32: = complete_type_witness %.31 [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: type = struct_type {.j: %i32, .k: %i32} [template] +// CHECK:STDOUT: %.36: = complete_type_witness %.35 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -93,26 +93,26 @@ class Class { // CHECK:STDOUT: %.loc29_18.2: type = value_of_initializer %int.make_type_signed.loc29 [template = constants.%i32] // CHECK:STDOUT: %.loc29_18.3: type = converted %int.make_type_signed.loc29, %.loc29_18.2 [template = constants.%i32] // CHECK:STDOUT: %.loc29_24: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc29_25.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_25.2: = bound_method %.loc29_24, %.loc29_25.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc29_25.3: = specific_function %.loc29_25.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_25.3(%.loc29_24) [template = constants.%.26] -// CHECK:STDOUT: %.loc29_25.4: %i32 = value_of_initializer %int.convert_checked.loc29 [template = constants.%.26] -// CHECK:STDOUT: %.loc29_25.5: %i32 = converted %.loc29_24, %.loc29_25.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc29_25.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc29_25.2: = bound_method %.loc29_24, %.loc29_25.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc29_25.3: = specific_function %.loc29_25.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_25.3(%.loc29_24) [template = constants.%.30] +// CHECK:STDOUT: %.loc29_25.4: %i32 = value_of_initializer %int.convert_checked.loc29 [template = constants.%.30] +// CHECK:STDOUT: %.loc29_25.5: %i32 = converted %.loc29_24, %.loc29_25.4 [template = constants.%.30] // CHECK:STDOUT: %l: %i32 = bind_name l, %.loc29_25.5 // CHECK:STDOUT: %.loc34_16.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc34: init type = call constants.%Int(%.loc34_16.1) [template = constants.%i32] // CHECK:STDOUT: %.loc34_16.2: type = value_of_initializer %int.make_type_signed.loc34 [template = constants.%i32] // CHECK:STDOUT: %.loc34_16.3: type = converted %int.make_type_signed.loc34, %.loc34_16.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_22: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc34_23.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_23.2: = bound_method %.loc34_22, %.loc34_23.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc34_23.3: = specific_function %.loc34_23.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %.loc34_23.3(%.loc34_22) [template = constants.%.30] -// CHECK:STDOUT: %.loc34_23.4: %i32 = value_of_initializer %int.convert_checked.loc34 [template = constants.%.30] -// CHECK:STDOUT: %.loc34_23.5: %i32 = converted %.loc34_22, %.loc34_23.4 [template = constants.%.30] +// CHECK:STDOUT: %.loc34_22: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc34_23.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc34_23.2: = bound_method %.loc34_22, %.loc34_23.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc34_23.3: = specific_function %.loc34_23.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %.loc34_23.3(%.loc34_22) [template = constants.%.34] +// CHECK:STDOUT: %.loc34_23.4: %i32 = value_of_initializer %int.convert_checked.loc34 [template = constants.%.34] +// CHECK:STDOUT: %.loc34_23.5: %i32 = converted %.loc34_22, %.loc34_23.4 [template = constants.%.34] // CHECK:STDOUT: %m: %i32 = bind_name m, %.loc34_23.5 -// CHECK:STDOUT: %.loc35: = complete_type_witness %.31 [template = constants.%.32] +// CHECK:STDOUT: %.loc35: = complete_type_witness %.35 [template = constants.%.36] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index e17e365f3cca..064ab0903913 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -15,7 +15,7 @@ class Class(T:! type) { // TODO: The follow-on errors here aren't great. Investigate whether we can // enter the scope anyway if the parameters don't match. -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+14]]:10: error: redeclaration differs at parameter 1 [RedeclParamDiffers] +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+14]]:10: error: type `i32` of parameter 1 in redeclaration differs from previous parameter type `type` [RedeclParamDiffersType] // CHECK:STDERR: fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_generic_method.carbon:[[@LINE-10]]:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious] diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index 1d2191fee971..893d95d4dfd4 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -50,12 +50,12 @@ fn F() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.34: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral} [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.38: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral, .c: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -109,20 +109,20 @@ fn F() { // CHECK:STDOUT: %.loc26_17: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc26_18.1: %.9 = struct_literal (%.loc26_9, %.loc26_17) // CHECK:STDOUT: %Class.ref.loc26: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc26_18.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_18.3: = bound_method %.loc26_9, %.loc26_18.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc26_18.4: = specific_function %.loc26_18.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc26_18.4(%.loc26_9) [template = constants.%.32] -// CHECK:STDOUT: %.loc26_18.5: init %i32 = converted %.loc26_9, %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc26_18.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_18.3: = bound_method %.loc26_9, %.loc26_18.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc26_18.4: = specific_function %.loc26_18.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc26_18.4(%.loc26_9) [template = constants.%.36] +// CHECK:STDOUT: %.loc26_18.5: init %i32 = converted %.loc26_9, %int.convert_checked [template = constants.%.36] // CHECK:STDOUT: %.loc26_18.6: ref %Class = temporary_storage // CHECK:STDOUT: %.loc26_18.7: ref %i32 = class_element_access %.loc26_18.6, element0 -// CHECK:STDOUT: %.loc26_18.8: init %i32 = initialize_from %.loc26_18.5 to %.loc26_18.7 [template = constants.%.32] +// CHECK:STDOUT: %.loc26_18.8: init %i32 = initialize_from %.loc26_18.5 to %.loc26_18.7 [template = constants.%.36] // CHECK:STDOUT: %.loc26_18.9: ref %Class = temporary %.loc26_18.6, // CHECK:STDOUT: %.loc26_20: ref %Class = converted %.loc26_18.1, %.loc26_18.9 // CHECK:STDOUT: %.loc30_9: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc30_17: Core.IntLiteral = int_value 2 [template = constants.%.8] -// CHECK:STDOUT: %.loc30_25: Core.IntLiteral = int_value 3 [template = constants.%.33] -// CHECK:STDOUT: %.loc30_26.1: %.34 = struct_literal (%.loc30_9, %.loc30_17, %.loc30_25) +// CHECK:STDOUT: %.loc30_25: Core.IntLiteral = int_value 3 [template = constants.%.37] +// CHECK:STDOUT: %.loc30_26.1: %.38 = struct_literal (%.loc30_9, %.loc30_17, %.loc30_25) // CHECK:STDOUT: %Class.ref.loc30: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %.loc30_26.2: ref %Class = temporary_storage // CHECK:STDOUT: %.loc30_26.3: ref %Class = temporary %.loc30_26.2, diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index e4dcf59858e6..c4761d8f20ff 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -49,14 +49,14 @@ fn F() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.32, %.35) [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.36, %.39) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,21 +119,21 @@ fn F() { // CHECK:STDOUT: %.loc25_32: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc25_33.1: %.9 = struct_literal (%.loc25_24, %.loc25_32) // CHECK:STDOUT: %Class.ref.loc25_38: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_33.3: = bound_method %.loc25_24, %.loc25_33.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc25_33.4: = specific_function %.loc25_33.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc25_33.1: init %i32 = call %.loc25_33.4(%.loc25_24) [template = constants.%.32] -// CHECK:STDOUT: %.loc25_33.5: init %i32 = converted %.loc25_24, %int.convert_checked.loc25_33.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_33.3: = bound_method %.loc25_24, %.loc25_33.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc25_33.4: = specific_function %.loc25_33.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc25_33.1: init %i32 = call %.loc25_33.4(%.loc25_24) [template = constants.%.36] +// CHECK:STDOUT: %.loc25_33.5: init %i32 = converted %.loc25_24, %int.convert_checked.loc25_33.1 [template = constants.%.36] // CHECK:STDOUT: %.loc25_33.6: ref %Class = temporary_storage // CHECK:STDOUT: %.loc25_33.7: ref %i32 = class_element_access %.loc25_33.6, element0 -// CHECK:STDOUT: %.loc25_33.8: init %i32 = initialize_from %.loc25_33.5 to %.loc25_33.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc25_33.9: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_33.10: = bound_method %.loc25_32, %.loc25_33.9 [template = constants.%.33] -// CHECK:STDOUT: %.loc25_33.11: = specific_function %.loc25_33.10, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc25_33.2: init %i32 = call %.loc25_33.11(%.loc25_32) [template = constants.%.35] -// CHECK:STDOUT: %.loc25_33.12: init %i32 = converted %.loc25_32, %int.convert_checked.loc25_33.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc25_33.8: init %i32 = initialize_from %.loc25_33.5 to %.loc25_33.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc25_33.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_33.10: = bound_method %.loc25_32, %.loc25_33.9 [template = constants.%.37] +// CHECK:STDOUT: %.loc25_33.11: = specific_function %.loc25_33.10, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc25_33.2: init %i32 = call %.loc25_33.11(%.loc25_32) [template = constants.%.39] +// CHECK:STDOUT: %.loc25_33.12: init %i32 = converted %.loc25_32, %int.convert_checked.loc25_33.2 [template = constants.%.39] // CHECK:STDOUT: %.loc25_33.13: ref %i32 = class_element_access %.loc25_33.6, element1 -// CHECK:STDOUT: %.loc25_33.14: init %i32 = initialize_from %.loc25_33.12 to %.loc25_33.13 [template = constants.%.35] +// CHECK:STDOUT: %.loc25_33.14: init %i32 = initialize_from %.loc25_33.12 to %.loc25_33.13 [template = constants.%.39] // CHECK:STDOUT: %.loc25_33.15: init %Class = class_init (%.loc25_33.8, %.loc25_33.14), %.loc25_33.6 [template = constants.%struct] // CHECK:STDOUT: %.loc25_33.16: ref %Class = temporary %.loc25_33.6, %.loc25_33.15 // CHECK:STDOUT: %.loc25_35.1: ref %Class = converted %.loc25_33.1, %.loc25_33.16 diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index bfa2ac43ba1e..31c4f50fb6ed 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -37,10 +37,10 @@ fn G() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -97,12 +97,12 @@ fn G() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.27] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.31] +// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.31] // CHECK:STDOUT: return %.loc13_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index 315528928132..591e3012ca5b 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -38,14 +38,14 @@ fn Run() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -96,21 +96,21 @@ fn Run() { // CHECK:STDOUT: %j.ref.loc18: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc18_4: ref %i32 = class_element_access %c.ref.loc18, element0 // CHECK:STDOUT: %.loc18_9: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc18_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_7.2: = bound_method %.loc18_9, %.loc18_7.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc18_7.3: = specific_function %.loc18_7.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_7.3(%.loc18_9) [template = constants.%.29] -// CHECK:STDOUT: %.loc18_7.4: init %i32 = converted %.loc18_9, %int.convert_checked.loc18 [template = constants.%.29] +// CHECK:STDOUT: %.loc18_7.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_7.2: = bound_method %.loc18_9, %.loc18_7.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc18_7.3: = specific_function %.loc18_7.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_7.3(%.loc18_9) [template = constants.%.33] +// CHECK:STDOUT: %.loc18_7.4: init %i32 = converted %.loc18_9, %int.convert_checked.loc18 [template = constants.%.33] // CHECK:STDOUT: assign %.loc18_4, %.loc18_7.4 // CHECK:STDOUT: %c.ref.loc19: ref %Class = name_ref c, %c // CHECK:STDOUT: %k.ref.loc19: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] // CHECK:STDOUT: %.loc19_4: ref %i32 = class_element_access %c.ref.loc19, element1 -// CHECK:STDOUT: %.loc19_9: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_7.2: = bound_method %.loc19_9, %.loc19_7.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_7.3: = specific_function %.loc19_7.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_7.3(%.loc19_9) [template = constants.%.33] -// CHECK:STDOUT: %.loc19_7.4: init %i32 = converted %.loc19_9, %int.convert_checked.loc19 [template = constants.%.33] +// CHECK:STDOUT: %.loc19_9: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc19_7.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_7.2: = bound_method %.loc19_9, %.loc19_7.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_7.3: = specific_function %.loc19_7.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_7.3(%.loc19_9) [template = constants.%.37] +// CHECK:STDOUT: %.loc19_7.4: init %i32 = converted %.loc19_9, %int.convert_checked.loc19 [template = constants.%.37] // CHECK:STDOUT: assign %.loc19_4, %.loc19_7.4 // CHECK:STDOUT: %.loc20_11.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_11.1) [template = constants.%i32] diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 081906a6d672..e9e162ad13af 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -39,14 +39,14 @@ fn Test() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -97,21 +97,21 @@ fn Test() { // CHECK:STDOUT: %j.ref.loc18: %.2 = name_ref j, @Class.%.loc12_8 [template = @Class.%.loc12_8] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %cv.ref.loc18, element0 // CHECK:STDOUT: %.loc18_10: Core.IntLiteral = int_value 1 [template = constants.%.6] -// CHECK:STDOUT: %.loc18_8.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_8.2: = bound_method %.loc18_10, %.loc18_8.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc18_8.3: = specific_function %.loc18_8.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_8.3(%.loc18_10) [template = constants.%.29] -// CHECK:STDOUT: %.loc18_8.4: init %i32 = converted %.loc18_10, %int.convert_checked.loc18 [template = constants.%.29] +// CHECK:STDOUT: %.loc18_8.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_8.2: = bound_method %.loc18_10, %.loc18_8.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc18_8.3: = specific_function %.loc18_8.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_8.3(%.loc18_10) [template = constants.%.33] +// CHECK:STDOUT: %.loc18_8.4: init %i32 = converted %.loc18_10, %int.convert_checked.loc18 [template = constants.%.33] // CHECK:STDOUT: assign %.loc18_5, %.loc18_8.4 // CHECK:STDOUT: %cv.ref.loc19: ref %Class = name_ref cv, %cv // CHECK:STDOUT: %k.ref.loc19: %.2 = name_ref k, @Class.%.loc13_8 [template = @Class.%.loc13_8] // CHECK:STDOUT: %.loc19_5: ref %i32 = class_element_access %cv.ref.loc19, element1 -// CHECK:STDOUT: %.loc19_10: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_8.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_8.2: = bound_method %.loc19_10, %.loc19_8.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_8.3: = specific_function %.loc19_8.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_8.3(%.loc19_10) [template = constants.%.33] -// CHECK:STDOUT: %.loc19_8.4: init %i32 = converted %.loc19_10, %int.convert_checked.loc19 [template = constants.%.33] +// CHECK:STDOUT: %.loc19_10: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc19_8.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_8.2: = bound_method %.loc19_10, %.loc19_8.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_8.3: = specific_function %.loc19_8.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_8.3(%.loc19_10) [template = constants.%.37] +// CHECK:STDOUT: %.loc19_8.4: init %i32 = converted %.loc19_10, %int.convert_checked.loc19 [template = constants.%.37] // CHECK:STDOUT: assign %.loc19_5, %.loc19_8.4 // CHECK:STDOUT: %Class.ref.loc20: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %cv.ref.loc20: ref %Class = name_ref cv, %cv diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 1b4e96b5a9a3..1085c44fbe97 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -107,16 +107,16 @@ class Outer(T:! type) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%.4, %.28) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%empty_tuple.type, %.33) [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 5 [template] +// CHECK:STDOUT: %Class.3: type = class_type @Class, @Class(%.4, %.32) [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Class.4: type = class_type @Class, @Class(%empty_tuple.type, %.37) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -158,26 +158,26 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_signed, %.loc6_17.1 [template = constants.%i32] // CHECK:STDOUT: %.loc6_17.3: type = ptr_type %i32 [template = constants.%.4] // CHECK:STDOUT: %.loc6_20: Core.IntLiteral = int_value 5 [template = constants.%.5] -// CHECK:STDOUT: %.loc6_13.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_13.2: = bound_method %.loc6_20, %.loc6_13.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_13.3: = specific_function %.loc6_13.2, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_13.3(%.loc6_20) [template = constants.%.28] -// CHECK:STDOUT: %.loc6_13.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_13.5: %i32 = converted %.loc6_20, %.loc6_13.4 [template = constants.%.28] -// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.4, constants.%.28) [template = constants.%Class.3] +// CHECK:STDOUT: %.loc6_13.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_13.2: = bound_method %.loc6_20, %.loc6_13.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_13.3: = specific_function %.loc6_13.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_13.3(%.loc6_20) [template = constants.%.32] +// CHECK:STDOUT: %.loc6_13.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_13.5: %i32 = converted %.loc6_20, %.loc6_13.4 [template = constants.%.32] +// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.4, constants.%.32) [template = constants.%Class.3] // CHECK:STDOUT: %a.var: ref %Class.3 = var a // CHECK:STDOUT: %a: ref %Class.3 = bind_name a, %a.var // CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 0 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 0 [template = constants.%.34] // CHECK:STDOUT: %.loc9_13.1: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_13.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_13.3: = bound_method %.loc9_18, %.loc9_13.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_13.4: = specific_function %.loc9_13.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_13.4(%.loc9_18) [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.5: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.33] -// CHECK:STDOUT: %.loc9_13.6: %i32 = converted %.loc9_18, %.loc9_13.5 [template = constants.%.33] -// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%.33) [template = constants.%Class.4] +// CHECK:STDOUT: %.loc9_13.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_13.3: = bound_method %.loc9_18, %.loc9_13.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_13.4: = specific_function %.loc9_13.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_13.4(%.loc9_18) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_13.5: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_13.6: %i32 = converted %.loc9_18, %.loc9_13.5 [template = constants.%.37] +// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%.37) [template = constants.%Class.4] // CHECK:STDOUT: %b.var: ref %Class.4 = var b // CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var // CHECK:STDOUT: } @@ -205,20 +205,20 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%N.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%.4, constants.%.28) { +// CHECK:STDOUT: specific @Class(constants.%.4, constants.%.32) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%.4 // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%.4 -// CHECK:STDOUT: %N.loc4_23.2 => constants.%.28 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.28 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%.32 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%.33) { +// CHECK:STDOUT: specific @Class(constants.%empty_tuple.type, constants.%.37) { // CHECK:STDOUT: %T.loc4_13.2 => constants.%empty_tuple.type // CHECK:STDOUT: %T.patt.loc4_13.2 => constants.%empty_tuple.type -// CHECK:STDOUT: %N.loc4_23.2 => constants.%.33 -// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.33 +// CHECK:STDOUT: %N.loc4_23.2 => constants.%.37 +// CHECK:STDOUT: %N.patt.loc4_23.2 => constants.%.37 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 410bac46676f..a091b8e12e11 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -107,10 +107,10 @@ class Class(U:! type) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] @@ -211,12 +211,12 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc8_26: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc8_27.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_27.2: = bound_method %.loc8_26, %.loc8_27.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc8_27.3: = specific_function %.loc8_27.2, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_27.3(%.loc8_26) [template = constants.%.28] -// CHECK:STDOUT: %.loc8_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28] -// CHECK:STDOUT: %.loc8_27.5: %i32 = converted %.loc8_26, %.loc8_27.4 [template = constants.%.28] +// CHECK:STDOUT: %.loc8_27.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_27.2: = bound_method %.loc8_26, %.loc8_27.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_27.3: = specific_function %.loc8_27.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc8_27.3(%.loc8_26) [template = constants.%.32] +// CHECK:STDOUT: %.loc8_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc8_27.5: %i32 = converted %.loc8_26, %.loc8_27.4 [template = constants.%.32] // CHECK:STDOUT: return %.loc8_27.5 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -265,67 +265,71 @@ class Class(U:! type) { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.17 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.17 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.27 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.27 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.34 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.34 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.1: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class.2: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %.17: type = unbound_element_type %Class.2, %T [symbolic] -// CHECK:STDOUT: %.18: type = struct_type {.x: %T} [symbolic] -// CHECK:STDOUT: %.19: = complete_type_witness %.18 [symbolic] +// CHECK:STDOUT: %.21: type = unbound_element_type %Class.2, %T [symbolic] +// CHECK:STDOUT: %.22: type = struct_type {.x: %T} [symbolic] +// CHECK:STDOUT: %.23: = complete_type_witness %.22 [symbolic] // CHECK:STDOUT: %CompleteClass.type: type = generic_class_type @CompleteClass [template] // CHECK:STDOUT: %CompleteClass.1: %CompleteClass.type = struct_value () [template] -// CHECK:STDOUT: %.20: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.20 [template] +// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.24 [template] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic] -// CHECK:STDOUT: %.23: type = unbound_element_type %CompleteClass.2, %i32 [symbolic] +// CHECK:STDOUT: %.27: type = unbound_element_type %CompleteClass.2, %i32 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @CompleteClass(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] @@ -333,24 +337,24 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.3: type = class_type @CompleteClass, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.24: type = unbound_element_type %CompleteClass.3, %i32 [template] +// CHECK:STDOUT: %.28: type = unbound_element_type %CompleteClass.3, %i32 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @CompleteClass(%i32) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.27: type = struct_type {.n: Core.IntLiteral} [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.31: type = struct_type {.n: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.28: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.29: %.28 = assoc_entity element0, imports.%import_ref.10 [template] -// CHECK:STDOUT: %.30: %.1 = assoc_entity element0, imports.%import_ref.43 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.20) [template] +// CHECK:STDOUT: %.32: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %.33: %.32 = assoc_entity element0, imports.%import_ref.10 [template] +// CHECK:STDOUT: %.34: %.2 = assoc_entity element0, imports.%import_ref.43 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.24) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.20) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.34) [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.36: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.24) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %CompleteClass.3 = struct_value (%.38) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -362,37 +366,37 @@ class Class(U:! type) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+77, unloaded -// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.1) = import_ref Main//foo, inst+78, loaded [symbolic = @ImplicitAs.%.2 (constants.%.30)] +// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%.1 (%.2) = import_ref Main//foo, inst+78, loaded [symbolic = @ImplicitAs.%.2 (constants.%.34)] // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+79, unloaded -// CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.9: = import_ref Main//foo, inst+123, loaded [symbolic = @impl.1.%.1 (constants.%.3)] -// CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+94, unloaded -// CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+153, unloaded -// CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+182, unloaded -// CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+214, unloaded -// CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+244, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+245, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+246, unloaded -// CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+254, unloaded -// CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+269, unloaded -// CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+308, unloaded -// CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+337, unloaded -// CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+369, unloaded +// CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+124, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+125, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.9: = import_ref Main//foo, inst+126, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+95, unloaded +// CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+154, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+155, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+156, unloaded +// CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+183, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+184, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+185, unloaded +// CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+215, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+216, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+217, unloaded +// CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+247, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+248, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+249, unloaded +// CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+255, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+256, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+257, unloaded +// CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+273, unloaded +// CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+312, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+313, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+314, unloaded +// CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+341, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+342, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+343, unloaded +// CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+373, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+374, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+375, unloaded // CHECK:STDOUT: %import_ref.38 = import_ref Main//foo, inst+25, unloaded // CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+44, unloaded // CHECK:STDOUT: %import_ref.40 = import_ref Main//foo, inst+53, unloaded @@ -420,7 +424,7 @@ class Class(U:! type) { // CHECK:STDOUT: %return.param_patt: %CompleteClass.3 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %.loc8_25: Core.IntLiteral = int_value 32 [template = constants.%.20] +// CHECK:STDOUT: %.loc8_25: Core.IntLiteral = int_value 32 [template = constants.%.24] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_25) [template = constants.%i32] // CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc8_24.2: type = converted %int.make_type_signed, %.loc8_24.1 [template = constants.%i32] @@ -439,8 +443,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -459,8 +463,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -479,7 +483,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 { // CHECK:STDOUT: !members: @@ -496,7 +500,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 { // CHECK:STDOUT: !members: @@ -512,7 +516,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 { // CHECK:STDOUT: !members: @@ -528,7 +532,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 { // CHECK:STDOUT: !members: @@ -545,7 +549,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 { // CHECK:STDOUT: !members: @@ -562,7 +566,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 { // CHECK:STDOUT: !members: @@ -578,7 +582,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 { // CHECK:STDOUT: !members: @@ -594,7 +598,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 { // CHECK:STDOUT: !members: @@ -608,14 +612,14 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class.2)] -// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.17)] -// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.18)] -// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.18) [symbolic = %.loc6_1.3 (constants.%.19)] +// CHECK:STDOUT: %.loc5_8.2: type = unbound_element_type @Class.%Class (%Class.2), @Class.%T.1 (%T) [symbolic = %.loc5_8.2 (constants.%.21)] +// CHECK:STDOUT: %.loc6_1.2: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %.loc6_1.2 (constants.%.22)] +// CHECK:STDOUT: %.loc6_1.3: = complete_type_witness @Class.%.loc6_1.2 (%.22) [symbolic = %.loc6_1.3 (constants.%.23)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)] -// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.17) = field_decl x, element0 [template] -// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.18 [symbolic = %.loc6_1.3 (constants.%.19)] +// CHECK:STDOUT: %.loc5_8.1: @Class.%.loc5_8.2 (%.21) = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc6_1.1: = complete_type_witness %.22 [symbolic = %.loc6_1.3 (constants.%.23)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class.2 @@ -629,7 +633,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(%T) [symbolic = %CompleteClass (constants.%CompleteClass.2)] -// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.23)] +// CHECK:STDOUT: %.1: type = unbound_element_type @CompleteClass.%CompleteClass (%CompleteClass.2), %i32 [symbolic = %.1 (constants.%.27)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @CompleteClass(%T) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: @@ -645,8 +649,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -689,8 +694,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -737,15 +743,15 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %CompleteClass.3 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc9_16: Core.IntLiteral = int_value 1 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_17.1: %.27 = struct_literal (%.loc9_16) -// CHECK:STDOUT: %.loc9_17.2: %Convert.type.13 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_17.3: = bound_method %.loc9_16, %.loc9_17.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_17.4: = specific_function %.loc9_17.3, @Convert.2(constants.%.20) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_17.4(%.loc9_16) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_17.5: init %i32 = converted %.loc9_16, %int.convert_checked [template = constants.%.34] +// CHECK:STDOUT: %.loc9_16: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_17.1: %.31 = struct_literal (%.loc9_16) +// CHECK:STDOUT: %.loc9_17.2: %Convert.type.13 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_17.3: = bound_method %.loc9_16, %.loc9_17.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_17.4: = specific_function %.loc9_17.3, @Convert.2(constants.%.24) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_17.4(%.loc9_16) [template = constants.%.38] +// CHECK:STDOUT: %.loc9_17.5: init %i32 = converted %.loc9_16, %int.convert_checked [template = constants.%.38] // CHECK:STDOUT: %.loc9_17.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc9_17.7: init %i32 = initialize_from %.loc9_17.5 to %.loc9_17.6 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_17.7: init %i32 = initialize_from %.loc9_17.5 to %.loc9_17.6 [template = constants.%.38] // CHECK:STDOUT: %.loc9_17.8: init %CompleteClass.3 = class_init (%.loc9_17.7), %return [template = constants.%struct] // CHECK:STDOUT: %.loc9_18: init %CompleteClass.3 = converted %.loc9_17.1, %.loc9_17.8 [template = constants.%struct] // CHECK:STDOUT: return %.loc9_18 to %return @@ -794,6 +800,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -839,8 +846,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -920,6 +927,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -965,8 +973,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1019,7 +1027,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.2 -// CHECK:STDOUT: %.1 => constants.%.23 +// CHECK:STDOUT: %.1 => constants.%.27 // CHECK:STDOUT: %F.type => constants.%F.type.1 // CHECK:STDOUT: %F => constants.%F.1 // CHECK:STDOUT: } @@ -1037,7 +1045,7 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %CompleteClass => constants.%CompleteClass.3 -// CHECK:STDOUT: %.1 => constants.%.24 +// CHECK:STDOUT: %.1 => constants.%.28 // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 // CHECK:STDOUT: } @@ -1051,24 +1059,24 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.28 -// CHECK:STDOUT: %.2 => constants.%.29 +// CHECK:STDOUT: %.1 => constants.%.32 +// CHECK:STDOUT: %.2 => constants.%.33 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.20) { -// CHECK:STDOUT: %N => constants.%.20 -// CHECK:STDOUT: %N.patt => constants.%.20 +// CHECK:STDOUT: specific @impl.1(constants.%.24) { +// CHECK:STDOUT: %N => constants.%.24 +// CHECK:STDOUT: %N.patt => constants.%.24 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.31 +// CHECK:STDOUT: %.1 => constants.%.35 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.20) { -// CHECK:STDOUT: %N => constants.%.20 +// CHECK:STDOUT: specific @Convert.2(constants.%.24) { +// CHECK:STDOUT: %N => constants.%.24 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1105,7 +1113,7 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+413, loaded [template = constants.%F.3] +// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+419, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.4 // CHECK:STDOUT: import Core//prelude @@ -1291,51 +1299,53 @@ class Class(U:! type) { // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.15: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.5) [symbolic] +// CHECK:STDOUT: %.18: = interface_witness (%Convert.5) [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.19: = interface_witness (%Convert.7) [symbolic] +// CHECK:STDOUT: %.21: = interface_witness (%Convert.7) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.20: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.33 [symbolic] +// CHECK:STDOUT: %.22: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.23: type = assoc_entity_type %As.type.2, %Convert.type.8 [symbolic] +// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, imports.%import_ref.33 [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.26: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [symbolic] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.11) [symbolic] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.11) [symbolic] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %.25: type = assoc_entity_type %As.type.5, %Convert.type.12 [template] -// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.40 [template] +// CHECK:STDOUT: %.29: type = assoc_entity_type %As.type.5, %Convert.type.12 [template] +// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.40 [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [symbolic] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.13) [symbolic] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.13) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Main//foo, inst+9, unloaded // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, inst+20, loaded [template = constants.%CompleteClass.1] -// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+413, loaded [template = constants.%F.3] +// CHECK:STDOUT: %import_ref.3: %F.type.3 = import_ref Main//foo, inst+419, loaded [template = constants.%F.3] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.7 // CHECK:STDOUT: .ImplicitAs = %import_ref.8 @@ -1345,34 +1355,34 @@ class Class(U:! type) { // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+25, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+44, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+53, unloaded -// CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+123, unloaded -// CHECK:STDOUT: %import_ref.17: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.5)] -// CHECK:STDOUT: %import_ref.19 = import_ref Main//foo, inst+153, unloaded -// CHECK:STDOUT: %import_ref.20: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.21: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.6] -// CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+182, unloaded -// CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.6] -// CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+214, unloaded -// CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+244, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Main//foo, inst+245, unloaded -// CHECK:STDOUT: %import_ref.29 = import_ref Main//foo, inst+246, unloaded -// CHECK:STDOUT: %import_ref.30: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.32 = import_ref Main//foo, inst+254, unloaded -// CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+269, unloaded -// CHECK:STDOUT: %import_ref.34: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.36 = import_ref Main//foo, inst+308, unloaded -// CHECK:STDOUT: %import_ref.37: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.38: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+337, unloaded -// CHECK:STDOUT: %import_ref.41: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.42: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.43 = import_ref Main//foo, inst+369, unloaded +// CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+124, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+125, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+126, unloaded +// CHECK:STDOUT: %import_ref.17: type = import_ref Main//foo, inst+154, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+155, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.5)] +// CHECK:STDOUT: %import_ref.19 = import_ref Main//foo, inst+156, unloaded +// CHECK:STDOUT: %import_ref.20: type = import_ref Main//foo, inst+183, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.21: type = import_ref Main//foo, inst+184, loaded [template = constants.%ImplicitAs.type.6] +// CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+185, unloaded +// CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+215, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+216, loaded [template = constants.%ImplicitAs.type.6] +// CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+217, unloaded +// CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+247, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Main//foo, inst+248, unloaded +// CHECK:STDOUT: %import_ref.29 = import_ref Main//foo, inst+249, unloaded +// CHECK:STDOUT: %import_ref.30: type = import_ref Main//foo, inst+255, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+256, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.32 = import_ref Main//foo, inst+257, unloaded +// CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+273, unloaded +// CHECK:STDOUT: %import_ref.34: type = import_ref Main//foo, inst+312, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+313, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.36 = import_ref Main//foo, inst+314, unloaded +// CHECK:STDOUT: %import_ref.37: type = import_ref Main//foo, inst+341, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.38: type = import_ref Main//foo, inst+342, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.39 = import_ref Main//foo, inst+343, unloaded +// CHECK:STDOUT: %import_ref.41: type = import_ref Main//foo, inst+373, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.42: type = import_ref Main//foo, inst+374, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.43 = import_ref Main//foo, inst+375, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1397,8 +1407,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.20)] -// CHECK:STDOUT: %.2: @As.%.1 (%.20) = assoc_entity element0, imports.%import_ref.33 [symbolic = %.2 (constants.%.21)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.8) [symbolic = %.1 (constants.%.23)] +// CHECK:STDOUT: %.2: @As.%.1 (%.23) = assoc_entity element0, imports.%import_ref.33 [symbolic = %.2 (constants.%.24)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1417,7 +1427,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 { // CHECK:STDOUT: !members: @@ -1434,7 +1444,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.15)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 { // CHECK:STDOUT: !members: @@ -1450,7 +1460,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.5)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.5) = struct_value () [symbolic = %Convert (constants.%Convert.5)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.18)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.20 as imports.%import_ref.21 { // CHECK:STDOUT: !members: @@ -1466,7 +1476,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.19)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.21)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 { // CHECK:STDOUT: !members: @@ -1483,7 +1493,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.22)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.25)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 { // CHECK:STDOUT: !members: @@ -1500,7 +1510,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.23)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.27)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 { // CHECK:STDOUT: !members: @@ -1516,7 +1526,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.11)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.11) = struct_value () [symbolic = %Convert (constants.%Convert.11)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.24)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.28)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.37 as imports.%import_ref.38 { // CHECK:STDOUT: !members: @@ -1532,7 +1542,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.13)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.13) = struct_value () [symbolic = %Convert (constants.%Convert.13)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.27)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.31)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.41 as imports.%import_ref.42 { // CHECK:STDOUT: !members: @@ -1625,8 +1635,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.22)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.22)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -1820,6 +1831,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1865,8 +1877,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.12 // CHECK:STDOUT: %Convert => constants.%Convert.12 -// CHECK:STDOUT: %.1 => constants.%.25 -// CHECK:STDOUT: %.2 => constants.%.26 +// CHECK:STDOUT: %.1 => constants.%.29 +// CHECK:STDOUT: %.2 => constants.%.30 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1917,53 +1929,57 @@ class Class(U:! type) { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.10 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.10 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.17 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.17 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.27 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.27 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.34 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.34 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] @@ -1971,14 +1987,14 @@ class Class(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.17: %.type = struct_value () [template] -// CHECK:STDOUT: %.18: type = class_type @.1, @.1(%U) [symbolic] +// CHECK:STDOUT: %.21: %.type = struct_value () [template] +// CHECK:STDOUT: %.22: type = class_type @.1, @.1(%U) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: %Class.type = import_ref Main//foo, inst+9, loaded [template = constants.%Class.1] // CHECK:STDOUT: %import_ref.2 = import_ref Main//foo, inst+20, unloaded -// CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+413, unloaded +// CHECK:STDOUT: %import_ref.3 = import_ref Main//foo, inst+419, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -1986,35 +2002,35 @@ class Class(U:! type) { // CHECK:STDOUT: %import_ref.4 = import_ref Main//foo, inst+77, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Main//foo, inst+78, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//foo, inst+79, unloaded -// CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+121, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+122, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, inst+123, unloaded -// CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+94, unloaded -// CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+151, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+152, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+153, unloaded -// CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+180, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+181, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+182, unloaded -// CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+212, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+213, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+214, unloaded -// CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+244, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+245, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+246, unloaded -// CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+252, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+253, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+254, unloaded -// CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+269, unloaded -// CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+306, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+307, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+308, unloaded -// CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+335, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+336, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+337, unloaded -// CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+367, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+368, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+369, unloaded +// CHECK:STDOUT: %import_ref.7: type = import_ref Main//foo, inst+124, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.8: type = import_ref Main//foo, inst+125, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.9 = import_ref Main//foo, inst+126, unloaded +// CHECK:STDOUT: %import_ref.10 = import_ref Main//foo, inst+95, unloaded +// CHECK:STDOUT: %import_ref.11: type = import_ref Main//foo, inst+154, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//foo, inst+155, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.13 = import_ref Main//foo, inst+156, unloaded +// CHECK:STDOUT: %import_ref.14: type = import_ref Main//foo, inst+183, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.15: type = import_ref Main//foo, inst+184, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.16 = import_ref Main//foo, inst+185, unloaded +// CHECK:STDOUT: %import_ref.18: type = import_ref Main//foo, inst+215, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.19: type = import_ref Main//foo, inst+216, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.20 = import_ref Main//foo, inst+217, unloaded +// CHECK:STDOUT: %import_ref.21 = import_ref Main//foo, inst+247, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Main//foo, inst+248, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Main//foo, inst+249, unloaded +// CHECK:STDOUT: %import_ref.24: type = import_ref Main//foo, inst+255, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.25: type = import_ref Main//foo, inst+256, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.26 = import_ref Main//foo, inst+257, unloaded +// CHECK:STDOUT: %import_ref.27 = import_ref Main//foo, inst+273, unloaded +// CHECK:STDOUT: %import_ref.28: type = import_ref Main//foo, inst+312, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.29: type = import_ref Main//foo, inst+313, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.30 = import_ref Main//foo, inst+314, unloaded +// CHECK:STDOUT: %import_ref.31: type = import_ref Main//foo, inst+341, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.32: type = import_ref Main//foo, inst+342, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.33 = import_ref Main//foo, inst+343, unloaded +// CHECK:STDOUT: %import_ref.35: type = import_ref Main//foo, inst+373, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.36: type = import_ref Main//foo, inst+374, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.37 = import_ref Main//foo, inst+375, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -2027,7 +2043,7 @@ class Class(U:! type) { // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.17] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.21] { // CHECK:STDOUT: %U.patt.loc12_13.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc12_13.1, runtime_param [symbolic = %U.patt.loc12_13.2 (constants.%U.patt)] // CHECK:STDOUT: } { @@ -2045,8 +2061,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.10 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2065,8 +2081,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.27 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2085,7 +2101,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.7 as imports.%import_ref.8 { // CHECK:STDOUT: !members: @@ -2102,7 +2118,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.11 as imports.%import_ref.12 { // CHECK:STDOUT: !members: @@ -2118,7 +2134,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.14 as imports.%import_ref.15 { // CHECK:STDOUT: !members: @@ -2134,7 +2150,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.18 as imports.%import_ref.19 { // CHECK:STDOUT: !members: @@ -2151,7 +2167,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.24 as imports.%import_ref.25 { // CHECK:STDOUT: !members: @@ -2168,7 +2184,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.28 as imports.%import_ref.29 { // CHECK:STDOUT: !members: @@ -2184,7 +2200,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.31 as imports.%import_ref.32 { // CHECK:STDOUT: !members: @@ -2200,7 +2216,7 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.35 as imports.%import_ref.36 { // CHECK:STDOUT: !members: @@ -2227,7 +2243,7 @@ class Class(U:! type) { // CHECK:STDOUT: %.loc17: = complete_type_witness [template = ] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.18 +// CHECK:STDOUT: .Self = constants.%.22 // CHECK:STDOUT: .x = %.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -2236,8 +2252,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -2280,8 +2297,9 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -2363,6 +2381,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -2408,8 +2427,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -2489,6 +2508,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -2534,8 +2554,8 @@ class Class(U:! type) { // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index 32f2ce55c1f9..4aae219bcf5c 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -97,7 +97,7 @@ class Generic(T:! type) { fn WrongType(); } -// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE+6]]:12: error: redeclaration differs at parameter 1 [RedeclParamDiffers] +// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE+6]]:12: error: type `()` of parameter 1 in redeclaration differs from previous parameter type `type` [RedeclParamDiffersType] // CHECK:STDERR: fn Generic(T:! ()).WrongType() {} // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE-7]]:15: note: previous declaration's corresponding parameter here [RedeclParamPrevious] diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 2b7b5322c470..2378a7fdba67 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -64,7 +64,7 @@ class C(T:! type, U:! i32) {} library "[[@TEST_NAME]]"; class D(T:! type); -// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: redeclaration differs at parameter 1 [RedeclParamDiffers] +// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: type `i32` of parameter 1 in redeclaration differs from previous parameter type `type` [RedeclParamDiffersType] // CHECK:STDERR: class D(T:! i32) {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index a4a550452222..1d7f1febf8e8 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -166,25 +166,25 @@ fn Run() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.4) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.4) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.2: %Field = struct_value (%.32) [template] -// CHECK:STDOUT: %.33: type = unbound_element_type %Field, %i32 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.4) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.4) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.2: %Field = struct_value (%.36) [template] +// CHECK:STDOUT: %.37: type = unbound_element_type %Field, %i32 [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.4) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] // CHECK:STDOUT: %struct.3: %ForwardDeclared.1 = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.38: type = ptr_type %ForwardDeclared.1 [template] +// CHECK:STDOUT: %.42: type = ptr_type %ForwardDeclared.1 [template] // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %.39: type = ptr_type %Incomplete [template] +// CHECK:STDOUT: %.43: type = ptr_type %Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -199,7 +199,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//a, inst+9, unloaded -// CHECK:STDOUT: %import_ref.7: %.33 = import_ref Main//a, inst+29, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.7: %.37 = import_ref Main//a, inst+29, loaded [template = %.1] // CHECK:STDOUT: %import_ref.44 = import_ref Main//a, inst+34, unloaded // CHECK:STDOUT: %import_ref.45: %F.type = import_ref Main//a, inst+41, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.46: %G.type = import_ref Main//a, inst+52, loaded [template = constants.%G] @@ -263,25 +263,25 @@ fn Run() { // CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var // CHECK:STDOUT: %.loc9_24: Core.IntLiteral = int_value 1 [template = constants.%.8] // CHECK:STDOUT: %.loc9_25.1: %.9 = struct_literal (%.loc9_24) -// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_24, %.loc9_25.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.4) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_25.4(%.loc9_24) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_25.5: init %i32 = converted %.loc9_24, %int.convert_checked.loc9 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_25.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_25.3: = bound_method %.loc9_24, %.loc9_25.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_25.4: = specific_function %.loc9_25.3, @Convert.2(constants.%.4) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_25.4(%.loc9_24) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_25.5: init %i32 = converted %.loc9_24, %int.convert_checked.loc9 [template = constants.%.36] // CHECK:STDOUT: %.loc9_25.6: ref %i32 = class_element_access %b.var, element0 -// CHECK:STDOUT: %.loc9_25.7: init %i32 = initialize_from %.loc9_25.5 to %.loc9_25.6 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_25.7: init %i32 = initialize_from %.loc9_25.5 to %.loc9_25.6 [template = constants.%.36] // CHECK:STDOUT: %.loc9_25.8: init %Field = class_init (%.loc9_25.7), %b.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc9_26: init %Field = converted %.loc9_25.1, %.loc9_25.8 [template = constants.%struct.2] // CHECK:STDOUT: assign %b.var, %.loc9_26 // CHECK:STDOUT: %b.ref: ref %Field = name_ref b, %b -// CHECK:STDOUT: %x.ref: %.33 = name_ref x, imports.%import_ref.7 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %.37 = name_ref x, imports.%import_ref.7 [template = imports.%.1] // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0 -// CHECK:STDOUT: %.loc10_9: Core.IntLiteral = int_value 2 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_7.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_7.2: = bound_method %.loc10_9, %.loc10_7.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc10_7.3: = specific_function %.loc10_7.2, @Convert.2(constants.%.4) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_7.3(%.loc10_9) [template = constants.%.37] -// CHECK:STDOUT: %.loc10_7.4: init %i32 = converted %.loc10_9, %int.convert_checked.loc10 [template = constants.%.37] +// CHECK:STDOUT: %.loc10_9: Core.IntLiteral = int_value 2 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_7.1: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_7.2: = bound_method %.loc10_9, %.loc10_7.1 [template = constants.%.39] +// CHECK:STDOUT: %.loc10_7.3: = specific_function %.loc10_7.2, @Convert.2(constants.%.4) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_7.3(%.loc10_9) [template = constants.%.41] +// CHECK:STDOUT: %.loc10_7.4: init %i32 = converted %.loc10_9, %int.convert_checked.loc10 [template = constants.%.41] // CHECK:STDOUT: assign %.loc10_4, %.loc10_7.4 // CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %c.var: ref %ForwardDeclared.1 = var c @@ -298,23 +298,23 @@ fn Run() { // CHECK:STDOUT: %c.ref.loc14: ref %ForwardDeclared.1 = name_ref c, %c // CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.46 [template = constants.%G] // CHECK:STDOUT: %.loc14_4: = bound_method %c.ref.loc14, %G.ref -// CHECK:STDOUT: %.loc14_3: %.38 = addr_of %c.ref.loc14 +// CHECK:STDOUT: %.loc14_3: %.42 = addr_of %c.ref.loc14 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc14_4(%.loc14_3) // CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] -// CHECK:STDOUT: %.loc16_25: type = ptr_type %ForwardDeclared.1 [template = constants.%.38] -// CHECK:STDOUT: %d.var: ref %.38 = var d -// CHECK:STDOUT: %d: ref %.38 = bind_name d, %d.var +// CHECK:STDOUT: %.loc16_25: type = ptr_type %ForwardDeclared.1 [template = constants.%.42] +// CHECK:STDOUT: %d.var: ref %.42 = var d +// CHECK:STDOUT: %d: ref %.42 = bind_name d, %d.var // CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %.loc16_29: %.38 = addr_of %c.ref.loc16 +// CHECK:STDOUT: %.loc16_29: %.42 = addr_of %c.ref.loc16 // CHECK:STDOUT: assign %d.var, %.loc16_29 // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%import_ref.4 [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc18: type = ptr_type %Incomplete [template = constants.%.39] -// CHECK:STDOUT: %e.var: ref %.39 = var e -// CHECK:STDOUT: %e: ref %.39 = bind_name e, %e.var +// CHECK:STDOUT: %.loc18: type = ptr_type %Incomplete [template = constants.%.43] +// CHECK:STDOUT: %e.var: ref %.43 = var e +// CHECK:STDOUT: %e: ref %.43 = bind_name e, %e.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared.1](); // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr .inst+437: %.38](); +// CHECK:STDOUT: fn @G[addr .inst+443: %.42](); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index c3663d2cd291..eee365fe8616 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -145,20 +145,20 @@ fn Run() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.34: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.37: = bound_method %.11, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %Base = struct_value (%.36, %.39) [template] +// CHECK:STDOUT: %.37: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.38: = bound_method %.10, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.41: = bound_method %.11, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.1: %Base = struct_value (%.40, %.43) [template] // CHECK:STDOUT: %struct.2: %Child = struct_value (%struct.1) [template] -// CHECK:STDOUT: %.40: type = unbound_element_type %Base, %i32 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.42: = bound_method %.41, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.44: type = unbound_element_type %Base, %i32 [template] +// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.14 [template] +// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.48: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -174,7 +174,7 @@ fn Run() { // CHECK:STDOUT: %import_ref.3 = import_ref Main//a, inst+4, unloaded // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Main//a, inst+10, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.5 = import_ref Main//a, inst+19, unloaded -// CHECK:STDOUT: %import_ref.6: %.40 = import_ref Main//a, inst+40, loaded [template = %.1] +// CHECK:STDOUT: %import_ref.6: %.44 = import_ref Main//a, inst+40, loaded [template = %.1] // CHECK:STDOUT: %import_ref.7 = import_ref Main//a, inst+45, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Main//a, inst+50, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//a, inst+54, unloaded @@ -218,37 +218,37 @@ fn Run() { // CHECK:STDOUT: %.loc7_46: Core.IntLiteral = int_value 1 [template = constants.%.11] // CHECK:STDOUT: %.loc7_47.1: %.12 = struct_literal (%.loc7_33, %.loc7_46) // CHECK:STDOUT: %.loc7_48.1: %.13 = struct_literal (%.loc7_47.1) -// CHECK:STDOUT: %.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_47.3: = bound_method %.loc7_33, %.loc7_47.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_47.4: = specific_function %.loc7_47.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %.loc7_47.4(%.loc7_33) [template = constants.%.36] -// CHECK:STDOUT: %.loc7_47.5: init %i32 = converted %.loc7_33, %int.convert_checked.loc7_47.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_47.3: = bound_method %.loc7_33, %.loc7_47.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc7_47.4: = specific_function %.loc7_47.3, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %.loc7_47.4(%.loc7_33) [template = constants.%.40] +// CHECK:STDOUT: %.loc7_47.5: init %i32 = converted %.loc7_33, %int.convert_checked.loc7_47.1 [template = constants.%.40] // CHECK:STDOUT: %.loc7_48.2: ref %Base = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc7_47.6: ref %i32 = class_element_access %.loc7_48.2, element0 -// CHECK:STDOUT: %.loc7_47.7: init %i32 = initialize_from %.loc7_47.5 to %.loc7_47.6 [template = constants.%.36] -// CHECK:STDOUT: %.loc7_47.8: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_47.9: = bound_method %.loc7_46, %.loc7_47.8 [template = constants.%.37] -// CHECK:STDOUT: %.loc7_47.10: = specific_function %.loc7_47.9, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %.loc7_47.10(%.loc7_46) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_47.11: init %i32 = converted %.loc7_46, %int.convert_checked.loc7_47.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_47.7: init %i32 = initialize_from %.loc7_47.5 to %.loc7_47.6 [template = constants.%.40] +// CHECK:STDOUT: %.loc7_47.8: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_47.9: = bound_method %.loc7_46, %.loc7_47.8 [template = constants.%.41] +// CHECK:STDOUT: %.loc7_47.10: = specific_function %.loc7_47.9, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %.loc7_47.10(%.loc7_46) [template = constants.%.43] +// CHECK:STDOUT: %.loc7_47.11: init %i32 = converted %.loc7_46, %int.convert_checked.loc7_47.2 [template = constants.%.43] // CHECK:STDOUT: %.loc7_47.12: ref %i32 = class_element_access %.loc7_48.2, element1 -// CHECK:STDOUT: %.loc7_47.13: init %i32 = initialize_from %.loc7_47.11 to %.loc7_47.12 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_47.13: init %i32 = initialize_from %.loc7_47.11 to %.loc7_47.12 [template = constants.%.43] // CHECK:STDOUT: %.loc7_47.14: init %Base = class_init (%.loc7_47.7, %.loc7_47.13), %.loc7_48.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_48.3: init %Base = converted %.loc7_47.1, %.loc7_47.14 [template = constants.%struct.1] // CHECK:STDOUT: %.loc7_48.4: init %Child = class_init (%.loc7_48.3), %a.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc7_49: init %Child = converted %.loc7_48.1, %.loc7_48.4 [template = constants.%struct.2] // CHECK:STDOUT: assign %a.var, %.loc7_49 // CHECK:STDOUT: %a.ref.loc8: ref %Child = name_ref a, %a -// CHECK:STDOUT: %x.ref: %.40 = name_ref x, imports.%import_ref.6 [template = imports.%.1] +// CHECK:STDOUT: %x.ref: %.44 = name_ref x, imports.%import_ref.6 [template = imports.%.1] // CHECK:STDOUT: %.loc8_4.1: ref %Base = class_element_access %a.ref.loc8, element0 // CHECK:STDOUT: %.loc8_4.2: ref %Base = converted %a.ref.loc8, %.loc8_4.1 // CHECK:STDOUT: %.loc8_4.3: ref %i32 = class_element_access %.loc8_4.2, element0 -// CHECK:STDOUT: %.loc8_9: Core.IntLiteral = int_value 2 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_7.1: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_7.2: = bound_method %.loc8_9, %.loc8_7.1 [template = constants.%.42] -// CHECK:STDOUT: %.loc8_7.3: = specific_function %.loc8_7.2, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_7.3(%.loc8_9) [template = constants.%.44] -// CHECK:STDOUT: %.loc8_7.4: init %i32 = converted %.loc8_9, %int.convert_checked.loc8 [template = constants.%.44] +// CHECK:STDOUT: %.loc8_9: Core.IntLiteral = int_value 2 [template = constants.%.45] +// CHECK:STDOUT: %.loc8_7.1: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_7.2: = bound_method %.loc8_9, %.loc8_7.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc8_7.3: = specific_function %.loc8_7.2, @Convert.2(constants.%.1) [template = constants.%.47] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_7.3(%.loc8_9) [template = constants.%.48] +// CHECK:STDOUT: %.loc8_7.4: init %i32 = converted %.loc8_9, %int.convert_checked.loc8 [template = constants.%.48] // CHECK:STDOUT: assign %.loc8_4.3, %.loc8_7.4 // CHECK:STDOUT: %a.ref.loc9: ref %Child = name_ref a, %a // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 63ebbd3d08ae..eaa60bb1f623 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -478,22 +478,22 @@ class B { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeProtectedFunction.type: type = fn_type @SomeProtectedFunction [template] // CHECK:STDOUT: %SomeProtectedFunction: %SomeProtectedFunction.type = struct_value () [template] -// CHECK:STDOUT: %.26: type = struct_type {} [template] -// CHECK:STDOUT: %.27: = complete_type_witness %.26 [template] +// CHECK:STDOUT: %.30: type = struct_type {} [template] +// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.29: type = unbound_element_type %B, %A [template] +// CHECK:STDOUT: %.33: type = unbound_element_type %B, %A [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %.30: type = struct_type {.base: %A} [template] -// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] +// CHECK:STDOUT: %.34: type = struct_type {.base: %A} [template] +// CHECK:STDOUT: %.35: = complete_type_witness %.34 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -522,12 +522,12 @@ class B { // CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed, %.loc5_32.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_38: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_39.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_39.2: = bound_method %.loc5_38, %.loc5_39.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_39.3: = specific_function %.loc5_39.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_39.3(%.loc5_38) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_39.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc5_39.5: %i32 = converted %.loc5_38, %.loc5_39.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_39.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_39.2: = bound_method %.loc5_38, %.loc5_39.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_39.3: = specific_function %.loc5_39.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_39.3(%.loc5_38) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_39.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc5_39.5: %i32 = converted %.loc5_38, %.loc5_39.4 [template = constants.%.29] // CHECK:STDOUT: %SOME_CONSTANT: %i32 = bind_name SOME_CONSTANT, %.loc5_39.5 // CHECK:STDOUT: %SomeProtectedFunction.decl: %SomeProtectedFunction.type = fn_decl @SomeProtectedFunction [template = constants.%SomeProtectedFunction] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -540,7 +540,7 @@ class B { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: = complete_type_witness %.26 [template = constants.%.27] +// CHECK:STDOUT: %.loc9: = complete_type_witness %.30 [template = constants.%.31] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -550,7 +550,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %.loc12: %.29 = base_decl %A, element0 [template] +// CHECK:STDOUT: %.loc12: %.33 = base_decl %A, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 @@ -573,7 +573,7 @@ class B { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.34 [template = constants.%.35] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -586,12 +586,12 @@ class B { // CHECK:STDOUT: fn @SomeProtectedFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc7_12: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_13.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_13.2: = bound_method %.loc7_12, %.loc7_13.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc7_13.3: = specific_function %.loc7_13.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_13.3(%.loc7_12) [template = constants.%.25] -// CHECK:STDOUT: %.loc7_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc7_13.5: %i32 = converted %.loc7_12, %.loc7_13.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc7_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_13.2: = bound_method %.loc7_12, %.loc7_13.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc7_13.3: = specific_function %.loc7_13.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_13.3(%.loc7_12) [template = constants.%.29] +// CHECK:STDOUT: %.loc7_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc7_13.5: %i32 = converted %.loc7_12, %.loc7_13.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc7_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -954,21 +954,21 @@ class B { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.26: type = struct_type {} [template] -// CHECK:STDOUT: %.27: = complete_type_witness %.26 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.30: type = struct_type {} [template] +// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] // CHECK:STDOUT: %Internal: type = class_type @Internal [template] // CHECK:STDOUT: %B: type = class_type @B [template] -// CHECK:STDOUT: %.29: type = unbound_element_type %B, %Internal [template] +// CHECK:STDOUT: %.33: type = unbound_element_type %B, %Internal [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %SomeFunc.type: type = fn_type @SomeFunc [template] // CHECK:STDOUT: %SomeFunc: %SomeFunc.type = struct_value () [template] -// CHECK:STDOUT: %.30: type = struct_type {.internal: %Internal} [template] -// CHECK:STDOUT: %.31: = complete_type_witness %.30 [template] +// CHECK:STDOUT: %.34: type = struct_type {.internal: %Internal} [template] +// CHECK:STDOUT: %.35: = complete_type_witness %.34 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -999,26 +999,26 @@ class B { // CHECK:STDOUT: %.loc5_42.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_42.3: type = converted %int.make_type_signed.loc5, %.loc5_42.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_48: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_49.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_49.2: = bound_method %.loc5_48, %.loc5_49.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_49.3: = specific_function %.loc5_49.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_49.3(%.loc5_48) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_49.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.25] -// CHECK:STDOUT: %.loc5_49.5: %i32 = converted %.loc5_48, %.loc5_49.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_49.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_49.2: = bound_method %.loc5_48, %.loc5_49.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_49.3: = specific_function %.loc5_49.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %.loc5_49.3(%.loc5_48) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_49.4: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_49.5: %i32 = converted %.loc5_48, %.loc5_49.4 [template = constants.%.29] // CHECK:STDOUT: %SOME_PROTECTED_CONSTANT: %i32 = bind_name SOME_PROTECTED_CONSTANT, %.loc5_49.5 // CHECK:STDOUT: %.loc6_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_38.1) [template = constants.%i32] // CHECK:STDOUT: %.loc6_38.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_38.3: type = converted %int.make_type_signed.loc6, %.loc6_38.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_44: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc6_45.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_45.2: = bound_method %.loc6_44, %.loc6_45.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc6_45.3: = specific_function %.loc6_45.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_45.3(%.loc6_44) [template = constants.%.25] -// CHECK:STDOUT: %.loc6_45.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_45.5: %i32 = converted %.loc6_44, %.loc6_45.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc6_45.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_45.2: = bound_method %.loc6_44, %.loc6_45.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_45.3: = specific_function %.loc6_45.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_45.3(%.loc6_44) [template = constants.%.29] +// CHECK:STDOUT: %.loc6_45.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_45.5: %i32 = converted %.loc6_44, %.loc6_45.4 [template = constants.%.29] // CHECK:STDOUT: %SOME_PRIVATE_CONSTANT: %i32 = bind_name SOME_PRIVATE_CONSTANT, %.loc6_45.5 -// CHECK:STDOUT: %.loc7: = complete_type_witness %.26 [template = constants.%.27] +// CHECK:STDOUT: %.loc7: = complete_type_witness %.30 [template = constants.%.31] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -1032,14 +1032,14 @@ class B { // CHECK:STDOUT: %.loc10_36.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc10_36.3: type = converted %int.make_type_signed, %.loc10_36.2 [template = constants.%i32] // CHECK:STDOUT: %.loc10_42: Core.IntLiteral = int_value 5 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_43.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_43.2: = bound_method %.loc10_42, %.loc10_43.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_43.3: = specific_function %.loc10_43.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_43.3(%.loc10_42) [template = constants.%.25] -// CHECK:STDOUT: %.loc10_43.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc10_43.5: %i32 = converted %.loc10_42, %.loc10_43.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc10_43.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_43.2: = bound_method %.loc10_42, %.loc10_43.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc10_43.3: = specific_function %.loc10_43.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_43.3(%.loc10_42) [template = constants.%.29] +// CHECK:STDOUT: %.loc10_43.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc10_43.5: %i32 = converted %.loc10_42, %.loc10_43.4 [template = constants.%.29] // CHECK:STDOUT: %INTERNAL_CONSTANT: %i32 = bind_name INTERNAL_CONSTANT, %.loc10_43.5 -// CHECK:STDOUT: %.loc11: = complete_type_witness %.26 [template = constants.%.27] +// CHECK:STDOUT: %.loc11: = complete_type_witness %.30 [template = constants.%.31] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Internal @@ -1048,7 +1048,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @B { // CHECK:STDOUT: %Internal.ref: type = name_ref Internal, file.%Internal.decl [template = constants.%Internal] -// CHECK:STDOUT: %.loc14: %.29 = field_decl internal, element0 [template] +// CHECK:STDOUT: %.loc14: %.33 = field_decl internal, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 @@ -1076,7 +1076,7 @@ class B { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc46: = complete_type_witness %.30 [template = constants.%.31] +// CHECK:STDOUT: %.loc46: = complete_type_witness %.34 [template = constants.%.35] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1097,7 +1097,7 @@ class B { // CHECK:STDOUT: fn @SomeFunc[%self.param_patt: %B]() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %B = name_ref self, %self -// CHECK:STDOUT: %internal.ref: %.29 = name_ref internal, @B.%.loc14 [template = @B.%.loc14] +// CHECK:STDOUT: %internal.ref: %.33 = name_ref internal, @B.%.loc14 [template = @B.%.loc14] // CHECK:STDOUT: %.loc44_16.1: ref %Internal = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc44_16.2: %Internal = bind_value %.loc44_16.1 // CHECK:STDOUT: %INTERNAL_CONSTANT.ref: = name_ref INTERNAL_CONSTANT, [template = ] diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 783456bc5bdc..1575a0dd8866 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -110,14 +110,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.32, %.35) [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.36, %.39) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -213,21 +213,21 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 1 [template = constants.%.7] // CHECK:STDOUT: %.loc13_26: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc13_27.1: %.9 = struct_literal (%.loc13_18, %.loc13_26) -// CHECK:STDOUT: %.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.3: = bound_method %.loc13_18, %.loc13_27.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_27.4: = specific_function %.loc13_27.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %.loc13_27.4(%.loc13_18) [template = constants.%.32] -// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted %.loc13_18, %int.convert_checked.loc13_27.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_27.3: = bound_method %.loc13_18, %.loc13_27.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_27.4: = specific_function %.loc13_27.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %.loc13_27.4(%.loc13_18) [template = constants.%.36] +// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted %.loc13_18, %int.convert_checked.loc13_27.1 [template = constants.%.36] // CHECK:STDOUT: %.loc13_27.6: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.6, element0 -// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.5 to %.loc13_27.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_27.9: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.10: = bound_method %.loc13_26, %.loc13_27.9 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_27.11: = specific_function %.loc13_27.10, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %.loc13_27.11(%.loc13_26) [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.12: init %i32 = converted %.loc13_26, %int.convert_checked.loc13_27.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.5 to %.loc13_27.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_27.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_27.10: = bound_method %.loc13_26, %.loc13_27.9 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_27.11: = specific_function %.loc13_27.10, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %.loc13_27.11(%.loc13_26) [template = constants.%.39] +// CHECK:STDOUT: %.loc13_27.12: init %i32 = converted %.loc13_26, %int.convert_checked.loc13_27.2 [template = constants.%.39] // CHECK:STDOUT: %.loc13_27.13: ref %i32 = class_element_access %.loc13_27.6, element1 -// CHECK:STDOUT: %.loc13_27.14: init %i32 = initialize_from %.loc13_27.12 to %.loc13_27.13 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_27.14: init %i32 = initialize_from %.loc13_27.12 to %.loc13_27.13 [template = constants.%.39] // CHECK:STDOUT: %.loc13_27.15: init %C = class_init (%.loc13_27.8, %.loc13_27.14), %.loc13_27.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_27.16: ref %C = temporary %.loc13_27.6, %.loc13_27.15 // CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.16 @@ -279,14 +279,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.32, %.35) [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.37: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.36, %.39) [template] // CHECK:STDOUT: %MakeC.type: type = fn_type @MakeC [template] // CHECK:STDOUT: %MakeC: %MakeC.type = struct_value () [template] // CHECK:STDOUT: %MakeAdaptC.type: type = fn_type @MakeAdaptC [template] @@ -382,21 +382,21 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 1 [template = constants.%.7] // CHECK:STDOUT: %.loc13_26: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc13_27.1: %.9 = struct_literal (%.loc13_18, %.loc13_26) -// CHECK:STDOUT: %.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.3: = bound_method %.loc13_18, %.loc13_27.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_27.4: = specific_function %.loc13_27.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %.loc13_27.4(%.loc13_18) [template = constants.%.32] -// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted %.loc13_18, %int.convert_checked.loc13_27.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_27.3: = bound_method %.loc13_18, %.loc13_27.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_27.4: = specific_function %.loc13_27.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %.loc13_27.4(%.loc13_18) [template = constants.%.36] +// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted %.loc13_18, %int.convert_checked.loc13_27.1 [template = constants.%.36] // CHECK:STDOUT: %.loc13_27.6: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.6, element0 -// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.5 to %.loc13_27.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_27.9: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_27.10: = bound_method %.loc13_26, %.loc13_27.9 [template = constants.%.33] -// CHECK:STDOUT: %.loc13_27.11: = specific_function %.loc13_27.10, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %.loc13_27.11(%.loc13_26) [template = constants.%.35] -// CHECK:STDOUT: %.loc13_27.12: init %i32 = converted %.loc13_26, %int.convert_checked.loc13_27.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_27.8: init %i32 = initialize_from %.loc13_27.5 to %.loc13_27.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_27.9: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_27.10: = bound_method %.loc13_26, %.loc13_27.9 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_27.11: = specific_function %.loc13_27.10, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %.loc13_27.11(%.loc13_26) [template = constants.%.39] +// CHECK:STDOUT: %.loc13_27.12: init %i32 = converted %.loc13_26, %int.convert_checked.loc13_27.2 [template = constants.%.39] // CHECK:STDOUT: %.loc13_27.13: ref %i32 = class_element_access %.loc13_27.6, element1 -// CHECK:STDOUT: %.loc13_27.14: init %i32 = initialize_from %.loc13_27.12 to %.loc13_27.13 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_27.14: init %i32 = initialize_from %.loc13_27.12 to %.loc13_27.13 [template = constants.%.39] // CHECK:STDOUT: %.loc13_27.15: init %C = class_init (%.loc13_27.8, %.loc13_27.14), %.loc13_27.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_27.16: ref %C = temporary %.loc13_27.6, %.loc13_27.15 // CHECK:STDOUT: %.loc13_28.1: ref %C = converted %.loc13_27.1, %.loc13_27.16 diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 33a948223d8a..e54e848c9235 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -36,14 +36,14 @@ fn F() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.31, %.34) [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.35, %.38) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,21 +101,21 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc17_25: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc17_26.1: %.7 = struct_literal (%.loc17_17, %.loc17_25) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_26.3: = bound_method %.loc17_17, %.loc17_26.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_26.4: = specific_function %.loc17_26.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc17_26.1: init %i32 = call %.loc17_26.4(%.loc17_17) [template = constants.%.31] -// CHECK:STDOUT: %.loc17_26.5: init %i32 = converted %.loc17_17, %int.convert_checked.loc17_26.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_26.3: = bound_method %.loc17_17, %.loc17_26.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_26.4: = specific_function %.loc17_26.3, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc17_26.1: init %i32 = call %.loc17_26.4(%.loc17_17) [template = constants.%.35] +// CHECK:STDOUT: %.loc17_26.5: init %i32 = converted %.loc17_17, %int.convert_checked.loc17_26.1 [template = constants.%.35] // CHECK:STDOUT: %.loc17_26.6: ref %Class = temporary_storage // CHECK:STDOUT: %.loc17_26.7: ref %i32 = class_element_access %.loc17_26.6, element0 -// CHECK:STDOUT: %.loc17_26.8: init %i32 = initialize_from %.loc17_26.5 to %.loc17_26.7 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_26.9: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_26.10: = bound_method %.loc17_25, %.loc17_26.9 [template = constants.%.32] -// CHECK:STDOUT: %.loc17_26.11: = specific_function %.loc17_26.10, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc17_26.2: init %i32 = call %.loc17_26.11(%.loc17_25) [template = constants.%.34] -// CHECK:STDOUT: %.loc17_26.12: init %i32 = converted %.loc17_25, %int.convert_checked.loc17_26.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_26.8: init %i32 = initialize_from %.loc17_26.5 to %.loc17_26.7 [template = constants.%.35] +// CHECK:STDOUT: %.loc17_26.9: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_26.10: = bound_method %.loc17_25, %.loc17_26.9 [template = constants.%.36] +// CHECK:STDOUT: %.loc17_26.11: = specific_function %.loc17_26.10, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc17_26.2: init %i32 = call %.loc17_26.11(%.loc17_25) [template = constants.%.38] +// CHECK:STDOUT: %.loc17_26.12: init %i32 = converted %.loc17_25, %int.convert_checked.loc17_26.2 [template = constants.%.38] // CHECK:STDOUT: %.loc17_26.13: ref %i32 = class_element_access %.loc17_26.6, element1 -// CHECK:STDOUT: %.loc17_26.14: init %i32 = initialize_from %.loc17_26.12 to %.loc17_26.13 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_26.14: init %i32 = initialize_from %.loc17_26.12 to %.loc17_26.13 [template = constants.%.38] // CHECK:STDOUT: %.loc17_26.15: init %Class = class_init (%.loc17_26.8, %.loc17_26.14), %.loc17_26.6 [template = constants.%struct] // CHECK:STDOUT: %.loc17_26.16: ref %Class = temporary %.loc17_26.6, %.loc17_26.15 // CHECK:STDOUT: %.loc17_28: ref %Class = converted %.loc17_26.1, %.loc17_26.16 diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 3361a3fb7e3a..4bd870492387 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -85,11 +85,11 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %Class = struct_value (%.31) [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %Class = struct_value (%.35) [template] // CHECK:STDOUT: %CallWithAddr.type: type = fn_type @CallWithAddr [template] // CHECK:STDOUT: %CallWithAddr: %CallWithAddr.type = struct_value () [template] // CHECK:STDOUT: %CallFThroughPointer.type: type = fn_type @CallFThroughPointer [template] @@ -355,14 +355,14 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %.loc35_17: Core.IntLiteral = int_value 1 [template = constants.%.7] // CHECK:STDOUT: %.loc35_18.1: %.8 = struct_literal (%.loc35_17) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %.loc35_18.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_18.3: = bound_method %.loc35_17, %.loc35_18.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc35_18.4: = specific_function %.loc35_18.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc35_18.4(%.loc35_17) [template = constants.%.31] -// CHECK:STDOUT: %.loc35_18.5: init %i32 = converted %.loc35_17, %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc35_18.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_18.3: = bound_method %.loc35_17, %.loc35_18.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc35_18.4: = specific_function %.loc35_18.3, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc35_18.4(%.loc35_17) [template = constants.%.35] +// CHECK:STDOUT: %.loc35_18.5: init %i32 = converted %.loc35_17, %int.convert_checked [template = constants.%.35] // CHECK:STDOUT: %.loc35_18.6: ref %Class = temporary_storage // CHECK:STDOUT: %.loc35_18.7: ref %i32 = class_element_access %.loc35_18.6, element0 -// CHECK:STDOUT: %.loc35_18.8: init %i32 = initialize_from %.loc35_18.5 to %.loc35_18.7 [template = constants.%.31] +// CHECK:STDOUT: %.loc35_18.8: init %i32 = initialize_from %.loc35_18.5 to %.loc35_18.7 [template = constants.%.35] // CHECK:STDOUT: %.loc35_18.9: init %Class = class_init (%.loc35_18.8), %.loc35_18.6 [template = constants.%struct] // CHECK:STDOUT: %.loc35_18.10: ref %Class = temporary %.loc35_18.6, %.loc35_18.9 // CHECK:STDOUT: %.loc35_20.1: ref %Class = converted %.loc35_18.1, %.loc35_18.10 diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index 1c56492877ba..22994849d5af 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -36,10 +36,10 @@ class Class { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -104,12 +104,12 @@ class Class { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc17_12: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc17_13.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_13.2: = bound_method %.loc17_12, %.loc17_13.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc17_13.3: = specific_function %.loc17_13.2, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_13.3(%.loc17_12) [template = constants.%.28] -// CHECK:STDOUT: %.loc17_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28] -// CHECK:STDOUT: %.loc17_13.5: %i32 = converted %.loc17_12, %.loc17_13.4 [template = constants.%.28] +// CHECK:STDOUT: %.loc17_13.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_13.2: = bound_method %.loc17_12, %.loc17_13.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc17_13.3: = specific_function %.loc17_13.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_13.3(%.loc17_12) [template = constants.%.32] +// CHECK:STDOUT: %.loc17_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc17_13.5: %i32 = converted %.loc17_12, %.loc17_13.4 [template = constants.%.32] // CHECK:STDOUT: return %.loc17_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 30712a778cac..12d7cb13b7d1 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -85,29 +85,29 @@ class A { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.36: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.37: = bound_method %.15, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.1: %A = struct_value (%.39) [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.42: type = struct_type {.b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.43: = bound_method %.41, %Convert.14 [template] -// CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.2: %B = struct_value (%.45) [template] -// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.48: type = struct_type {.c: Core.IntLiteral} [template] -// CHECK:STDOUT: %.49: = bound_method %.47, %Convert.14 [template] -// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.51: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.3: %C = struct_value (%.51) [template] -// CHECK:STDOUT: %.53: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.54: type = struct_type {.d: Core.IntLiteral} [template] -// CHECK:STDOUT: %.55: = bound_method %.53, %Convert.14 [template] -// CHECK:STDOUT: %.56: = specific_function %.55, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.57: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.4: %D = struct_value (%.57) [template] +// CHECK:STDOUT: %.40: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.41: = bound_method %.15, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.1: %A = struct_value (%.43) [template] +// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.46: type = struct_type {.b: Core.IntLiteral} [template] +// CHECK:STDOUT: %.47: = bound_method %.45, %Convert.14 [template] +// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.49: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct.2: %B = struct_value (%.49) [template] +// CHECK:STDOUT: %.51: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.52: type = struct_type {.c: Core.IntLiteral} [template] +// CHECK:STDOUT: %.53: = bound_method %.51, %Convert.14 [template] +// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.55: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct.3: %C = struct_value (%.55) [template] +// CHECK:STDOUT: %.57: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.58: type = struct_type {.d: Core.IntLiteral} [template] +// CHECK:STDOUT: %.59: = bound_method %.57, %Convert.14 [template] +// CHECK:STDOUT: %.60: = specific_function %.59, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.61: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct.4: %D = struct_value (%.61) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -209,58 +209,58 @@ class A { // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: %.loc29_24: Core.IntLiteral = int_value 1 [template = constants.%.15] // CHECK:STDOUT: %.loc29_25.1: %.16 = struct_literal (%.loc29_24) -// CHECK:STDOUT: %.loc29_25.2: %Convert.type.2 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_25.3: = bound_method %.loc29_24, %.loc29_25.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc29_25.4: = specific_function %.loc29_25.3, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_25.4(%.loc29_24) [template = constants.%.39] -// CHECK:STDOUT: %.loc29_25.5: init %i32 = converted %.loc29_24, %int.convert_checked.loc29 [template = constants.%.39] +// CHECK:STDOUT: %.loc29_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc29_25.3: = bound_method %.loc29_24, %.loc29_25.2 [template = constants.%.41] +// CHECK:STDOUT: %.loc29_25.4: = specific_function %.loc29_25.3, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_25.4(%.loc29_24) [template = constants.%.43] +// CHECK:STDOUT: %.loc29_25.5: init %i32 = converted %.loc29_24, %int.convert_checked.loc29 [template = constants.%.43] // CHECK:STDOUT: %.loc29_25.6: ref %i32 = class_element_access %a.var, element0 -// CHECK:STDOUT: %.loc29_25.7: init %i32 = initialize_from %.loc29_25.5 to %.loc29_25.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc29_25.7: init %i32 = initialize_from %.loc29_25.5 to %.loc29_25.6 [template = constants.%.43] // CHECK:STDOUT: %.loc29_25.8: init %A = class_init (%.loc29_25.7), %a.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc29_26: init %A = converted %.loc29_25.1, %.loc29_25.8 [template = constants.%struct.1] // CHECK:STDOUT: assign %a.var, %.loc29_26 // CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref %B = var b // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var -// CHECK:STDOUT: %.loc30_24: Core.IntLiteral = int_value 2 [template = constants.%.41] -// CHECK:STDOUT: %.loc30_25.1: %.42 = struct_literal (%.loc30_24) -// CHECK:STDOUT: %.loc30_25.2: %Convert.type.2 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc30_25.3: = bound_method %.loc30_24, %.loc30_25.2 [template = constants.%.43] -// CHECK:STDOUT: %.loc30_25.4: = specific_function %.loc30_25.3, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %.loc30_25.4(%.loc30_24) [template = constants.%.45] -// CHECK:STDOUT: %.loc30_25.5: init %i32 = converted %.loc30_24, %int.convert_checked.loc30 [template = constants.%.45] +// CHECK:STDOUT: %.loc30_24: Core.IntLiteral = int_value 2 [template = constants.%.45] +// CHECK:STDOUT: %.loc30_25.1: %.46 = struct_literal (%.loc30_24) +// CHECK:STDOUT: %.loc30_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc30_25.3: = bound_method %.loc30_24, %.loc30_25.2 [template = constants.%.47] +// CHECK:STDOUT: %.loc30_25.4: = specific_function %.loc30_25.3, @Convert.2(constants.%.1) [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %.loc30_25.4(%.loc30_24) [template = constants.%.49] +// CHECK:STDOUT: %.loc30_25.5: init %i32 = converted %.loc30_24, %int.convert_checked.loc30 [template = constants.%.49] // CHECK:STDOUT: %.loc30_25.6: ref %i32 = class_element_access %b.var, element0 -// CHECK:STDOUT: %.loc30_25.7: init %i32 = initialize_from %.loc30_25.5 to %.loc30_25.6 [template = constants.%.45] +// CHECK:STDOUT: %.loc30_25.7: init %i32 = initialize_from %.loc30_25.5 to %.loc30_25.6 [template = constants.%.49] // CHECK:STDOUT: %.loc30_25.8: init %B = class_init (%.loc30_25.7), %b.var [template = constants.%struct.2] // CHECK:STDOUT: %.loc30_26: init %B = converted %.loc30_25.1, %.loc30_25.8 [template = constants.%struct.2] // CHECK:STDOUT: assign %b.var, %.loc30_26 // CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc31_24: Core.IntLiteral = int_value 3 [template = constants.%.47] -// CHECK:STDOUT: %.loc31_25.1: %.48 = struct_literal (%.loc31_24) -// CHECK:STDOUT: %.loc31_25.2: %Convert.type.2 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc31_25.3: = bound_method %.loc31_24, %.loc31_25.2 [template = constants.%.49] -// CHECK:STDOUT: %.loc31_25.4: = specific_function %.loc31_25.3, @Convert.2(constants.%.1) [template = constants.%.50] -// CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %.loc31_25.4(%.loc31_24) [template = constants.%.51] -// CHECK:STDOUT: %.loc31_25.5: init %i32 = converted %.loc31_24, %int.convert_checked.loc31 [template = constants.%.51] +// CHECK:STDOUT: %.loc31_24: Core.IntLiteral = int_value 3 [template = constants.%.51] +// CHECK:STDOUT: %.loc31_25.1: %.52 = struct_literal (%.loc31_24) +// CHECK:STDOUT: %.loc31_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc31_25.3: = bound_method %.loc31_24, %.loc31_25.2 [template = constants.%.53] +// CHECK:STDOUT: %.loc31_25.4: = specific_function %.loc31_25.3, @Convert.2(constants.%.1) [template = constants.%.54] +// CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %.loc31_25.4(%.loc31_24) [template = constants.%.55] +// CHECK:STDOUT: %.loc31_25.5: init %i32 = converted %.loc31_24, %int.convert_checked.loc31 [template = constants.%.55] // CHECK:STDOUT: %.loc31_25.6: ref %i32 = class_element_access %c.var, element0 -// CHECK:STDOUT: %.loc31_25.7: init %i32 = initialize_from %.loc31_25.5 to %.loc31_25.6 [template = constants.%.51] +// CHECK:STDOUT: %.loc31_25.7: init %i32 = initialize_from %.loc31_25.5 to %.loc31_25.6 [template = constants.%.55] // CHECK:STDOUT: %.loc31_25.8: init %C = class_init (%.loc31_25.7), %c.var [template = constants.%struct.3] // CHECK:STDOUT: %.loc31_26: init %C = converted %.loc31_25.1, %.loc31_25.8 [template = constants.%struct.3] // CHECK:STDOUT: assign %c.var, %.loc31_26 // CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [template = constants.%D] // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var -// CHECK:STDOUT: %.loc32_24: Core.IntLiteral = int_value 4 [template = constants.%.53] -// CHECK:STDOUT: %.loc32_25.1: %.54 = struct_literal (%.loc32_24) -// CHECK:STDOUT: %.loc32_25.2: %Convert.type.2 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc32_25.3: = bound_method %.loc32_24, %.loc32_25.2 [template = constants.%.55] -// CHECK:STDOUT: %.loc32_25.4: = specific_function %.loc32_25.3, @Convert.2(constants.%.1) [template = constants.%.56] -// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_25.4(%.loc32_24) [template = constants.%.57] -// CHECK:STDOUT: %.loc32_25.5: init %i32 = converted %.loc32_24, %int.convert_checked.loc32 [template = constants.%.57] +// CHECK:STDOUT: %.loc32_24: Core.IntLiteral = int_value 4 [template = constants.%.57] +// CHECK:STDOUT: %.loc32_25.1: %.58 = struct_literal (%.loc32_24) +// CHECK:STDOUT: %.loc32_25.2: %Convert.type.2 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc32_25.3: = bound_method %.loc32_24, %.loc32_25.2 [template = constants.%.59] +// CHECK:STDOUT: %.loc32_25.4: = specific_function %.loc32_25.3, @Convert.2(constants.%.1) [template = constants.%.60] +// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_25.4(%.loc32_24) [template = constants.%.61] +// CHECK:STDOUT: %.loc32_25.5: init %i32 = converted %.loc32_24, %int.convert_checked.loc32 [template = constants.%.61] // CHECK:STDOUT: %.loc32_25.6: ref %i32 = class_element_access %d.var, element0 -// CHECK:STDOUT: %.loc32_25.7: init %i32 = initialize_from %.loc32_25.5 to %.loc32_25.6 [template = constants.%.57] +// CHECK:STDOUT: %.loc32_25.7: init %i32 = initialize_from %.loc32_25.5 to %.loc32_25.6 [template = constants.%.61] // CHECK:STDOUT: %.loc32_25.8: init %D = class_init (%.loc32_25.7), %d.var [template = constants.%struct.4] // CHECK:STDOUT: %.loc32_26: init %D = converted %.loc32_25.1, %.loc32_25.8 [template = constants.%struct.4] // CHECK:STDOUT: assign %d.var, %.loc32_26 diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 5f4e203d00e6..246a842e18e5 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -45,16 +45,16 @@ fn Run() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.29: = bound_method %.28, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.33: = bound_method %.32, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -125,12 +125,12 @@ fn Run() { // CHECK:STDOUT: fn @F.1() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.4] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.27] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.31] +// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.31] // CHECK:STDOUT: return %.loc13_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -145,13 +145,13 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc22_10: Core.IntLiteral = int_value 2 [template = constants.%.28] -// CHECK:STDOUT: %.loc22_11.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_11.2: = bound_method %.loc22_10, %.loc22_11.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc22_11.3: = specific_function %.loc22_11.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_11.3(%.loc22_10) [template = constants.%.31] -// CHECK:STDOUT: %.loc22_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc22_11.5: %i32 = converted %.loc22_10, %.loc22_11.4 [template = constants.%.31] +// CHECK:STDOUT: %.loc22_10: Core.IntLiteral = int_value 2 [template = constants.%.32] +// CHECK:STDOUT: %.loc22_11.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_11.2: = bound_method %.loc22_10, %.loc22_11.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc22_11.3: = specific_function %.loc22_11.2, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_11.3(%.loc22_10) [template = constants.%.35] +// CHECK:STDOUT: %.loc22_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.35] +// CHECK:STDOUT: %.loc22_11.5: %i32 = converted %.loc22_10, %.loc22_11.4 [template = constants.%.35] // CHECK:STDOUT: return %.loc22_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index 7375e785af5e..df488eee606a 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -184,8 +184,8 @@ class Class { // CHECK:STDOUT: %Class: type = class_type @Class [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.20: type = struct_type {} [template] -// CHECK:STDOUT: %.21: = complete_type_witness %.20 [template] +// CHECK:STDOUT: %.24: type = struct_type {} [template] +// CHECK:STDOUT: %.25: = complete_type_witness %.24 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -220,7 +220,7 @@ class Class { // CHECK:STDOUT: %return.param: ref = out_param runtime_param1 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: = complete_type_witness %.20 [template = constants.%.21] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.24 [template = constants.%.25] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index da466a408be9..31ba238a7d99 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -57,11 +57,11 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: type = ptr_type %Derived [template] +// CHECK:STDOUT: %.34: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.35: = bound_method %.10, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.38: type = ptr_type %Derived [template] // CHECK:STDOUT: %Call.type: type = fn_type @Call [template] // CHECK:STDOUT: %Call: %Call.type = struct_value () [template] // CHECK:STDOUT: } @@ -112,19 +112,19 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %self.loc26: %.7 = bind_name self, %self.param.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { -// CHECK:STDOUT: %p.patt: %.34 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.34 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.38 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.38 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.34] +// CHECK:STDOUT: %.loc30_19: type = ptr_type %Derived [template = constants.%.38] // CHECK:STDOUT: %.loc30_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc30_25.1) [template = constants.%i32] // CHECK:STDOUT: %.loc30_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc30_25.3: type = converted %int.make_type_signed, %.loc30_25.2 [template = constants.%i32] -// CHECK:STDOUT: %p.param: %.34 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.34 = bind_name p, %p.param +// CHECK:STDOUT: %p.param: %.38 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.38 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -198,28 +198,28 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %a.ref: %.2 = name_ref a, @Base.%.loc12_8 [template = @Base.%.loc12_8] // CHECK:STDOUT: %.loc27_10: ref %i32 = class_element_access %.loc27_4, element0 // CHECK:STDOUT: %.loc27_15: Core.IntLiteral = int_value 1 [template = constants.%.10] -// CHECK:STDOUT: %.loc27_13.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_13.2: = bound_method %.loc27_15, %.loc27_13.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc27_13.3: = specific_function %.loc27_13.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc27_13.3(%.loc27_15) [template = constants.%.33] -// CHECK:STDOUT: %.loc27_13.4: init %i32 = converted %.loc27_15, %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc27_13.1: %Convert.type.2 = interface_witness_access constants.%.34, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc27_13.2: = bound_method %.loc27_15, %.loc27_13.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc27_13.3: = specific_function %.loc27_13.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc27_13.3(%.loc27_15) [template = constants.%.37] +// CHECK:STDOUT: %.loc27_13.4: init %i32 = converted %.loc27_15, %int.convert_checked [template = constants.%.37] // CHECK:STDOUT: assign %.loc27_10, %.loc27_13.4 // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Call(%p.param_patt: %.34) -> %i32 { +// CHECK:STDOUT: fn @Call(%p.param_patt: %.38) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref.loc31: %.34 = name_ref p, %p +// CHECK:STDOUT: %p.ref.loc31: %.38 = name_ref p, %p // CHECK:STDOUT: %.loc31_4.1: ref %Derived = deref %p.ref.loc31 // CHECK:STDOUT: %AddrSelfBase.ref: %AddrSelfBase.type = name_ref AddrSelfBase, @Derived.%AddrSelfBase.decl [template = constants.%AddrSelfBase] // CHECK:STDOUT: %.loc31_7: = bound_method %.loc31_4.1, %AddrSelfBase.ref -// CHECK:STDOUT: %.loc31_4.2: %.34 = addr_of %.loc31_4.1 +// CHECK:STDOUT: %.loc31_4.2: %.38 = addr_of %.loc31_4.1 // CHECK:STDOUT: %.loc31_4.3: ref %Derived = deref %.loc31_4.2 // CHECK:STDOUT: %.loc31_4.4: ref %Base = class_element_access %.loc31_4.3, element0 // CHECK:STDOUT: %.loc31_4.5: %.7 = addr_of %.loc31_4.4 // CHECK:STDOUT: %.loc31_4.6: %.7 = converted %.loc31_4.2, %.loc31_4.5 // CHECK:STDOUT: %AddrSelfBase.call: init %empty_tuple.type = call %.loc31_7(%.loc31_4.6) -// CHECK:STDOUT: %p.ref.loc32: %.34 = name_ref p, %p +// CHECK:STDOUT: %p.ref.loc32: %.38 = name_ref p, %p // CHECK:STDOUT: %.loc32_11.1: ref %Derived = deref %p.ref.loc32 // CHECK:STDOUT: %SelfBase.ref: %SelfBase.type = name_ref SelfBase, @Derived.%SelfBase.decl [template = constants.%SelfBase] // CHECK:STDOUT: %.loc32_14: = bound_method %.loc32_11.1, %SelfBase.ref diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 09f09fe7998c..24a0ead008d4 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -46,11 +46,11 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 1000 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.27) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 1000 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.31) [template] // CHECK:STDOUT: %b: %C.3 = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt: %C.3 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] @@ -91,13 +91,13 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc3_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc3_14.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc3_14.2: = bound_method %.loc3_15, %.loc3_14.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc3_14.3: = specific_function %.loc3_14.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc3: init %i32 = call %.loc3_14.3(%.loc3_15) [template = constants.%.27] -// CHECK:STDOUT: %.loc3_14.4: %i32 = value_of_initializer %int.convert_checked.loc3 [template = constants.%.27] -// CHECK:STDOUT: %.loc3_14.5: %i32 = converted %.loc3_15, %.loc3_14.4 [template = constants.%.27] -// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.27) [template = constants.%C.3] +// CHECK:STDOUT: %.loc3_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc3_14.2: = bound_method %.loc3_15, %.loc3_14.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc3_14.3: = specific_function %.loc3_14.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc3: init %i32 = call %.loc3_14.3(%.loc3_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc3_14.4: %i32 = value_of_initializer %int.convert_checked.loc3 [template = constants.%.31] +// CHECK:STDOUT: %.loc3_14.5: %i32 = converted %.loc3_15, %.loc3_14.4 [template = constants.%.31] +// CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param.loc3: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param.loc3 [symbolic = %b.loc3_9.2 (constants.%b)] // CHECK:STDOUT: } @@ -107,13 +107,13 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc4: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc4_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_14.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_14.2: = bound_method %.loc4_15, %.loc4_14.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc4_14.3: = specific_function %.loc4_14.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_14.3(%.loc4_15) [template = constants.%.27] -// CHECK:STDOUT: %.loc4_14.4: %i32 = value_of_initializer %int.convert_checked.loc4 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_14.5: %i32 = converted %.loc4_15, %.loc4_14.4 [template = constants.%.27] -// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.27) [template = constants.%C.3] +// CHECK:STDOUT: %.loc4_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_14.2: = bound_method %.loc4_15, %.loc4_14.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_14.3: = specific_function %.loc4_14.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_14.3(%.loc4_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc4_14.4: %i32 = value_of_initializer %int.convert_checked.loc4 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_14.5: %i32 = converted %.loc4_15, %.loc4_14.4 [template = constants.%.31] +// CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param.loc4: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc4: %C.3 = bind_symbolic_name b, 0, %b.param.loc4 [symbolic = constants.%b] // CHECK:STDOUT: } @@ -152,9 +152,9 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.27) { -// CHECK:STDOUT: %a.loc2_9.2 => constants.%.27 -// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.27 +// CHECK:STDOUT: specific @C(constants.%.31) { +// CHECK:STDOUT: %a.loc2_9.2 => constants.%.31 +// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%b) { @@ -180,18 +180,18 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 1000 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.27) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 1000 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.31) [template] // CHECK:STDOUT: %b: %C.3 = bind_symbolic_name b, 0 [symbolic] // CHECK:STDOUT: %b.patt: %C.3 = symbolic_binding_pattern b, 0 [symbolic] // CHECK:STDOUT: %D.type: type = generic_class_type @D [template] // CHECK:STDOUT: %D.1: %D.type = struct_value () [template] // CHECK:STDOUT: %.type: type = generic_class_type @.1 [template] -// CHECK:STDOUT: %.28: %.type = struct_value () [template] -// CHECK:STDOUT: %.29: type = class_type @.1, @.1(%b) [symbolic] +// CHECK:STDOUT: %.32: %.type = struct_value () [template] +// CHECK:STDOUT: %.33: type = class_type @.1, @.1(%b) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -227,29 +227,29 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc3_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc3_14.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc3_14.2: = bound_method %.loc3_15, %.loc3_14.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc3_14.3: = specific_function %.loc3_14.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc3_14.3(%.loc3_15) [template = constants.%.27] -// CHECK:STDOUT: %.loc3_14.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc3_14.5: %i32 = converted %.loc3_15, %.loc3_14.4 [template = constants.%.27] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.27) [template = constants.%C.3] +// CHECK:STDOUT: %.loc3_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc3_14.2: = bound_method %.loc3_15, %.loc3_14.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc3_14.3: = specific_function %.loc3_14.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc3_14.3(%.loc3_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc3_14.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc3_14.5: %i32 = converted %.loc3_15, %.loc3_14.4 [template = constants.%.31] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc3_9.2 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.28] { +// CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.32] { // CHECK:STDOUT: %b.patt.loc10_9.1: %C.3 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C.3 = value_param_pattern %b.patt.loc10_9.1, runtime_param [symbolic = %b.patt.loc10_9.2 (constants.%b.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc10_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc10_14.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_14.2: = bound_method %.loc10_15, %.loc10_14.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc10_14.3: = specific_function %.loc10_14.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_14.3(%.loc10_15) [template = constants.%.27] -// CHECK:STDOUT: %.loc10_14.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc10_14.5: %i32 = converted %.loc10_15, %.loc10_14.4 [template = constants.%.27] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.27) [template = constants.%C.3] +// CHECK:STDOUT: %.loc10_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_14.2: = bound_method %.loc10_15, %.loc10_14.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_14.3: = specific_function %.loc10_14.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_14.3(%.loc10_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc10_14.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc10_14.5: %i32 = converted %.loc10_15, %.loc10_14.4 [template = constants.%.31] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc10_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_9.2 (constants.%b)] // CHECK:STDOUT: } @@ -286,7 +286,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc10_24: = complete_type_witness %.2 [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = constants.%.29 +// CHECK:STDOUT: .Self = constants.%.33 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,9 +295,9 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%a // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.27) { -// CHECK:STDOUT: %a.loc2_9.2 => constants.%.27 -// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.27 +// CHECK:STDOUT: specific @C(constants.%.31) { +// CHECK:STDOUT: %a.loc2_9.2 => constants.%.31 +// CHECK:STDOUT: %a.patt.loc2_9.2 => constants.%.31 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @D(constants.%b) { diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index f391eb1ad8e1..d2d21996e413 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -115,19 +115,19 @@ fn G() -> C { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.7) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.7) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.7) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.32: type = array_type %.3, %C [template] +// CHECK:STDOUT: %.36: type = array_type %.3, %C [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.32 = tuple_value (%struct, %struct, %struct) [template] -// CHECK:STDOUT: %.36: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %.36 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.40: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -194,12 +194,12 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a // CHECK:STDOUT: %.loc6_43.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc6_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_43.3: = bound_method %.loc6_43.1, %.loc6_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_43.4: = specific_function %.loc6_43.3, @Convert.2(constants.%.7) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_43.4(%.loc6_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_43.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] -// CHECK:STDOUT: %.loc6_43.6: %i32 = converted %.loc6_43.1, %.loc6_43.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_43.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_43.3: = bound_method %.loc6_43.1, %.loc6_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_43.4: = specific_function %.loc6_43.3, @Convert.2(constants.%.7) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_43.4(%.loc6_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc6_43.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.34] +// CHECK:STDOUT: %.loc6_43.6: %i32 = converted %.loc6_43.1, %.loc6_43.5 [template = constants.%.34] // CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref // CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43.6 // CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2 @@ -211,9 +211,9 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc9_14: Core.IntLiteral = int_value 3 [template = constants.%.3] -// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14, %C [template = constants.%.32] -// CHECK:STDOUT: %a.var: ref %.32 = var a -// CHECK:STDOUT: %a: ref %.32 = bind_name a, %a.var +// CHECK:STDOUT: %.loc9_15: type = array_type %.loc9_14, %C [template = constants.%.36] +// CHECK:STDOUT: %a.var: ref %.36 = var a +// CHECK:STDOUT: %a: ref %.36 = bind_name a, %a.var // CHECK:STDOUT: %.loc9_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc9_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc9_29.1: %.1 = struct_literal () @@ -222,22 +222,22 @@ fn G() -> C { // CHECK:STDOUT: %.loc9_30.3: ref %C = array_index %a.var, %.loc9_30.2 // CHECK:STDOUT: %.loc9_21.2: init %C = class_init (), %.loc9_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc9_30.4: init %C = converted %.loc9_21.1, %.loc9_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.5: Core.IntLiteral = int_value 1 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_30.5: Core.IntLiteral = int_value 1 [template = constants.%.38] // CHECK:STDOUT: %.loc9_30.6: ref %C = array_index %a.var, %.loc9_30.5 // CHECK:STDOUT: %.loc9_25.2: init %C = class_init (), %.loc9_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc9_30.7: init %C = converted %.loc9_25.1, %.loc9_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.8: Core.IntLiteral = int_value 2 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_30.8: Core.IntLiteral = int_value 2 [template = constants.%.39] // CHECK:STDOUT: %.loc9_30.9: ref %C = array_index %a.var, %.loc9_30.8 // CHECK:STDOUT: %.loc9_29.2: init %C = class_init (), %.loc9_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc9_30.10: init %C = converted %.loc9_29.1, %.loc9_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc9_30.11: init %.32 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc9_31: init %.32 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc9_30.11: init %.36 = array_init (%.loc9_30.4, %.loc9_30.7, %.loc9_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc9_31: init %.36 = converted %.loc9_30.1, %.loc9_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc9_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.32 = name_ref a, %a -// CHECK:STDOUT: %.loc10_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.36] +// CHECK:STDOUT: %a.ref: ref %.36 = name_ref a, %a +// CHECK:STDOUT: %.loc10_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.40] // CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc10_12: %.32 = bind_value %a.ref +// CHECK:STDOUT: %.loc10_12: %.36 = bind_value %a.ref // CHECK:STDOUT: %F.call: init %C = call %.loc10_10(%.loc10_12) to %.loc8_8.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } @@ -251,7 +251,7 @@ fn G() -> C { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_24.2 => constants.%.32 +// CHECK:STDOUT: %.loc6_24.2 => constants.%.36 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -271,22 +271,22 @@ fn G() -> C { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.3) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.21: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.22: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.23: = specific_function %.22, @Convert.4(%.3) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.23(%N.1) [symbolic] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %.26: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.4(%.3) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.26: type = array_type %.25, %C [template] +// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.30: type = array_type %.29, %C [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.26 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %.30 = tuple_value (%struct, %struct, %struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -321,9 +321,9 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed.loc10_10, %.loc10_10.2 [template = constants.%i32] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.21, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc10_22.2: = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.6 (constants.%.22)] -// CHECK:STDOUT: %.loc10_22.3: = specific_function %.loc10_22.2, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.23)] +// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %.loc10_22.2: = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.6 (constants.%.26)] +// CHECK:STDOUT: %.loc10_22.3: = specific_function %.loc10_22.2, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] // CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %.loc10_22.3(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.5: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.4 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] @@ -359,8 +359,8 @@ fn G() -> C { // CHECK:STDOUT: generic fn @F(%N.loc10_6.1: %i32) { // CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc10_22.6: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %.loc10_22.6 (constants.%.22)] -// CHECK:STDOUT: %.loc10_22.7: = specific_function %.loc10_22.6, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.23)] +// CHECK:STDOUT: %.loc10_22.6: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %.loc10_22.6 (constants.%.26)] +// CHECK:STDOUT: %.loc10_22.7: = specific_function %.loc10_22.6, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] // CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %.loc10_22.7(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -375,39 +375,39 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.26] -// CHECK:STDOUT: %a.var: ref %.26 = var a -// CHECK:STDOUT: %a: ref %.26 = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.30] +// CHECK:STDOUT: %a.var: ref %.30 = var a +// CHECK:STDOUT: %a: ref %.30 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.32] // CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2 // CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.33] // CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5 // CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.34] // CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8 // CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.26 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.26 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc13_30.11: init %.30 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %.30 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.26 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.30 = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1 -// CHECK:STDOUT: %.loc10_22.6 => constants.%.22 -// CHECK:STDOUT: %.loc10_22.7 => constants.%.23 +// CHECK:STDOUT: %.loc10_22.6 => constants.%.26 +// CHECK:STDOUT: %.loc10_22.7 => constants.%.27 // CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: @@ -428,22 +428,22 @@ fn G() -> C { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.3) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.21: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.22: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.23: = specific_function %.22, @Convert.4(%.3) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.23(%N.1) [symbolic] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %.26: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.4(%.3) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.26: type = array_type %.25, %C [template] +// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.30: type = array_type %.29, %C [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.26 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %.30 = tuple_value (%struct, %struct, %struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -480,9 +480,9 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_20.3: type = converted %int.make_type_signed, %.loc10_20.2 [template = constants.%i32] // CHECK:STDOUT: %T.ref.loc10_29: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc10_16.1 [symbolic = %N.loc10_16.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.21, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc10_32.2: = bound_method %N.ref, %.loc10_32.1 [symbolic = %.loc10_32.6 (constants.%.22)] -// CHECK:STDOUT: %.loc10_32.3: = specific_function %.loc10_32.2, @Convert.4(constants.%.3) [symbolic = %.loc10_32.7 (constants.%.23)] +// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %.loc10_32.2: = bound_method %N.ref, %.loc10_32.1 [symbolic = %.loc10_32.6 (constants.%.26)] +// CHECK:STDOUT: %.loc10_32.3: = specific_function %.loc10_32.2, @Convert.4(constants.%.3) [symbolic = %.loc10_32.7 (constants.%.27)] // CHECK:STDOUT: %int.convert_checked.loc10_32.1: init Core.IntLiteral = call %.loc10_32.3(%N.ref) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_32.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_32.5: Core.IntLiteral = converted %N.ref, %.loc10_32.4 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] @@ -519,8 +519,8 @@ fn G() -> C { // CHECK:STDOUT: %T.patt.loc10_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt)] // CHECK:STDOUT: %N.loc10_16.2: %i32 = bind_symbolic_name N, 1 [symbolic = %N.loc10_16.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc10_16.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc10_32.6: = bound_method %N.loc10_16.2, constants.%Convert.13 [symbolic = %.loc10_32.6 (constants.%.22)] -// CHECK:STDOUT: %.loc10_32.7: = specific_function %.loc10_32.6, @Convert.4(constants.%.3) [symbolic = %.loc10_32.7 (constants.%.23)] +// CHECK:STDOUT: %.loc10_32.6: = bound_method %N.loc10_16.2, constants.%Convert.13 [symbolic = %.loc10_32.6 (constants.%.26)] +// CHECK:STDOUT: %.loc10_32.7: = specific_function %.loc10_32.6, @Convert.4(constants.%.3) [symbolic = %.loc10_32.7 (constants.%.27)] // CHECK:STDOUT: %int.convert_checked.loc10_32.2: init Core.IntLiteral = call %.loc10_32.7(%N.loc10_16.2) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type, %N.param_patt: %i32](%a.param_patt: ) -> @F.%T.loc10_6.2 (%T); @@ -529,31 +529,31 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.26] -// CHECK:STDOUT: %a.var: ref %.26 = var a -// CHECK:STDOUT: %a: ref %.26 = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %C [template = constants.%.30] +// CHECK:STDOUT: %a.var: ref %.30 = var a +// CHECK:STDOUT: %a: ref %.30 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.32] // CHECK:STDOUT: %.loc13_30.3: ref %C = array_index %a.var, %.loc13_30.2 // CHECK:STDOUT: %.loc13_21.2: init %C = class_init (), %.loc13_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.4: init %C = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.33] // CHECK:STDOUT: %.loc13_30.6: ref %C = array_index %a.var, %.loc13_30.5 // CHECK:STDOUT: %.loc13_25.2: init %C = class_init (), %.loc13_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.7: init %C = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.34] // CHECK:STDOUT: %.loc13_30.9: ref %C = array_index %a.var, %.loc13_30.8 // CHECK:STDOUT: %.loc13_29.2: init %C = class_init (), %.loc13_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.10: init %C = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.26 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.26 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc13_30.11: init %.30 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %.30 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.26 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.30 = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -562,8 +562,8 @@ fn G() -> C { // CHECK:STDOUT: %T.patt.loc10_6.2 => constants.%T // CHECK:STDOUT: %N.loc10_16.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc10_16.2 => constants.%N.1 -// CHECK:STDOUT: %.loc10_32.6 => constants.%.22 -// CHECK:STDOUT: %.loc10_32.7 => constants.%.23 +// CHECK:STDOUT: %.loc10_32.6 => constants.%.26 +// CHECK:STDOUT: %.loc10_32.7 => constants.%.27 // CHECK:STDOUT: %int.convert_checked.loc10_32.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: @@ -585,20 +585,20 @@ fn G() -> C { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.7) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.7) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.7) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.33: type = array_type %.32, %C [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.37: type = array_type %.36, %C [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %array: %.33 = tuple_value (%struct, %struct, %struct) [template] -// CHECK:STDOUT: %.36: type = array_type %.3, %C [template] -// CHECK:STDOUT: %.37: = specific_function %F, @F(%C) [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array: %.37 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.40: type = array_type %.3, %C [template] +// CHECK:STDOUT: %.41: = specific_function %F, @F(%C) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -665,12 +665,12 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: @F.%.loc6_24.2 (%.4) = name_ref a, %a // CHECK:STDOUT: %.loc6_43.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc6_43.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_43.3: = bound_method %.loc6_43.1, %.loc6_43.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_43.4: = specific_function %.loc6_43.3, @Convert.2(constants.%.7) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_43.4(%.loc6_43.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_43.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] -// CHECK:STDOUT: %.loc6_43.6: %i32 = converted %.loc6_43.1, %.loc6_43.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_43.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_43.3: = bound_method %.loc6_43.1, %.loc6_43.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_43.4: = specific_function %.loc6_43.3, @Convert.2(constants.%.7) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc6_43.4(%.loc6_43.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc6_43.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.34] +// CHECK:STDOUT: %.loc6_43.6: %i32 = converted %.loc6_43.1, %.loc6_43.5 [template = constants.%.34] // CHECK:STDOUT: %.loc6_44.1: ref @F.%.loc6_24.2 (%.4) = value_as_ref %a.ref // CHECK:STDOUT: %.loc6_44.2: ref @F.%T.loc6_6.2 (%T) = array_index %.loc6_44.1, %.loc6_43.6 // CHECK:STDOUT: %.loc6_44.3: @F.%T.loc6_6.2 (%T) = bind_value %.loc6_44.2 @@ -681,10 +681,10 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 3 [template = constants.%.32] -// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14, %C [template = constants.%.33] -// CHECK:STDOUT: %a.var: ref %.33 = var a -// CHECK:STDOUT: %a: ref %.33 = bind_name a, %a.var +// CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 3 [template = constants.%.36] +// CHECK:STDOUT: %.loc10_15: type = array_type %.loc10_14, %C [template = constants.%.37] +// CHECK:STDOUT: %a.var: ref %.37 = var a +// CHECK:STDOUT: %a: ref %.37 = bind_name a, %a.var // CHECK:STDOUT: %.loc10_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc10_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc10_29.1: %.1 = struct_literal () @@ -693,7 +693,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_30.3: ref %C = array_index %a.var, %.loc10_30.2 // CHECK:STDOUT: %.loc10_21.2: init %C = class_init (), %.loc10_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc10_30.4: init %C = converted %.loc10_21.1, %.loc10_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.5: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc10_30.5: Core.IntLiteral = int_value 1 [template = constants.%.39] // CHECK:STDOUT: %.loc10_30.6: ref %C = array_index %a.var, %.loc10_30.5 // CHECK:STDOUT: %.loc10_25.2: init %C = class_init (), %.loc10_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc10_30.7: init %C = converted %.loc10_25.1, %.loc10_25.2 [template = constants.%struct] @@ -701,14 +701,14 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_30.9: ref %C = array_index %a.var, %.loc10_30.8 // CHECK:STDOUT: %.loc10_29.2: init %C = class_init (), %.loc10_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc10_30.10: init %C = converted %.loc10_29.1, %.loc10_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc10_30.11: init %.33 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc10_31: init %.33 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc10_30.11: init %.37 = array_init (%.loc10_30.4, %.loc10_30.7, %.loc10_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc10_31: init %.37 = converted %.loc10_30.1, %.loc10_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc10_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.33 = name_ref a, %a -// CHECK:STDOUT: %.loc21_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.37] +// CHECK:STDOUT: %a.ref: ref %.37 = name_ref a, %a +// CHECK:STDOUT: %.loc21_10: = specific_function %F.ref, @F(constants.%C) [template = constants.%.41] // CHECK:STDOUT: %.loc8_8.2: ref %C = splice_block %return {} -// CHECK:STDOUT: %.loc21_12: %.36 = converted %a.ref, [template = ] +// CHECK:STDOUT: %.loc21_12: %.40 = converted %a.ref, [template = ] // CHECK:STDOUT: %F.call: init %C = call %.loc21_10() to %.loc8_8.2 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } @@ -722,7 +722,7 @@ fn G() -> C { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc6_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc6_6.2 => constants.%C -// CHECK:STDOUT: %.loc6_24.2 => constants.%.36 +// CHECK:STDOUT: %.loc6_24.2 => constants.%.40 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -743,22 +743,22 @@ fn G() -> C { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.3) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.21: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.22: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.23: = specific_function %.22, @Convert.4(%.3) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.23(%N.1) [symbolic] +// CHECK:STDOUT: %.25: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %.26: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.4(%.3) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.27(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.26: type = array_type %.25, %D [template] +// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.30: type = array_type %.29, %D [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (%.1, %.1, %.1) [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %struct: %D = struct_value () [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %array: %.26 = tuple_value (%struct, %struct, %struct) [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %array: %.30 = tuple_value (%struct, %struct, %struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -795,9 +795,9 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_10.3: type = converted %int.make_type_signed.loc10_10, %.loc10_10.2 [template = constants.%i32] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.1)] -// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.21, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc10_22.2: = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.6 (constants.%.22)] -// CHECK:STDOUT: %.loc10_22.3: = specific_function %.loc10_22.2, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.23)] +// CHECK:STDOUT: %.loc10_22.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %.loc10_22.2: = bound_method %N.ref.loc10_22, %.loc10_22.1 [symbolic = %.loc10_22.6 (constants.%.26)] +// CHECK:STDOUT: %.loc10_22.3: = specific_function %.loc10_22.2, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] // CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %.loc10_22.3(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc10_22.5: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.4 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] @@ -840,8 +840,8 @@ fn G() -> C { // CHECK:STDOUT: generic fn @F(%N.loc10_6.1: %i32) { // CHECK:STDOUT: %N.loc10_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc10_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc10_22.6: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %.loc10_22.6 (constants.%.22)] -// CHECK:STDOUT: %.loc10_22.7: = specific_function %.loc10_22.6, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.23)] +// CHECK:STDOUT: %.loc10_22.6: = bound_method %N.loc10_6.2, constants.%Convert.13 [symbolic = %.loc10_22.6 (constants.%.26)] +// CHECK:STDOUT: %.loc10_22.7: = specific_function %.loc10_22.6, @Convert.4(constants.%.3) [symbolic = %.loc10_22.7 (constants.%.27)] // CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %.loc10_22.7(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -856,39 +856,39 @@ fn G() -> C { // CHECK:STDOUT: fn @G() -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %D [template = constants.%.26] -// CHECK:STDOUT: %a.var: ref %.26 = var a -// CHECK:STDOUT: %a: ref %.26 = bind_name a, %a.var +// CHECK:STDOUT: %.loc13_14: Core.IntLiteral = int_value 3 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_15: type = array_type %.loc13_14, %D [template = constants.%.30] +// CHECK:STDOUT: %a.var: ref %.30 = var a +// CHECK:STDOUT: %a: ref %.30 = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_25.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_29.1: %.1 = struct_literal () // CHECK:STDOUT: %.loc13_30.1: %tuple.type = tuple_literal (%.loc13_21.1, %.loc13_25.1, %.loc13_29.1) -// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_30.2: Core.IntLiteral = int_value 0 [template = constants.%.32] // CHECK:STDOUT: %.loc13_30.3: ref %D = array_index %a.var, %.loc13_30.2 // CHECK:STDOUT: %.loc13_21.2: init %D = class_init (), %.loc13_30.3 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.4: init %D = converted %.loc13_21.1, %.loc13_21.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_30.5: Core.IntLiteral = int_value 1 [template = constants.%.33] // CHECK:STDOUT: %.loc13_30.6: ref %D = array_index %a.var, %.loc13_30.5 // CHECK:STDOUT: %.loc13_25.2: init %D = class_init (), %.loc13_30.6 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.7: init %D = converted %.loc13_25.1, %.loc13_25.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_30.8: Core.IntLiteral = int_value 2 [template = constants.%.34] // CHECK:STDOUT: %.loc13_30.9: ref %D = array_index %a.var, %.loc13_30.8 // CHECK:STDOUT: %.loc13_29.2: init %D = class_init (), %.loc13_30.9 [template = constants.%struct] // CHECK:STDOUT: %.loc13_30.10: init %D = converted %.loc13_29.1, %.loc13_29.2 [template = constants.%struct] -// CHECK:STDOUT: %.loc13_30.11: init %.26 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] -// CHECK:STDOUT: %.loc13_31: init %.26 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] +// CHECK:STDOUT: %.loc13_30.11: init %.30 = array_init (%.loc13_30.4, %.loc13_30.7, %.loc13_30.10) to %a.var [template = constants.%array] +// CHECK:STDOUT: %.loc13_31: init %.30 = converted %.loc13_30.1, %.loc13_30.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_31 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %a.ref: ref %.26 = name_ref a, %a +// CHECK:STDOUT: %a.ref: ref %.30 = name_ref a, %a // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc10_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc10_6.2 => constants.%N.1 -// CHECK:STDOUT: %.loc10_22.6 => constants.%.22 -// CHECK:STDOUT: %.loc10_22.7 => constants.%.23 +// CHECK:STDOUT: %.loc10_22.6 => constants.%.26 +// CHECK:STDOUT: %.loc10_22.7 => constants.%.27 // CHECK:STDOUT: %int.convert_checked.loc10_22.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index d44f76b660ff..4e7c8d50077c 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -733,13 +733,13 @@ fn G() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 0 [template] -// CHECK:STDOUT: %WithNontype.3: type = class_type @WithNontype, @WithNontype(%.28) [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] +// CHECK:STDOUT: %WithNontype.3: type = class_type @WithNontype, @WithNontype(%.32) [template] // CHECK:STDOUT: %struct: %WithNontype.3 = struct_value () [template] -// CHECK:STDOUT: %.29: = specific_function %F, @F(%.28) [template] +// CHECK:STDOUT: %.33: = specific_function %F, @F(%.32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -843,18 +843,18 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %.2 = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.1] // CHECK:STDOUT: %.loc9_30: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_29.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_29.2: = bound_method %.loc9_30, %.loc9_29.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc9_29.3: = specific_function %.loc9_29.2, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_29.3(%.loc9_30) [template = constants.%.28] -// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28] -// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %.loc9_30, %.loc9_29.4 [template = constants.%.28] -// CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%.28) [template = constants.%WithNontype.3] +// CHECK:STDOUT: %.loc9_29.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_29.2: = bound_method %.loc9_30, %.loc9_29.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_29.3: = specific_function %.loc9_29.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_29.3(%.loc9_30) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %.loc9_30, %.loc9_29.4 [template = constants.%.32] +// CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%.32) [template = constants.%WithNontype.3] // CHECK:STDOUT: %.loc9_13.2: ref %WithNontype.3 = temporary_storage // CHECK:STDOUT: %.loc9_13.3: init %WithNontype.3 = class_init (), %.loc9_13.2 [template = constants.%struct] // CHECK:STDOUT: %.loc9_13.4: ref %WithNontype.3 = temporary %.loc9_13.2, %.loc9_13.3 // CHECK:STDOUT: %.loc9_15.1: ref %WithNontype.3 = converted %.loc9_13.1, %.loc9_13.4 -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.28) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.32) [template = constants.%.33] // CHECK:STDOUT: %.loc9_15.2: %WithNontype.3 = bind_value %.loc9_15.1 // CHECK:STDOUT: %F.call: init %i32 = call %.loc9_10(%.loc9_15.2) // CHECK:STDOUT: %.loc9_33.1: %i32 = value_of_initializer %F.call @@ -880,16 +880,16 @@ fn G() -> i32 { // CHECK:STDOUT: %WithNontype.loc6_29.2 => constants.%WithNontype.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @WithNontype(constants.%.28) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%.28 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.28 +// CHECK:STDOUT: specific @WithNontype(constants.%.32) { +// CHECK:STDOUT: %N.loc4_19.2 => constants.%.32 +// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.28) { -// CHECK:STDOUT: %N.loc6_6.2 => constants.%.28 -// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%.28 +// CHECK:STDOUT: specific @F(constants.%.32) { +// CHECK:STDOUT: %N.loc6_6.2 => constants.%.32 +// CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%.32 // CHECK:STDOUT: %WithNontype.loc6_29.2 => constants.%WithNontype.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 22486f46b731..2e46895795fd 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -240,18 +240,18 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%.30, %.33) [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%.34, %.37) [template] // CHECK:STDOUT: %HasPair.4: type = class_type @HasPair, @HasPair(%tuple.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.34: = specific_function %F, @F(%.30, %.33) [template] +// CHECK:STDOUT: %.38: = specific_function %F, @F(%.34, %.37) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -336,18 +336,18 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %.loc8_18: Core.IntLiteral = int_value 1 [template = constants.%.6] // CHECK:STDOUT: %.loc8_21: Core.IntLiteral = int_value 2 [template = constants.%.7] // CHECK:STDOUT: %.loc8_22.1: %tuple.type.3 = tuple_literal (%.loc8_18, %.loc8_21) -// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_18, %.loc8_22.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %.loc8_22.4(%.loc8_18) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_18, %.loc8_22.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_22.7: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_22.8: = bound_method %.loc8_21, %.loc8_22.7 [template = constants.%.31] -// CHECK:STDOUT: %.loc8_22.9: = specific_function %.loc8_22.8, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %.loc8_22.9(%.loc8_21) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_22.10: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_22.11: %i32 = converted %.loc8_21, %.loc8_22.10 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_22.3: = bound_method %.loc8_18, %.loc8_22.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc8_22.4: = specific_function %.loc8_22.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %.loc8_22.4(%.loc8_18) [template = constants.%.34] +// CHECK:STDOUT: %.loc8_22.5: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_22.6: %i32 = converted %.loc8_18, %.loc8_22.5 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_22.7: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_22.8: = bound_method %.loc8_21, %.loc8_22.7 [template = constants.%.35] +// CHECK:STDOUT: %.loc8_22.9: = specific_function %.loc8_22.8, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %.loc8_22.9(%.loc8_21) [template = constants.%.37] +// CHECK:STDOUT: %.loc8_22.10: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_22.11: %i32 = converted %.loc8_21, %.loc8_22.10 [template = constants.%.37] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_22.6, %.loc8_22.11) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc8_16: %tuple.type.2 = converted %.loc8_22.1, %tuple [template = constants.%tuple.2] // CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.4] @@ -397,7 +397,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %h.ref: %HasPair.4 = name_ref h, %h -// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.30, constants.%.33) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.34, constants.%.37) [template = constants.%.38] // CHECK:STDOUT: %F.call: init %i32 = call %.loc9_10(%h.ref) // CHECK:STDOUT: %.loc9_14.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc9_14.2: %i32 = converted %F.call, %.loc9_14.1 @@ -437,11 +437,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F(constants.%.30, constants.%.33) { -// CHECK:STDOUT: %A.loc6_6.2 => constants.%.30 -// CHECK:STDOUT: %A.patt.loc6_6.2 => constants.%.30 -// CHECK:STDOUT: %B.loc6_15.2 => constants.%.33 -// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%.33 +// CHECK:STDOUT: specific @F(constants.%.34, constants.%.37) { +// CHECK:STDOUT: %A.loc6_6.2 => constants.%.34 +// CHECK:STDOUT: %A.patt.loc6_6.2 => constants.%.34 +// CHECK:STDOUT: %B.loc6_15.2 => constants.%.37 +// CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%.37 // CHECK:STDOUT: %tuple.loc6_40.2 => constants.%tuple.2 // CHECK:STDOUT: %HasPair.loc6_34.2 => constants.%HasPair.4 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index 723dc83eae0e..150e75011af6 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -31,37 +31,37 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.34: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template] -// CHECK:STDOUT: %.35: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template] -// CHECK:STDOUT: %.37: = bound_method %.33, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct.1: %.35 = struct_value (%.30, %.27, %.39) [template] -// CHECK:STDOUT: %struct.2: %.31 = struct_value (%.27, %.30, %.39) [template] -// CHECK:STDOUT: %.40: type = array_type %.3, %i32 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template] +// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.38: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template] +// CHECK:STDOUT: %.39: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template] +// CHECK:STDOUT: %.41: = bound_method %.37, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct.1: %.39 = struct_value (%.34, %.31, %.43) [template] +// CHECK:STDOUT: %struct.2: %.35 = struct_value (%.31, %.34, %.43) [template] +// CHECK:STDOUT: %.44: type = array_type %.3, %i32 [template] +// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.44: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %.47: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %.49: Core.IntLiteral = int_value 9 [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.5 = tuple_value (%.43, %.44, %.3, %.45) [template] -// CHECK:STDOUT: %.47: = bound_method %.42, %Convert.14 [template] -// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.49: %i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.40 = tuple_value (%.49) [template] -// CHECK:STDOUT: %.50: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct.3: %.50 = struct_value (%.33, %.3) [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.5 = tuple_value (%.47, %.48, %.3, %.49) [template] +// CHECK:STDOUT: %.51: = bound_method %.46, %Convert.14 [template] +// CHECK:STDOUT: %.52: = specific_function %.51, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.53: %i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.44 = tuple_value (%.53) [template] +// CHECK:STDOUT: %.54: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct.3: %.54 = struct_value (%.37, %.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -106,25 +106,25 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int.make_type_signed.loc13_41: init type = call constants.%Int(%.loc13_41.1) [template = constants.%i32] // CHECK:STDOUT: %.loc13_41.2: type = value_of_initializer %int.make_type_signed.loc13_41 [template = constants.%i32] // CHECK:STDOUT: %.loc13_41.3: type = converted %int.make_type_signed.loc13_41, %.loc13_41.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_44: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%.31] -// CHECK:STDOUT: %struct_copy.var: ref %.31 = var struct_copy -// CHECK:STDOUT: %struct_copy: ref %.31 = bind_name struct_copy, %struct_copy.var +// CHECK:STDOUT: %.loc13_44: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%.35] +// CHECK:STDOUT: %struct_copy.var: ref %.35 = var struct_copy +// CHECK:STDOUT: %struct_copy: ref %.35 = bind_name struct_copy, %struct_copy.var // CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_19.1) [template = constants.%i32] // CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc15_19.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_19.3: type = converted %int.make_type_signed.loc15, %.loc15_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_25: type = array_type %.loc15_24, %i32 [template = constants.%.40] -// CHECK:STDOUT: %tuple_index.var: ref %.40 = var tuple_index -// CHECK:STDOUT: %tuple_index: ref %.40 = bind_name tuple_index, %tuple_index.var +// CHECK:STDOUT: %.loc15_25: type = array_type %.loc15_24, %i32 [template = constants.%.44] +// CHECK:STDOUT: %tuple_index.var: ref %.44 = var tuple_index +// CHECK:STDOUT: %tuple_index: ref %.44 = bind_name tuple_index, %tuple_index.var // CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_21.1) [template = constants.%i32] // CHECK:STDOUT: %.loc17_26: Core.IntLiteral = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] // CHECK:STDOUT: %.loc17_21.3: type = converted %int.make_type_signed.loc17, %.loc17_21.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_27: type = array_type %.loc17_26, %i32 [template = constants.%.40] -// CHECK:STDOUT: %struct_access.var: ref %.40 = var struct_access -// CHECK:STDOUT: %struct_access: ref %.40 = bind_name struct_access, %struct_access.var +// CHECK:STDOUT: %.loc17_27: type = array_type %.loc17_26, %i32 [template = constants.%.44] +// CHECK:STDOUT: %struct_access.var: ref %.44 = var struct_access +// CHECK:STDOUT: %struct_access: ref %.44 = bind_name struct_access, %struct_access.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -142,33 +142,33 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc11_49.4: type = value_of_initializer %int.make_type_signed.loc11_46 [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.5: type = converted %int.make_type_signed.loc11_46, %.loc11_49.4 [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.6: type = converted %.loc11_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_35.3: = bound_method %.loc11_31, %.loc11_35.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_35.4: = specific_function %.loc11_35.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %.loc11_35.4(%.loc11_31) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_35.5: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_35.6: %i32 = converted %.loc11_31, %.loc11_35.5 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_35.7: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_35.8: = bound_method %.loc11_34, %.loc11_35.7 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_35.9: = specific_function %.loc11_35.8, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %.loc11_35.9(%.loc11_34) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_35.10: %i32 = value_of_initializer %int.convert_checked.loc11_35.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_35.11: %i32 = converted %.loc11_34, %.loc11_35.10 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_35.3: = bound_method %.loc11_31, %.loc11_35.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_35.4: = specific_function %.loc11_35.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %.loc11_35.4(%.loc11_31) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_35.5: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_35.6: %i32 = converted %.loc11_31, %.loc11_35.5 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_35.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_35.8: = bound_method %.loc11_34, %.loc11_35.7 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_35.9: = specific_function %.loc11_35.8, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %.loc11_35.9(%.loc11_34) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_35.10: %i32 = value_of_initializer %int.convert_checked.loc11_35.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_35.11: %i32 = converted %.loc11_34, %.loc11_35.10 [template = constants.%.34] // CHECK:STDOUT: %tuple.loc11: %tuple.type.2 = tuple_value (%.loc11_35.6, %.loc11_35.11) [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_37.1: %tuple.type.2 = converted %.loc11_35.1, %tuple.loc11 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_37.2: %i32 = tuple_access %.loc11_37.1, element0 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_37.2: %i32 = tuple_access %.loc11_37.1, element0 [template = constants.%.31] // CHECK:STDOUT: %.loc11_37.3: ref %i32 = tuple_access file.%tuple_copy.var, element0 -// CHECK:STDOUT: %.loc11_37.4: init %i32 = initialize_from %.loc11_37.2 to %.loc11_37.3 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_37.5: %i32 = tuple_access %.loc11_37.1, element1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_37.4: init %i32 = initialize_from %.loc11_37.2 to %.loc11_37.3 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_37.5: %i32 = tuple_access %.loc11_37.1, element1 [template = constants.%.34] // CHECK:STDOUT: %.loc11_37.6: ref %i32 = tuple_access file.%tuple_copy.var, element1 -// CHECK:STDOUT: %.loc11_37.7: init %i32 = initialize_from %.loc11_37.5 to %.loc11_37.6 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_37.7: init %i32 = initialize_from %.loc11_37.5 to %.loc11_37.6 [template = constants.%.34] // CHECK:STDOUT: %.loc11_37.8: init %tuple.type.2 = tuple_init (%.loc11_37.4, %.loc11_37.7) to file.%tuple_copy.var [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_50: init %tuple.type.2 = converted %.loc11_37.1, %.loc11_37.8 [template = constants.%tuple.1] // CHECK:STDOUT: assign file.%tuple_copy.var, %.loc11_50 -// CHECK:STDOUT: %.loc13_54: Core.IntLiteral = int_value 3 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_54: Core.IntLiteral = int_value 3 [template = constants.%.37] // CHECK:STDOUT: %.loc13_62: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %.loc13_70: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_71.1: %.34 = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) +// CHECK:STDOUT: %.loc13_71.1: %.38 = struct_literal (%.loc13_54, %.loc13_62, %.loc13_70) // CHECK:STDOUT: %.loc13_81.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc13_81: init type = call constants.%Int(%.loc13_81.1) [template = constants.%i32] // CHECK:STDOUT: %.loc13_81.2: type = value_of_initializer %int.make_type_signed.loc13_81 [template = constants.%i32] @@ -181,47 +181,47 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int.make_type_signed.loc13_99: init type = call constants.%Int(%.loc13_99.1) [template = constants.%i32] // CHECK:STDOUT: %.loc13_99.2: type = value_of_initializer %int.make_type_signed.loc13_99 [template = constants.%i32] // CHECK:STDOUT: %.loc13_99.3: type = converted %int.make_type_signed.loc13_99, %.loc13_99.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_102: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%.35] -// CHECK:STDOUT: %.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_71.3: = bound_method %.loc13_62, %.loc13_71.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_71.4: = specific_function %.loc13_71.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %.loc13_71.4(%.loc13_62) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_71.5: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_71.6: %i32 = converted %.loc13_62, %.loc13_71.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_71.7: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_71.8: = bound_method %.loc13_70, %.loc13_71.7 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_71.9: = specific_function %.loc13_71.8, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %.loc13_71.9(%.loc13_70) [template = constants.%.27] -// CHECK:STDOUT: %.loc13_71.10: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_71.11: %i32 = converted %.loc13_70, %.loc13_71.10 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_71.12: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_71.13: = bound_method %.loc13_54, %.loc13_71.12 [template = constants.%.37] -// CHECK:STDOUT: %.loc13_71.14: = specific_function %.loc13_71.13, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %.loc13_71.14(%.loc13_54) [template = constants.%.39] -// CHECK:STDOUT: %.loc13_71.15: %i32 = value_of_initializer %int.convert_checked.loc13_71.3 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_71.16: %i32 = converted %.loc13_54, %.loc13_71.15 [template = constants.%.39] -// CHECK:STDOUT: %struct.loc13: %.35 = struct_value (%.loc13_71.6, %.loc13_71.11, %.loc13_71.16) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.1: %.35 = converted %.loc13_71.1, %struct.loc13 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc13_73.2: %i32 = struct_access %.loc13_73.1, element1 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_102: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%.39] +// CHECK:STDOUT: %.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_71.3: = bound_method %.loc13_62, %.loc13_71.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc13_71.4: = specific_function %.loc13_71.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %.loc13_71.4(%.loc13_62) [template = constants.%.34] +// CHECK:STDOUT: %.loc13_71.5: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_71.6: %i32 = converted %.loc13_62, %.loc13_71.5 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_71.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_71.8: = bound_method %.loc13_70, %.loc13_71.7 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_71.9: = specific_function %.loc13_71.8, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %.loc13_71.9(%.loc13_70) [template = constants.%.31] +// CHECK:STDOUT: %.loc13_71.10: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_71.11: %i32 = converted %.loc13_70, %.loc13_71.10 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_71.12: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_71.13: = bound_method %.loc13_54, %.loc13_71.12 [template = constants.%.41] +// CHECK:STDOUT: %.loc13_71.14: = specific_function %.loc13_71.13, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %.loc13_71.14(%.loc13_54) [template = constants.%.43] +// CHECK:STDOUT: %.loc13_71.15: %i32 = value_of_initializer %int.convert_checked.loc13_71.3 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_71.16: %i32 = converted %.loc13_54, %.loc13_71.15 [template = constants.%.43] +// CHECK:STDOUT: %struct.loc13: %.39 = struct_value (%.loc13_71.6, %.loc13_71.11, %.loc13_71.16) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.1: %.39 = converted %.loc13_71.1, %struct.loc13 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc13_73.2: %i32 = struct_access %.loc13_73.1, element1 [template = constants.%.31] // CHECK:STDOUT: %.loc13_73.3: ref %i32 = struct_access file.%struct_copy.var, element1 -// CHECK:STDOUT: %.loc13_73.4: init %i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_73.5: %i32 = struct_access %.loc13_73.1, element0 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_73.4: init %i32 = initialize_from %.loc13_73.2 to %.loc13_73.3 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_73.5: %i32 = struct_access %.loc13_73.1, element0 [template = constants.%.34] // CHECK:STDOUT: %.loc13_73.6: ref %i32 = struct_access file.%struct_copy.var, element0 -// CHECK:STDOUT: %.loc13_73.7: init %i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_73.8: %i32 = struct_access %.loc13_73.1, element2 [template = constants.%.39] +// CHECK:STDOUT: %.loc13_73.7: init %i32 = initialize_from %.loc13_73.5 to %.loc13_73.6 [template = constants.%.34] +// CHECK:STDOUT: %.loc13_73.8: %i32 = struct_access %.loc13_73.1, element2 [template = constants.%.43] // CHECK:STDOUT: %.loc13_73.9: ref %i32 = struct_access file.%struct_copy.var, element2 -// CHECK:STDOUT: %.loc13_73.10: init %i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%.39] -// CHECK:STDOUT: %.loc13_73.11: init %.31 = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.2] -// CHECK:STDOUT: %.loc13_103: init %.31 = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_73.10: init %i32 = initialize_from %.loc13_73.8 to %.loc13_73.9 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_73.11: init %.35 = struct_init (%.loc13_73.4, %.loc13_73.7, %.loc13_73.10) to file.%struct_copy.var [template = constants.%struct.2] +// CHECK:STDOUT: %.loc13_103: init %.35 = converted %.loc13_73.1, %.loc13_73.11 [template = constants.%struct.2] // CHECK:STDOUT: assign file.%struct_copy.var, %.loc13_103 -// CHECK:STDOUT: %.loc15_30: Core.IntLiteral = int_value 0 [template = constants.%.42] +// CHECK:STDOUT: %.loc15_30: Core.IntLiteral = int_value 0 [template = constants.%.46] // CHECK:STDOUT: %.loc15_32.1: %tuple.type.4 = tuple_literal (%.loc15_30) // CHECK:STDOUT: %.loc15_38.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_38.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_44: Core.IntLiteral = int_value 5 [template = constants.%.43] -// CHECK:STDOUT: %.loc15_47: Core.IntLiteral = int_value 7 [template = constants.%.44] +// CHECK:STDOUT: %.loc15_44: Core.IntLiteral = int_value 5 [template = constants.%.47] +// CHECK:STDOUT: %.loc15_47: Core.IntLiteral = int_value 7 [template = constants.%.48] // CHECK:STDOUT: %.loc15_50: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_53: Core.IntLiteral = int_value 9 [template = constants.%.45] +// CHECK:STDOUT: %.loc15_53: Core.IntLiteral = int_value 9 [template = constants.%.49] // CHECK:STDOUT: %.loc15_54.1: %tuple.type.5 = tuple_literal (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) // CHECK:STDOUT: %.loc15_56: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %tuple.loc15: %tuple.type.5 = tuple_value (%.loc15_44, %.loc15_47, %.loc15_50, %.loc15_53) [template = constants.%tuple.2] @@ -229,43 +229,43 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc15_55: Core.IntLiteral = tuple_access %.loc15_54.2, element2 [template = constants.%.3] // CHECK:STDOUT: %.loc15_38.2: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_38.3: type = converted %int.make_type_signed.loc15, %.loc15_38.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_57: type = array_type %.loc15_55, %i32 [template = constants.%.40] -// CHECK:STDOUT: %.loc15_32.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_32.3: = bound_method %.loc15_30, %.loc15_32.2 [template = constants.%.47] -// CHECK:STDOUT: %.loc15_32.4: = specific_function %.loc15_32.3, @Convert.2(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_32.4(%.loc15_30) [template = constants.%.49] -// CHECK:STDOUT: %.loc15_32.5: init %i32 = converted %.loc15_30, %int.convert_checked.loc15 [template = constants.%.49] -// CHECK:STDOUT: %.loc15_5: ref %.40 = splice_block file.%tuple_index.var {} -// CHECK:STDOUT: %.loc15_32.6: Core.IntLiteral = int_value 0 [template = constants.%.42] +// CHECK:STDOUT: %.loc15_57: type = array_type %.loc15_55, %i32 [template = constants.%.44] +// CHECK:STDOUT: %.loc15_32.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_32.3: = bound_method %.loc15_30, %.loc15_32.2 [template = constants.%.51] +// CHECK:STDOUT: %.loc15_32.4: = specific_function %.loc15_32.3, @Convert.2(constants.%.1) [template = constants.%.52] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_32.4(%.loc15_30) [template = constants.%.53] +// CHECK:STDOUT: %.loc15_32.5: init %i32 = converted %.loc15_30, %int.convert_checked.loc15 [template = constants.%.53] +// CHECK:STDOUT: %.loc15_5: ref %.44 = splice_block file.%tuple_index.var {} +// CHECK:STDOUT: %.loc15_32.6: Core.IntLiteral = int_value 0 [template = constants.%.46] // CHECK:STDOUT: %.loc15_32.7: ref %i32 = array_index %.loc15_5, %.loc15_32.6 -// CHECK:STDOUT: %.loc15_32.8: init %i32 = initialize_from %.loc15_32.5 to %.loc15_32.7 [template = constants.%.49] -// CHECK:STDOUT: %.loc15_32.9: init %.40 = array_init (%.loc15_32.8) to %.loc15_5 [template = constants.%array] -// CHECK:STDOUT: %.loc15_34: init %.40 = converted %.loc15_32.1, %.loc15_32.9 [template = constants.%array] +// CHECK:STDOUT: %.loc15_32.8: init %i32 = initialize_from %.loc15_32.5 to %.loc15_32.7 [template = constants.%.53] +// CHECK:STDOUT: %.loc15_32.9: init %.44 = array_init (%.loc15_32.8) to %.loc15_5 [template = constants.%array] +// CHECK:STDOUT: %.loc15_34: init %.44 = converted %.loc15_32.1, %.loc15_32.9 [template = constants.%array] // CHECK:STDOUT: assign file.%tuple_index.var, %.loc15_34 -// CHECK:STDOUT: %.loc17_32: Core.IntLiteral = int_value 0 [template = constants.%.42] +// CHECK:STDOUT: %.loc17_32: Core.IntLiteral = int_value 0 [template = constants.%.46] // CHECK:STDOUT: %.loc17_34.1: %tuple.type.4 = tuple_literal (%.loc17_32) // CHECK:STDOUT: %.loc17_40.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_40.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_51: Core.IntLiteral = int_value 3 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_51: Core.IntLiteral = int_value 3 [template = constants.%.37] // CHECK:STDOUT: %.loc17_59: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc17_60.1: %.50 = struct_literal (%.loc17_51, %.loc17_59) -// CHECK:STDOUT: %struct.loc17: %.50 = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] -// CHECK:STDOUT: %.loc17_60.2: %.50 = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_60.1: %.54 = struct_literal (%.loc17_51, %.loc17_59) +// CHECK:STDOUT: %struct.loc17: %.54 = struct_value (%.loc17_51, %.loc17_59) [template = constants.%struct.3] +// CHECK:STDOUT: %.loc17_60.2: %.54 = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] // CHECK:STDOUT: %.loc17_61: Core.IntLiteral = struct_access %.loc17_60.2, element1 [template = constants.%.3] // CHECK:STDOUT: %.loc17_40.2: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] // CHECK:STDOUT: %.loc17_40.3: type = converted %int.make_type_signed.loc17, %.loc17_40.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_63: type = array_type %.loc17_61, %i32 [template = constants.%.40] -// CHECK:STDOUT: %.loc17_34.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_34.3: = bound_method %.loc17_32, %.loc17_34.2 [template = constants.%.47] -// CHECK:STDOUT: %.loc17_34.4: = specific_function %.loc17_34.3, @Convert.2(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_34.4(%.loc17_32) [template = constants.%.49] -// CHECK:STDOUT: %.loc17_34.5: init %i32 = converted %.loc17_32, %int.convert_checked.loc17 [template = constants.%.49] -// CHECK:STDOUT: %.loc17_5: ref %.40 = splice_block file.%struct_access.var {} -// CHECK:STDOUT: %.loc17_34.6: Core.IntLiteral = int_value 0 [template = constants.%.42] +// CHECK:STDOUT: %.loc17_63: type = array_type %.loc17_61, %i32 [template = constants.%.44] +// CHECK:STDOUT: %.loc17_34.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_34.3: = bound_method %.loc17_32, %.loc17_34.2 [template = constants.%.51] +// CHECK:STDOUT: %.loc17_34.4: = specific_function %.loc17_34.3, @Convert.2(constants.%.1) [template = constants.%.52] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_34.4(%.loc17_32) [template = constants.%.53] +// CHECK:STDOUT: %.loc17_34.5: init %i32 = converted %.loc17_32, %int.convert_checked.loc17 [template = constants.%.53] +// CHECK:STDOUT: %.loc17_5: ref %.44 = splice_block file.%struct_access.var {} +// CHECK:STDOUT: %.loc17_34.6: Core.IntLiteral = int_value 0 [template = constants.%.46] // CHECK:STDOUT: %.loc17_34.7: ref %i32 = array_index %.loc17_5, %.loc17_34.6 -// CHECK:STDOUT: %.loc17_34.8: init %i32 = initialize_from %.loc17_34.5 to %.loc17_34.7 [template = constants.%.49] -// CHECK:STDOUT: %.loc17_34.9: init %.40 = array_init (%.loc17_34.8) to %.loc17_5 [template = constants.%array] -// CHECK:STDOUT: %.loc17_36: init %.40 = converted %.loc17_34.1, %.loc17_34.9 [template = constants.%array] +// CHECK:STDOUT: %.loc17_34.8: init %i32 = initialize_from %.loc17_34.5 to %.loc17_34.7 [template = constants.%.53] +// CHECK:STDOUT: %.loc17_34.9: init %.44 = array_init (%.loc17_34.8) to %.loc17_5 [template = constants.%array] +// CHECK:STDOUT: %.loc17_36: init %.44 = converted %.loc17_34.1, %.loc17_34.9 [template = constants.%array] // CHECK:STDOUT: assign file.%struct_access.var, %.loc17_36 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 09b84cd94dfc..08e6e5db92c2 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -35,25 +35,25 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.35: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 7 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.39: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.36: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.39: = bound_method %.7, %Convert.14 [template] // CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.43: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.41: %i32 = int_value 7 [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.43: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.44: = specific_function %.43, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.45: %i32 = int_value 9 [template] -// CHECK:STDOUT: %array: %.10 = tuple_value (%.34, %.37, %.41, %.45) [template] -// CHECK:STDOUT: %.46: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.45: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.47: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.48: = specific_function %.47, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.49: %i32 = int_value 9 [template] +// CHECK:STDOUT: %array: %.10 = tuple_value (%.38, %.41, %.45, %.49) [template] +// CHECK:STDOUT: %.50: = bound_method %.42, %Convert.14 [template] +// CHECK:STDOUT: %.51: = specific_function %.50, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.52: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -98,49 +98,49 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %.loc16_61.2: type = value_of_initializer %int.make_type_signed.loc16_61 [template = constants.%i32] // CHECK:STDOUT: %.loc16_61.3: type = converted %int.make_type_signed.loc16_61, %.loc16_61.2 [template = constants.%i32] // CHECK:STDOUT: %.loc16_67: type = array_type %.loc16_66, %i32 [template = constants.%.10] -// CHECK:STDOUT: %.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.3: = bound_method %.loc16_45, %.loc16_55.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_55.4: = specific_function %.loc16_55.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc16_55.1: init %i32 = call %.loc16_55.4(%.loc16_45) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_55.5: init %i32 = converted %.loc16_45, %int.convert_checked.loc16_55.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_55.3: = bound_method %.loc16_45, %.loc16_55.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc16_55.4: = specific_function %.loc16_55.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc16_55.1: init %i32 = call %.loc16_55.4(%.loc16_45) [template = constants.%.38] +// CHECK:STDOUT: %.loc16_55.5: init %i32 = converted %.loc16_45, %int.convert_checked.loc16_55.1 [template = constants.%.38] // CHECK:STDOUT: %.loc16_55.6: ref %.10 = temporary_storage // CHECK:STDOUT: %.loc16_55.7: Core.IntLiteral = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc16_55.8: ref %i32 = array_index %.loc16_55.6, %.loc16_55.7 -// CHECK:STDOUT: %.loc16_55.9: init %i32 = initialize_from %.loc16_55.5 to %.loc16_55.8 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_55.10: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.11: = bound_method %.loc16_48, %.loc16_55.10 [template = constants.%.35] -// CHECK:STDOUT: %.loc16_55.12: = specific_function %.loc16_55.11, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc16_55.2: init %i32 = call %.loc16_55.12(%.loc16_48) [template = constants.%.37] -// CHECK:STDOUT: %.loc16_55.13: init %i32 = converted %.loc16_48, %int.convert_checked.loc16_55.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc16_55.9: init %i32 = initialize_from %.loc16_55.5 to %.loc16_55.8 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_55.10: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_55.11: = bound_method %.loc16_48, %.loc16_55.10 [template = constants.%.39] +// CHECK:STDOUT: %.loc16_55.12: = specific_function %.loc16_55.11, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc16_55.2: init %i32 = call %.loc16_55.12(%.loc16_48) [template = constants.%.41] +// CHECK:STDOUT: %.loc16_55.13: init %i32 = converted %.loc16_48, %int.convert_checked.loc16_55.2 [template = constants.%.41] // CHECK:STDOUT: %.loc16_55.14: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc16_55.15: ref %i32 = array_index %.loc16_55.6, %.loc16_55.14 -// CHECK:STDOUT: %.loc16_55.16: init %i32 = initialize_from %.loc16_55.13 to %.loc16_55.15 [template = constants.%.37] -// CHECK:STDOUT: %.loc16_55.17: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.18: = bound_method %.loc16_51, %.loc16_55.17 [template = constants.%.39] -// CHECK:STDOUT: %.loc16_55.19: = specific_function %.loc16_55.18, @Convert.2(constants.%.1) [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc16_55.3: init %i32 = call %.loc16_55.19(%.loc16_51) [template = constants.%.41] -// CHECK:STDOUT: %.loc16_55.20: init %i32 = converted %.loc16_51, %int.convert_checked.loc16_55.3 [template = constants.%.41] -// CHECK:STDOUT: %.loc16_55.21: Core.IntLiteral = int_value 2 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_55.16: init %i32 = initialize_from %.loc16_55.13 to %.loc16_55.15 [template = constants.%.41] +// CHECK:STDOUT: %.loc16_55.17: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_55.18: = bound_method %.loc16_51, %.loc16_55.17 [template = constants.%.43] +// CHECK:STDOUT: %.loc16_55.19: = specific_function %.loc16_55.18, @Convert.2(constants.%.1) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc16_55.3: init %i32 = call %.loc16_55.19(%.loc16_51) [template = constants.%.45] +// CHECK:STDOUT: %.loc16_55.20: init %i32 = converted %.loc16_51, %int.convert_checked.loc16_55.3 [template = constants.%.45] +// CHECK:STDOUT: %.loc16_55.21: Core.IntLiteral = int_value 2 [template = constants.%.42] // CHECK:STDOUT: %.loc16_55.22: ref %i32 = array_index %.loc16_55.6, %.loc16_55.21 -// CHECK:STDOUT: %.loc16_55.23: init %i32 = initialize_from %.loc16_55.20 to %.loc16_55.22 [template = constants.%.41] -// CHECK:STDOUT: %.loc16_55.24: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_55.25: = bound_method %.loc16_54, %.loc16_55.24 [template = constants.%.43] -// CHECK:STDOUT: %.loc16_55.26: = specific_function %.loc16_55.25, @Convert.2(constants.%.1) [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc16_55.4: init %i32 = call %.loc16_55.26(%.loc16_54) [template = constants.%.45] -// CHECK:STDOUT: %.loc16_55.27: init %i32 = converted %.loc16_54, %int.convert_checked.loc16_55.4 [template = constants.%.45] -// CHECK:STDOUT: %.loc16_55.28: Core.IntLiteral = int_value 3 [template = constants.%.42] +// CHECK:STDOUT: %.loc16_55.23: init %i32 = initialize_from %.loc16_55.20 to %.loc16_55.22 [template = constants.%.45] +// CHECK:STDOUT: %.loc16_55.24: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_55.25: = bound_method %.loc16_54, %.loc16_55.24 [template = constants.%.47] +// CHECK:STDOUT: %.loc16_55.26: = specific_function %.loc16_55.25, @Convert.2(constants.%.1) [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc16_55.4: init %i32 = call %.loc16_55.26(%.loc16_54) [template = constants.%.49] +// CHECK:STDOUT: %.loc16_55.27: init %i32 = converted %.loc16_54, %int.convert_checked.loc16_55.4 [template = constants.%.49] +// CHECK:STDOUT: %.loc16_55.28: Core.IntLiteral = int_value 3 [template = constants.%.46] // CHECK:STDOUT: %.loc16_55.29: ref %i32 = array_index %.loc16_55.6, %.loc16_55.28 -// CHECK:STDOUT: %.loc16_55.30: init %i32 = initialize_from %.loc16_55.27 to %.loc16_55.29 [template = constants.%.45] +// CHECK:STDOUT: %.loc16_55.30: init %i32 = initialize_from %.loc16_55.27 to %.loc16_55.29 [template = constants.%.49] // CHECK:STDOUT: %.loc16_55.31: init %.10 = array_init (%.loc16_55.9, %.loc16_55.16, %.loc16_55.23, %.loc16_55.30) to %.loc16_55.6 [template = constants.%array] // CHECK:STDOUT: %.loc16_57.1: init %.10 = converted %.loc16_55.1, %.loc16_55.31 [template = constants.%array] -// CHECK:STDOUT: %.loc16_70.1: Core.IntLiteral = int_value 2 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_70.1: Core.IntLiteral = int_value 2 [template = constants.%.42] // CHECK:STDOUT: %.loc16_57.2: ref %.10 = temporary %.loc16_55.6, %.loc16_57.1 -// CHECK:STDOUT: %.loc16_70.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_70.3: = bound_method %.loc16_70.1, %.loc16_70.2 [template = constants.%.46] -// CHECK:STDOUT: %.loc16_70.4: = specific_function %.loc16_70.3, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc16_70: init %i32 = call %.loc16_70.4(%.loc16_70.1) [template = constants.%.48] -// CHECK:STDOUT: %.loc16_70.5: %i32 = value_of_initializer %int.convert_checked.loc16_70 [template = constants.%.48] -// CHECK:STDOUT: %.loc16_70.6: %i32 = converted %.loc16_70.1, %.loc16_70.5 [template = constants.%.48] +// CHECK:STDOUT: %.loc16_70.2: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_70.3: = bound_method %.loc16_70.1, %.loc16_70.2 [template = constants.%.50] +// CHECK:STDOUT: %.loc16_70.4: = specific_function %.loc16_70.3, @Convert.2(constants.%.1) [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked.loc16_70: init %i32 = call %.loc16_70.4(%.loc16_70.1) [template = constants.%.52] +// CHECK:STDOUT: %.loc16_70.5: %i32 = value_of_initializer %int.convert_checked.loc16_70 [template = constants.%.52] +// CHECK:STDOUT: %.loc16_70.6: %i32 = converted %.loc16_70.1, %.loc16_70.5 [template = constants.%.52] // CHECK:STDOUT: %.loc16_71.1: ref %i32 = array_index %.loc16_57.2, %.loc16_70.6 // CHECK:STDOUT: %.loc16_71.2: %i32 = bind_value %.loc16_71.1 // CHECK:STDOUT: %.loc16_38.2: type = value_of_initializer %int.make_type_signed.loc16_38 [template = constants.%i32] diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 0483c2980069..0f8be69cfe8e 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -30,10 +30,10 @@ fn G(N:! i32) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.19: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.20: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.21: = specific_function %.20, @Convert.4(%.1) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.21(%N.1) [symbolic] +// CHECK:STDOUT: %.23: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %.24: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.4(%.1) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.25(%N.1) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,8 +69,8 @@ fn G(N:! i32) { // CHECK:STDOUT: %N.patt.loc12_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc16_16.6: = bound_method %N.loc12_6.2, constants.%Convert.13 [symbolic = %.loc16_16.6 (constants.%.20)] -// CHECK:STDOUT: %.loc16_16.7: = specific_function %.loc16_16.6, @Convert.4(constants.%.1) [symbolic = %.loc16_16.7 (constants.%.21)] +// CHECK:STDOUT: %.loc16_16.6: = bound_method %N.loc12_6.2, constants.%Convert.13 [symbolic = %.loc16_16.6 (constants.%.24)] +// CHECK:STDOUT: %.loc16_16.7: = specific_function %.loc16_16.6, @Convert.4(constants.%.1) [symbolic = %.loc16_16.7 (constants.%.25)] // CHECK:STDOUT: %int.convert_checked.loc16_16.2: init Core.IntLiteral = call %.loc16_16.7(%N.loc12_6.2) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: %i32) { @@ -80,9 +80,9 @@ fn G(N:! i32) { // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.1 [symbolic = %N.loc12_6.2 (constants.%N.1)] // CHECK:STDOUT: %.loc16_11.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] // CHECK:STDOUT: %.loc16_11.3: type = converted %int.make_type_signed.loc16, %.loc16_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_16.1: %Convert.type.2 = interface_witness_access constants.%.19, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc16_16.2: = bound_method %N.ref, %.loc16_16.1 [symbolic = %.loc16_16.6 (constants.%.20)] -// CHECK:STDOUT: %.loc16_16.3: = specific_function %.loc16_16.2, @Convert.4(constants.%.1) [symbolic = %.loc16_16.7 (constants.%.21)] +// CHECK:STDOUT: %.loc16_16.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %.loc16_16.2: = bound_method %N.ref, %.loc16_16.1 [symbolic = %.loc16_16.6 (constants.%.24)] +// CHECK:STDOUT: %.loc16_16.3: = specific_function %.loc16_16.2, @Convert.4(constants.%.1) [symbolic = %.loc16_16.7 (constants.%.25)] // CHECK:STDOUT: %int.convert_checked.loc16_16.1: init Core.IntLiteral = call %.loc16_16.3(%N.ref) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc16_16.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc16_16.5: Core.IntLiteral = converted %N.ref, %.loc16_16.4 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 3e0f0e3d3768..5a565eb51558 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -27,21 +27,21 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.31: = interface_witness (%Convert.15) [template] -// CHECK:STDOUT: %.32: = bound_method %.30, %Convert.15 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.4(%.1) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.35: type = array_type %.34, %i32 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.15) [template] +// CHECK:STDOUT: %.36: = bound_method %.34, %Convert.15 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.4(%.1) [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.39: type = array_type %.38, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,32 +92,32 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add] // CHECK:STDOUT: %.loc13_20.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc13_23.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_20.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_20.3: = bound_method %.loc13_20.1, %.loc13_20.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_20.4: = specific_function %.loc13_20.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %.loc13_20.4(%.loc13_20.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_20.5: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_20.6: %i32 = converted %.loc13_20.1, %.loc13_20.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_23.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_23.3: = bound_method %.loc13_23.1, %.loc13_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_23.4: = specific_function %.loc13_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %.loc13_23.4(%.loc13_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_23.5: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc13_23.6: %i32 = converted %.loc13_23.1, %.loc13_23.5 [template = constants.%.29] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.6, %.loc13_23.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_20.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_20.3: = bound_method %.loc13_20.1, %.loc13_20.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_20.4: = specific_function %.loc13_20.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %.loc13_20.4(%.loc13_20.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_20.5: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_20.6: %i32 = converted %.loc13_20.1, %.loc13_20.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_23.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_23.3: = bound_method %.loc13_23.1, %.loc13_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_23.4: = specific_function %.loc13_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %.loc13_23.4(%.loc13_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_23.5: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%.33] +// CHECK:STDOUT: %.loc13_23.6: %i32 = converted %.loc13_23.1, %.loc13_23.5 [template = constants.%.33] +// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.6, %.loc13_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed, %.loc13_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc13_19.2: = bound_method %int.sadd, %.loc13_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc13_19.3: = specific_function %.loc13_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc13_19.4: %i32 = value_of_initializer %int.sadd [template = constants.%.30] -// CHECK:STDOUT: %.loc13_19.5: %i32 = converted %int.sadd, %.loc13_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc13_19: init Core.IntLiteral = call %.loc13_19.3(%.loc13_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc13_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_19.7: Core.IntLiteral = converted %int.sadd, %.loc13_19.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc13_25: type = array_type %.loc13_19.7, %i32 [template = constants.%.35] -// CHECK:STDOUT: %arr.var: ref %.35 = var arr -// CHECK:STDOUT: %arr: ref %.35 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc13_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc13_19.2: = bound_method %int.sadd, %.loc13_19.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_19.3: = specific_function %.loc13_19.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_19.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] +// CHECK:STDOUT: %.loc13_19.5: %i32 = converted %int.sadd, %.loc13_19.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc13_19: init Core.IntLiteral = call %.loc13_19.3(%.loc13_19.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc13_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_19 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_19.7: Core.IntLiteral = converted %int.sadd, %.loc13_19.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_25: type = array_type %.loc13_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %arr.var: ref %.39 = var arr +// CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index bd0c8f727792..a0f3618bd78b 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -23,43 +23,45 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.5: %I.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.6(%.3) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.6(%.4) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.7(%.3) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.29: = bound_method %.28, %F.2 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.7(%.4) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %F.2 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.3, @impl.2(%.3) [template] +// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.3, @impl.2(%.4) [template] // CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %.34: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %.35: = bound_method %.30, %Convert.16 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.3(%.3) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.5, @impl.4(%.3) [template] +// CHECK:STDOUT: %.40: = interface_witness (%Convert.16) [template] +// CHECK:STDOUT: %.41: = bound_method %.36, %Convert.16 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.3(%.4) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.44: %i32 = int_value 3 [template] +// CHECK:STDOUT: %Convert.type.17: type = fn_type @Convert.5, @impl.4(%.4) [template] // CHECK:STDOUT: %Convert.17: %Convert.type.17 = struct_value () [template] -// CHECK:STDOUT: %.39: = interface_witness (%Convert.17) [template] -// CHECK:STDOUT: %.40: = bound_method %.38, %Convert.17 [template] -// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.5(%.3) [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.43: type = array_type %.42, %i32 [template] +// CHECK:STDOUT: %.45: = interface_witness (%Convert.17) [template] +// CHECK:STDOUT: %.46: = bound_method %.44, %Convert.17 [template] +// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.5(%.4) [template] +// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.49: type = array_type %.48, %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,79 +83,79 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_6.1) [template = constants.%i32] // CHECK:STDOUT: %.loc15_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc15_6.3: type = converted %int.make_type_signed, %.loc15_6.2 [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_11.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_11.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc19_11: init type = call constants.%Int(%.loc19_11.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_17: Core.IntLiteral = int_value 1 [template = constants.%.5] -// CHECK:STDOUT: %.loc19_22.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_17: Core.IntLiteral = int_value 1 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_22.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc19_22: init type = call constants.%Int(%.loc19_22.1) [template = constants.%i32] // CHECK:STDOUT: %.loc19_22.2: type = value_of_initializer %int.make_type_signed.loc19_22 [template = constants.%i32] // CHECK:STDOUT: %.loc19_22.3: type = converted %int.make_type_signed.loc19_22, %.loc19_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_19.1: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_19.2: = bound_method %.loc19_17, %.loc19_19.1 [template = constants.%.26] -// CHECK:STDOUT: %.loc19_19.3: = specific_function %.loc19_19.2, @Convert.7(constants.%.3) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %.loc19_19.3(%.loc19_17) [template = constants.%.28] -// CHECK:STDOUT: %.loc19_19.4: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%.28] -// CHECK:STDOUT: %.loc19_19.5: %i32 = converted %.loc19_17, %.loc19_19.4 [template = constants.%.28] +// CHECK:STDOUT: %.loc19_19.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_19.2: = bound_method %.loc19_17, %.loc19_19.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc19_19.3: = specific_function %.loc19_19.2, @Convert.7(constants.%.4) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %.loc19_19.3(%.loc19_17) [template = constants.%.34] +// CHECK:STDOUT: %.loc19_19.4: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%.34] +// CHECK:STDOUT: %.loc19_19.5: %i32 = converted %.loc19_17, %.loc19_19.4 [template = constants.%.34] // CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc19_26.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] -// CHECK:STDOUT: %.loc19_26.2: = bound_method %.loc19_19.5, %.loc19_26.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc19_33.1: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_33.2: %Convert.type.15 = interface_witness_access constants.%.34, element0 [template = constants.%Convert.16] -// CHECK:STDOUT: %.loc19_33.3: = bound_method %.loc19_33.1, %.loc19_33.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_33.4: = specific_function %.loc19_33.3, @Convert.3(constants.%.3) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %.loc19_33.4(%.loc19_33.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc19_33.5: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%.37] -// CHECK:STDOUT: %.loc19_33.6: %i32 = converted %.loc19_33.1, %.loc19_33.5 [template = constants.%.37] -// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc19_26.2(%.loc19_19.5, %.loc19_33.6) [template = constants.%.38] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3] +// CHECK:STDOUT: %.loc19_26.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc19_26.2: = bound_method %.loc19_19.5, %.loc19_26.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_33.1: Core.IntLiteral = int_value 2 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_33.2: %Convert.type.15 = interface_witness_access constants.%.40, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %.loc19_33.3: = bound_method %.loc19_33.1, %.loc19_33.2 [template = constants.%.41] +// CHECK:STDOUT: %.loc19_33.4: = specific_function %.loc19_33.3, @Convert.3(constants.%.4) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %.loc19_33.4(%.loc19_33.1) [template = constants.%.43] +// CHECK:STDOUT: %.loc19_33.5: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%.43] +// CHECK:STDOUT: %.loc19_33.6: %i32 = converted %.loc19_33.1, %.loc19_33.5 [template = constants.%.43] +// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc19_26.2(%.loc19_19.5, %.loc19_33.6) [template = constants.%.44] // CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] // CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed.loc19_11, %.loc19_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_32.1: %Convert.type.7 = interface_witness_access constants.%.39, element0 [template = constants.%Convert.17] -// CHECK:STDOUT: %.loc19_32.2: = bound_method %int.sadd, %.loc19_32.1 [template = constants.%.40] -// CHECK:STDOUT: %.loc19_32.3: = specific_function %.loc19_32.2, @Convert.5(constants.%.3) [template = constants.%.41] -// CHECK:STDOUT: %.loc19_32.4: %i32 = value_of_initializer %int.sadd [template = constants.%.38] -// CHECK:STDOUT: %.loc19_32.5: %i32 = converted %int.sadd, %.loc19_32.4 [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc19_32: init Core.IntLiteral = call %.loc19_32.3(%.loc19_32.5) [template = constants.%.42] -// CHECK:STDOUT: %.loc19_32.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_32 [template = constants.%.42] -// CHECK:STDOUT: %.loc19_32.7: Core.IntLiteral = converted %int.sadd, %.loc19_32.6 [template = constants.%.42] -// CHECK:STDOUT: %.loc19_35: type = array_type %.loc19_32.7, %i32 [template = constants.%.43] -// CHECK:STDOUT: %arr.var: ref %.43 = var arr -// CHECK:STDOUT: %arr: ref %.43 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc19_32.1: %Convert.type.7 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %.loc19_32.2: = bound_method %int.sadd, %.loc19_32.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc19_32.3: = specific_function %.loc19_32.2, @Convert.5(constants.%.4) [template = constants.%.47] +// CHECK:STDOUT: %.loc19_32.4: %i32 = value_of_initializer %int.sadd [template = constants.%.44] +// CHECK:STDOUT: %.loc19_32.5: %i32 = converted %int.sadd, %.loc19_32.4 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc19_32: init Core.IntLiteral = call %.loc19_32.3(%.loc19_32.5) [template = constants.%.48] +// CHECK:STDOUT: %.loc19_32.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_32 [template = constants.%.48] +// CHECK:STDOUT: %.loc19_32.7: Core.IntLiteral = converted %int.sadd, %.loc19_32.6 [template = constants.%.48] +// CHECK:STDOUT: %.loc19_35: type = array_type %.loc19_32.7, %i32 [template = constants.%.49] +// CHECK:STDOUT: %arr.var: ref %.49 = var arr +// CHECK:STDOUT: %arr: ref %.49 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%Self (%Self.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%Self (%Self.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: @F.1.%Self (%Self.1) = binding_pattern other -// CHECK:STDOUT: %other.param_patt: @F.1.%Self (%Self.1) = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @F.1.%Self (%Self.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%Self (%Self.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.1.%.loc12_14.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%.loc12_14.1 (%.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref.loc12_14, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_27.1: type = facet_type_access %Self.ref.loc12_27 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc12_27.1: type = facet_access_type %Self.ref.loc12_27 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_27.2: type = converted %Self.ref.loc12_27, %.loc12_27.1 [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc12_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_36.1: type = facet_type_access %Self.ref.loc12_36 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %self.param: @F.1.%Self (%Self.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%Self (%Self.1) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @F.1.%Self (%Self.1) = value_param runtime_param1 -// CHECK:STDOUT: %other: @F.1.%Self (%Self.1) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @F.1.%Self (%Self.1) = return_slot %return.param +// CHECK:STDOUT: %.loc12_36.1: type = facet_access_type %Self.ref.loc12_36 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_36.2: type = converted %Self.ref.loc12_36, %.loc12_36.1 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%.loc12_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param1 +// CHECK:STDOUT: %other: @F.1.%.loc12_14.1 (%.1) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @F.1.%.loc12_14.1 (%.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @F.1.%.loc12_14.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -170,15 +172,15 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_14.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc16_14.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc16_14: init type = call constants.%Int(%.loc16_14.1) [template = constants.%i32] // CHECK:STDOUT: %.loc16_14.2: type = value_of_initializer %int.make_type_signed.loc16_14 [template = constants.%i32] // CHECK:STDOUT: %.loc16_14.3: type = converted %int.make_type_signed.loc16_14, %.loc16_14.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc16_26.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc16_26: init type = call constants.%Int(%.loc16_26.1) [template = constants.%i32] // CHECK:STDOUT: %.loc16_26.2: type = value_of_initializer %int.make_type_signed.loc16_26 [template = constants.%i32] // CHECK:STDOUT: %.loc16_26.3: type = converted %int.make_type_signed.loc16_26, %.loc16_26.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_34.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc16_34.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc16_34: init type = call constants.%Int(%.loc16_34.1) [template = constants.%i32] // CHECK:STDOUT: %.loc16_34.2: type = value_of_initializer %int.make_type_signed.loc16_34 [template = constants.%i32] // CHECK:STDOUT: %.loc16_34.3: type = converted %int.make_type_signed.loc16_34, %.loc16_34.2 [template = constants.%i32] @@ -189,7 +191,7 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc15_15: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -198,17 +200,20 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self (%Self.1)](%other.param_patt: @F.1.%Self (%Self.1)) -> @F.1.%Self (%Self.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc12_14.1 (%.1)](%other.param_patt: @F.1.%.loc12_14.1 (%.1)) -> @F.1.%.loc12_14.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%i32) { -// CHECK:STDOUT: %Self => constants.%i32 +// CHECK:STDOUT: specific @F.1(constants.%.5) { +// CHECK:STDOUT: %Self => constants.%.5 +// CHECK:STDOUT: %.loc12_14.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index 1446b9808808..f2c841aaac43 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -58,57 +58,64 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Self.1: %Add.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Add.type, %Op.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %As.type.1: type = generic_interface_type @As [template] // CHECK:STDOUT: %As: %As.type.1 = struct_value () [template] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%T)> [symbolic] // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.4: type = facet_access_type %Self.2 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @As(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @As.%Convert.decl [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @As.%Convert.decl [symbolic] // CHECK:STDOUT: %ImplicitAs.type.1: type = generic_interface_type @ImplicitAs [template] // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self.3: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.7: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.2 [symbolic] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] -// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.7 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.2 [symbolic] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] +// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.10 [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.8: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %.11: %Add.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %.12: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32)> [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.3, %Convert.type.4 [template] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, @As.%Convert.decl [template] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %.13: type = assoc_entity_type %As.type.3, %Convert.type.4 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, @As.%Convert.decl [template] +// CHECK:STDOUT: %.15: %As.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.3) [template] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.6 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.5) [template] +// CHECK:STDOUT: %.17: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.6 [template] +// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] +// CHECK:STDOUT: %.19: %ImplicitAs.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.5) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.15: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.8 [template] -// CHECK:STDOUT: %.16: %.15 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %.17: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %.21: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.8 [template] +// CHECK:STDOUT: %.22: %.21 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] +// CHECK:STDOUT: %.23: %ImplicitAs.type.2 = facet_value %i32, %i32 [symbolic] +// CHECK:STDOUT: %.24: = interface_witness (%Convert.7) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -157,7 +164,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc15_22.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %.loc19_6.1: Core.IntLiteral = int_value 32 [template = constants.%.7] +// CHECK:STDOUT: %.loc19_6.1: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_6.1) [template = constants.%i32] // CHECK:STDOUT: %.loc19_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc19_6.3: type = converted %int.make_type_signed, %.loc19_6.2 [template = constants.%i32] @@ -169,7 +176,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc23_17.2: type = converted %int_literal.make_type, %.loc23_17.1 [template = Core.IntLiteral] // CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, file.%As.decl [template = constants.%As] -// CHECK:STDOUT: %.loc23_25: Core.IntLiteral = int_value 32 [template = constants.%.7] +// CHECK:STDOUT: %.loc23_25: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_25) [template = constants.%i32] // CHECK:STDOUT: %.loc23_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc23_24.2: type = converted %int.make_type_signed, %.loc23_24.1 [template = constants.%i32] @@ -181,14 +188,14 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc27_17.2: type = converted %int_literal.make_type, %.loc27_17.1 [template = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] -// CHECK:STDOUT: %.loc27_33: Core.IntLiteral = int_value 32 [template = constants.%.7] +// CHECK:STDOUT: %.loc27_33: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc27_33) [template = constants.%i32] // CHECK:STDOUT: %.loc27_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc27_32.2: type = converted %int.make_type_signed, %.loc27_32.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { -// CHECK:STDOUT: %.loc31_6.1: Core.IntLiteral = int_value 32 [template = constants.%.7] +// CHECK:STDOUT: %.loc31_6.1: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc31_6.1) [template = constants.%i32] // CHECK:STDOUT: %.loc31_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc31_6.3: type = converted %int.make_type_signed, %.loc31_6.2 [template = constants.%i32] @@ -204,30 +211,30 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: interface @Add { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { -// CHECK:STDOUT: %self.patt: @Op.1.%Self (%Self.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Op.1.%Self (%Self.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: @Op.1.%Self (%Self.1) = binding_pattern other -// CHECK:STDOUT: %other.param_patt: @Op.1.%Self (%Self.1) = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @Op.1.%Self (%Self.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Op.1.%Self (%Self.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @Op.1.%.loc8_15.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Op.1.%.loc8_15.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: @Op.1.%.loc8_15.1 (%.1) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @Op.1.%.loc8_15.1 (%.1) = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @Op.1.%.loc8_15.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Op.1.%.loc8_15.1 (%.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_15.1: type = facet_type_access %Self.ref.loc8_15 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_15.2: type = converted %Self.ref.loc8_15, %.loc8_15.1 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %.loc8_15.2 [symbolic = %.loc8_15.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_28.1: type = facet_type_access %Self.ref.loc8_28 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_28.2: type = converted %Self.ref.loc8_28, %.loc8_28.1 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc8_28.1: type = facet_access_type %Self.ref.loc8_28 [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc8_28.2: type = converted %Self.ref.loc8_28, %.loc8_28.1 [symbolic = %.loc8_15.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc8_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_37.1: type = facet_type_access %Self.ref.loc8_37 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %.loc8_37.1 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %self.param: @Op.1.%Self (%Self.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Op.1.%Self (%Self.1) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @Op.1.%Self (%Self.1) = value_param runtime_param1 -// CHECK:STDOUT: %other: @Op.1.%Self (%Self.1) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @Op.1.%Self (%Self.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @Op.1.%Self (%Self.1) = return_slot %return.param +// CHECK:STDOUT: %.loc8_37.1: type = facet_access_type %Self.ref.loc8_37 [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %.loc8_37.1 [symbolic = %.loc8_15.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @Op.1.%.loc8_15.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Op.1.%.loc8_15.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.1.%.loc8_15.1 (%.1) = value_param runtime_param1 +// CHECK:STDOUT: %other: @Op.1.%.loc8_15.1 (%.1) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.1.%.loc8_15.1 (%.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @Op.1.%.loc8_15.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %Op.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc8: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -244,28 +251,28 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T.loc11_14.2) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.loc12_32.2: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.loc12_32.2 (constants.%.3)] -// CHECK:STDOUT: %.loc12_32.3: @As.%.loc12_32.2 (%.3) = assoc_entity element0, %Convert.decl [symbolic = %.loc12_32.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12_32.2: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.loc12_32.2 (constants.%.5)] +// CHECK:STDOUT: %.loc12_32.3: @As.%.loc12_32.2 (%.5) = assoc_entity element0, %Convert.decl [symbolic = %.loc12_32.3 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.2)] // CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.1) = fn_decl @Convert.1 [symbolic = @As.%Convert (constants.%Convert.1)] { -// CHECK:STDOUT: %self.patt: @Convert.1.%Self (%Self.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Convert.1.%Self (%Self.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Convert.1.%.loc12_20.1 (%.4) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.1.%.loc12_20.1 (%.4) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_20.1: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc12_20.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc12_20.3: type = converted %Self.ref, %.loc12_20.2 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.loc12_20.2: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.loc12_20.3: type = facet_access_type %Self.ref [symbolic = %.loc12_20.1 (constants.%.4)] +// CHECK:STDOUT: %.loc12_20.4: type = converted %Self.ref, %.loc12_20.3 [symbolic = %.loc12_20.1 (constants.%.4)] // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Convert.1.%Self (%Self.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Convert.1.%Self (%Self.2) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Convert.1.%.loc12_20.1 (%.4) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Convert.1.%.loc12_20.1 (%.4) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_32.1: @As.%.loc12_32.2 (%.3) = assoc_entity element0, %Convert.decl [symbolic = %.loc12_32.3 (constants.%.4)] +// CHECK:STDOUT: %.loc12_32.1: @As.%.loc12_32.2 (%.5) = assoc_entity element0, %Convert.decl [symbolic = %.loc12_32.3 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -283,28 +290,28 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T.loc15_22.2) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.loc16_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.2) [symbolic = %.loc16_32.2 (constants.%.5)] -// CHECK:STDOUT: %.loc16_32.3: @ImplicitAs.%.loc16_32.2 (%.5) = assoc_entity element0, %Convert.decl [symbolic = %.loc16_32.3 (constants.%.6)] +// CHECK:STDOUT: %.loc16_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.2) [symbolic = %.loc16_32.2 (constants.%.8)] +// CHECK:STDOUT: %.loc16_32.3: @ImplicitAs.%.loc16_32.2 (%.8) = assoc_entity element0, %Convert.decl [symbolic = %.loc16_32.3 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.3)] // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.2) = fn_decl @Convert.2 [symbolic = @ImplicitAs.%Convert (constants.%Convert.2)] { -// CHECK:STDOUT: %self.patt: @Convert.2.%Self (%Self.3) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Convert.2.%Self (%Self.3) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Convert.2.%.loc16_20.1 (%.7) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.2.%.loc16_20.1 (%.7) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Convert.2.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.2.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_20.1: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc16_20.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc16_20.3: type = converted %Self.ref, %.loc16_20.2 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.loc16_20.2: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.loc16_20.3: type = facet_access_type %Self.ref [symbolic = %.loc16_20.1 (constants.%.7)] +// CHECK:STDOUT: %.loc16_20.4: type = converted %Self.ref, %.loc16_20.3 [symbolic = %.loc16_20.1 (constants.%.7)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Convert.2.%Self (%Self.3) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Convert.2.%Self (%Self.3) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Convert.2.%.loc16_20.1 (%.7) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Convert.2.%.loc16_20.1 (%.7) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.2.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_32.1: @ImplicitAs.%.loc16_32.2 (%.5) = assoc_entity element0, %Convert.decl [symbolic = %.loc16_32.3 (constants.%.6)] +// CHECK:STDOUT: %.loc16_32.1: @ImplicitAs.%.loc16_32.2 (%.8) = assoc_entity element0, %Convert.decl [symbolic = %.loc16_32.3 (constants.%.9)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -332,7 +339,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_17: = interface_witness (%Op.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc19_17: = interface_witness (%Op.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -347,7 +354,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc24_31.1: Core.IntLiteral = int_value 32 [template = constants.%.7] +// CHECK:STDOUT: %.loc24_31.1: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24_31.1) [template = constants.%i32] // CHECK:STDOUT: %.loc24_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc24_31.3: type = converted %int.make_type_signed, %.loc24_31.2 [template = constants.%i32] @@ -356,7 +363,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23_30: = interface_witness (%Convert.decl) [template = constants.%.11] +// CHECK:STDOUT: %.loc23_30: = interface_witness (%Convert.decl) [template = constants.%.16] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -371,7 +378,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc28_31.1: Core.IntLiteral = int_value 32 [template = constants.%.7] +// CHECK:STDOUT: %.loc28_31.1: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc28_31.1) [template = constants.%i32] // CHECK:STDOUT: %.loc28_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc28_31.3: type = converted %int.make_type_signed, %.loc28_31.2 [template = constants.%i32] @@ -380,7 +387,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc27_38: = interface_witness (%Convert.decl) [template = constants.%.14] +// CHECK:STDOUT: %.loc27_38: = interface_witness (%Convert.decl) [template = constants.%.20] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -404,7 +411,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc31_38: = interface_witness (%Convert.decl) [template = constants.%.17] +// CHECK:STDOUT: %.loc31_38: = interface_witness (%Convert.decl) [template = constants.%.24] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -417,24 +424,27 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(@Add.%Self: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc8_15.1: type = facet_access_type %Self [symbolic = %.loc8_15.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%Self (%Self.1)](%other.param_patt: @Op.1.%Self (%Self.1)) -> @Op.1.%Self (%Self.1); +// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%.loc8_15.1 (%.1)](%other.param_patt: @Op.1.%.loc8_15.1 (%.1)) -> @Op.1.%.loc8_15.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.1(@As.%T.loc11_14.1: type, @As.%Self.1: @As.%As.type (%As.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.loc12_20.1: type = facet_access_type %Self [symbolic = %.loc12_20.1 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.loc12_20.1 (%.4)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(@ImplicitAs.%T.loc15_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.loc16_20.1: type = facet_access_type %Self [symbolic = %.loc16_20.1 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self (%Self.3)]() -> @Convert.2.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%.loc16_20.1 (%.7)]() -> @Convert.2.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; @@ -447,6 +457,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.loc8_15.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%T) { @@ -463,6 +474,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.2 +// CHECK:STDOUT: %.loc12_20.1 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(%T.loc11_14.2) { @@ -484,6 +496,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.loc16_20.1 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(%T.loc15_22.2) { @@ -491,8 +504,9 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T.patt.loc15_22.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%i32) { -// CHECK:STDOUT: %Self => constants.%i32 +// CHECK:STDOUT: specific @Op.1(constants.%.11) { +// CHECK:STDOUT: %Self => constants.%.11 +// CHECK:STDOUT: %.loc8_15.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32) { @@ -504,14 +518,15 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2 => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.loc12_32.2 => constants.%.9 -// CHECK:STDOUT: %.loc12_32.3 => constants.%.10 +// CHECK:STDOUT: %.loc12_32.2 => constants.%.13 +// CHECK:STDOUT: %.loc12_32.3 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%i32, Core.IntLiteral) { +// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%.15) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %As.type => constants.%As.type.3 -// CHECK:STDOUT: %Self => Core.IntLiteral +// CHECK:STDOUT: %Self => constants.%.15 +// CHECK:STDOUT: %.loc12_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { @@ -523,14 +538,15 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2 => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.6 // CHECK:STDOUT: %Convert => constants.%Convert.6 -// CHECK:STDOUT: %.loc16_32.2 => constants.%.12 -// CHECK:STDOUT: %.loc16_32.3 => constants.%.13 +// CHECK:STDOUT: %.loc16_32.2 => constants.%.17 +// CHECK:STDOUT: %.loc16_32.3 => constants.%.18 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%i32, Core.IntLiteral) { +// CHECK:STDOUT: specific @Convert.2(constants.%i32, constants.%.19) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 -// CHECK:STDOUT: %Self => Core.IntLiteral +// CHECK:STDOUT: %Self => constants.%.19 +// CHECK:STDOUT: %.loc16_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { @@ -542,14 +558,15 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2 => constants.%Self.3 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.8 // CHECK:STDOUT: %Convert => constants.%Convert.8 -// CHECK:STDOUT: %.loc16_32.2 => constants.%.15 -// CHECK:STDOUT: %.loc16_32.3 => constants.%.16 +// CHECK:STDOUT: %.loc16_32.2 => constants.%.21 +// CHECK:STDOUT: %.loc16_32.3 => constants.%.22 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%i32) { +// CHECK:STDOUT: specific @Convert.2(Core.IntLiteral, constants.%.23) { // CHECK:STDOUT: %T => Core.IntLiteral // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%i32 +// CHECK:STDOUT: %Self => constants.%.23 +// CHECK:STDOUT: %.loc16_20.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon @@ -567,14 +584,16 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.2: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @As(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.3: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %As.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.6: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.7: %.3 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %As.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.9: %.4 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Self.3: %Add.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] @@ -583,54 +602,57 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self.5: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.3 [symbolic] -// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.23 [symbolic] +// CHECK:STDOUT: %.10: type = facet_access_type %Self.5 [symbolic] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.3 [symbolic] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.23 [symbolic] +// CHECK:STDOUT: %.13: type = facet_access_type %Self.4 [symbolic] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.4 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.24 [template] +// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.4 [template] +// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.24 [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [template] +// CHECK:STDOUT: %.16: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %.17: %.16 = assoc_entity element0, imports.%import_ref.28 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.15: = bound_method %.2, %Convert.6 [template] -// CHECK:STDOUT: %.16: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.17: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.18: = bound_method %.17, %Convert.6 [template] -// CHECK:STDOUT: %.19: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.18: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %.19: = bound_method %.2, %Convert.6 [template] +// CHECK:STDOUT: %.20: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.22: = bound_method %.21, %Convert.6 [template] +// CHECK:STDOUT: %.23: %i32 = int_value 2 [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] -// CHECK:STDOUT: %.20: type = assoc_entity_type %Add.type, %Op.type.1 [template] -// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.30 [template] +// CHECK:STDOUT: %.24: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %.25: type = assoc_entity_type %Add.type, %Op.type.1 [template] +// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.30 [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Op.2) [template] -// CHECK:STDOUT: %.23: = bound_method %.16, %Op.2 [template] -// CHECK:STDOUT: %.24: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.25: %.8 = assoc_entity element0, imports.%import_ref.32 [symbolic] +// CHECK:STDOUT: %.27: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %.28: = bound_method %.20, %Op.2 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.30: %.11 = assoc_entity element0, imports.%import_ref.32 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.27: = bound_method %.24, %Convert.7 [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.29: type = array_type %.28, %i32 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.32: = bound_method %.28, %Convert.6 [template] -// CHECK:STDOUT: %.33: = bound_method %.31, %Convert.6 [template] -// CHECK:STDOUT: %.34: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.35: = bound_method %.24, %Op.2 [template] -// CHECK:STDOUT: %.36: %i32 = int_value 7 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.7 [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.34: type = array_type %.33, %i32 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.37: = bound_method %.33, %Convert.6 [template] +// CHECK:STDOUT: %.38: = bound_method %.36, %Convert.6 [template] +// CHECK:STDOUT: %.39: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.40: = bound_method %.29, %Op.2 [template] +// CHECK:STDOUT: %.41: %i32 = int_value 7 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32) [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.38: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.39: = bound_method %.28, %Convert.8 [template] -// CHECK:STDOUT: %.40: = bound_method %.31, %Convert.8 [template] -// CHECK:STDOUT: %array: %.29 = tuple_value (%.24, %.34, %.36) [template] +// CHECK:STDOUT: %.43: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %.44: = bound_method %.33, %Convert.8 [template] +// CHECK:STDOUT: %.45: = bound_method %.36, %Convert.8 [template] +// CHECK:STDOUT: %array: %.34 = tuple_value (%.29, %.39, %.41) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -641,29 +663,29 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .ImplicitAs = %import_ref.31 // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+68, unloaded -// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.3) = import_ref Core//default, inst+90, loaded [symbolic = @As.%.2 (constants.%.7)] -// CHECK:STDOUT: %import_ref.5 = import_ref Core//default, inst+83, unloaded -// CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+83, unloaded +// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+70, unloaded +// CHECK:STDOUT: %import_ref.4: @As.%.1 (%.4) = import_ref Core//default, inst+94, loaded [symbolic = @As.%.2 (constants.%.9)] +// CHECK:STDOUT: %import_ref.5 = import_ref Core//default, inst+86, unloaded +// CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+86, unloaded // CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst+26, unloaded -// CHECK:STDOUT: %import_ref.9: %.20 = import_ref Core//default, inst+54, loaded [template = constants.%.21] -// CHECK:STDOUT: %import_ref.10 = import_ref Core//default, inst+49, unloaded -// CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, inst+143, loaded [template = constants.%i32] -// CHECK:STDOUT: %import_ref.12: type = import_ref Core//default, inst+144, loaded [template = constants.%Add.type] -// CHECK:STDOUT: %import_ref.13: = import_ref Core//default, inst+164, loaded [template = constants.%.22] -// CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, inst+169, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, inst+175, loaded [template = constants.%As.type.3] -// CHECK:STDOUT: %import_ref.16: = import_ref Core//default, inst+198, loaded [template = constants.%.14] -// CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst+108, unloaded -// CHECK:STDOUT: %import_ref.18: @ImplicitAs.%.1 (%.8) = import_ref Core//default, inst+130, loaded [symbolic = @ImplicitAs.%.2 (constants.%.25)] -// CHECK:STDOUT: %import_ref.19 = import_ref Core//default, inst+123, unloaded -// CHECK:STDOUT: %import_ref.20: type = import_ref Core//default, inst+203, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.21: type = import_ref Core//default, inst+209, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.22: = import_ref Core//default, inst+232, loaded [template = constants.%.38] -// CHECK:STDOUT: %import_ref.23 = import_ref Core//default, inst+123, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Core//default, inst+237, loaded [template = constants.%i32] -// CHECK:STDOUT: %import_ref.26: type = import_ref Core//default, inst+243, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.27: = import_ref Core//default, inst+266, loaded [template = constants.%.26] +// CHECK:STDOUT: %import_ref.9: %.25 = import_ref Core//default, inst+56, loaded [template = constants.%.26] +// CHECK:STDOUT: %import_ref.10 = import_ref Core//default, inst+50, unloaded +// CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, inst+149, loaded [template = constants.%i32] +// CHECK:STDOUT: %import_ref.12: type = import_ref Core//default, inst+150, loaded [template = constants.%Add.type] +// CHECK:STDOUT: %import_ref.13: = import_ref Core//default, inst+171, loaded [template = constants.%.27] +// CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, inst+176, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, inst+182, loaded [template = constants.%As.type.3] +// CHECK:STDOUT: %import_ref.16: = import_ref Core//default, inst+206, loaded [template = constants.%.18] +// CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst+112, unloaded +// CHECK:STDOUT: %import_ref.18: @ImplicitAs.%.1 (%.11) = import_ref Core//default, inst+136, loaded [symbolic = @ImplicitAs.%.2 (constants.%.30)] +// CHECK:STDOUT: %import_ref.19 = import_ref Core//default, inst+128, unloaded +// CHECK:STDOUT: %import_ref.20: type = import_ref Core//default, inst+211, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.21: type = import_ref Core//default, inst+217, loaded [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %import_ref.22: = import_ref Core//default, inst+241, loaded [template = constants.%.43] +// CHECK:STDOUT: %import_ref.23 = import_ref Core//default, inst+128, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Core//default, inst+246, loaded [template = constants.%i32] +// CHECK:STDOUT: %import_ref.26: type = import_ref Core//default, inst+252, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.27: = import_ref Core//default, inst+276, loaded [template = constants.%.31] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -679,36 +701,36 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%.loc4_22.1) [template = constants.%i32] // CHECK:STDOUT: %.loc4_22.2: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32] // CHECK:STDOUT: %.loc4_22.3: type = converted %int.make_type_signed.loc4_22, %.loc4_22.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %.loc4_17, %.loc4_19.1 [template = constants.%.15] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %.loc4_19.2(%.loc4_17) [template = constants.%.16] -// CHECK:STDOUT: %.loc4_19.3: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.16] -// CHECK:STDOUT: %.loc4_19.4: %i32 = converted %.loc4_17, %.loc4_19.3 [template = constants.%.16] -// CHECK:STDOUT: %.loc4_30: Core.IntLiteral = int_value 2 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_19.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %.loc4_19.2: = bound_method %.loc4_17, %.loc4_19.1 [template = constants.%.19] +// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %.loc4_19.2(%.loc4_17) [template = constants.%.20] +// CHECK:STDOUT: %.loc4_19.3: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.20] +// CHECK:STDOUT: %.loc4_19.4: %i32 = converted %.loc4_17, %.loc4_19.3 [template = constants.%.20] +// CHECK:STDOUT: %.loc4_30: Core.IntLiteral = int_value 2 [template = constants.%.21] // CHECK:STDOUT: %.loc4_35.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%.loc4_35.1) [template = constants.%i32] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] // CHECK:STDOUT: %.loc4_35.3: type = converted %int.make_type_signed.loc4_35, %.loc4_35.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_32.2: = bound_method %.loc4_30, %.loc4_32.1 [template = constants.%.18] -// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32 = call %.loc4_32.2(%.loc4_30) [template = constants.%.19] -// CHECK:STDOUT: %.loc4_32.3: %i32 = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%.19] -// CHECK:STDOUT: %.loc4_32.4: %i32 = converted %.loc4_30, %.loc4_32.3 [template = constants.%.19] -// CHECK:STDOUT: %.loc4_27.1: %Op.type.1 = interface_witness_access constants.%.22, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %.loc4_27.2: = bound_method %.loc4_19.4, %.loc4_27.1 [template = constants.%.23] -// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc4_27.2(%.loc4_19.4, %.loc4_32.4) [template = constants.%.24] +// CHECK:STDOUT: %.loc4_32.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %.loc4_32.2: = bound_method %.loc4_30, %.loc4_32.1 [template = constants.%.22] +// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32 = call %.loc4_32.2(%.loc4_30) [template = constants.%.23] +// CHECK:STDOUT: %.loc4_32.3: %i32 = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%.23] +// CHECK:STDOUT: %.loc4_32.4: %i32 = converted %.loc4_30, %.loc4_32.3 [template = constants.%.23] +// CHECK:STDOUT: %.loc4_27.1: %Op.type.1 = interface_witness_access constants.%.27, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %.loc4_27.2: = bound_method %.loc4_19.4, %.loc4_27.1 [template = constants.%.28] +// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc4_27.2(%.loc4_19.4, %.loc4_32.4) [template = constants.%.29] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4_11, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_27.3: %Convert.type.5 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.7] -// CHECK:STDOUT: %.loc4_27.4: = bound_method %int.sadd, %.loc4_27.3 [template = constants.%.27] -// CHECK:STDOUT: %.loc4_27.5: %i32 = value_of_initializer %int.sadd [template = constants.%.24] -// CHECK:STDOUT: %.loc4_27.6: %i32 = converted %int.sadd, %.loc4_27.5 [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %.loc4_27.4(%.loc4_27.6) [template = constants.%.28] -// CHECK:STDOUT: %.loc4_27.7: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_27.8: Core.IntLiteral = converted %int.sadd, %.loc4_27.7 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_39: type = array_type %.loc4_27.8, %i32 [template = constants.%.29] -// CHECK:STDOUT: %arr.var: ref %.29 = var arr -// CHECK:STDOUT: %arr: ref %.29 = bind_name arr, %arr.var +// CHECK:STDOUT: %.loc4_27.3: %Convert.type.5 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.7] +// CHECK:STDOUT: %.loc4_27.4: = bound_method %int.sadd, %.loc4_27.3 [template = constants.%.32] +// CHECK:STDOUT: %.loc4_27.5: %i32 = value_of_initializer %int.sadd [template = constants.%.29] +// CHECK:STDOUT: %.loc4_27.6: %i32 = converted %int.sadd, %.loc4_27.5 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %.loc4_27.4(%.loc4_27.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_27.7: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_27.8: Core.IntLiteral = converted %int.sadd, %.loc4_27.7 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_39: type = array_type %.loc4_27.8, %i32 [template = constants.%.34] +// CHECK:STDOUT: %arr.var: ref %.34 = var arr +// CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @As(constants.%T: type) { @@ -720,8 +742,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.3)] -// CHECK:STDOUT: %.2: @As.%.1 (%.3) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.4)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.2: @As.%.1 (%.4) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -747,8 +769,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.5)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.3) [symbolic = %.1 (constants.%.8)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.8) = assoc_entity element0, imports.%import_ref.23 [symbolic = %.2 (constants.%.9)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.3) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.23 [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -784,24 +806,27 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.3)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%T: type, constants.%Self.4: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2)) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.5)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%Self (%Self.5)]() -> @Convert.2.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.2.%.1 (%.10)]() -> @Convert.2.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.3[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.1(constants.%Self.3: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.24)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%Self (%Self.3)](%other.param_patt: @Op.1.%Self (%Self.3)) -> @Op.1.%Self (%Self.3); +// CHECK:STDOUT: fn[%self.param_patt: @Op.1.%.1 (%.24)](%other.param_patt: @Op.1.%.1 (%.24)) -> @Op.1.%.1 (%.24); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.2[%self.param_patt: %i32](%other.param_patt: %i32) -> %i32 = "int.sadd"; @@ -812,51 +837,51 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc4_44: Core.IntLiteral = int_value 3 [template = constants.%.28] -// CHECK:STDOUT: %.loc4_47: Core.IntLiteral = int_value 4 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_51: Core.IntLiteral = int_value 3 [template = constants.%.28] +// CHECK:STDOUT: %.loc4_44: Core.IntLiteral = int_value 3 [template = constants.%.33] +// CHECK:STDOUT: %.loc4_47: Core.IntLiteral = int_value 4 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_51: Core.IntLiteral = int_value 3 [template = constants.%.33] // CHECK:STDOUT: %.loc4_56.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc4_56: init type = call constants.%Int(%.loc4_56.1) [template = constants.%i32] // CHECK:STDOUT: %.loc4_56.2: type = value_of_initializer %int.make_type_signed.loc4_56 [template = constants.%i32] // CHECK:STDOUT: %.loc4_56.3: type = converted %int.make_type_signed.loc4_56, %.loc4_56.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_53.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_53.2: = bound_method %.loc4_51, %.loc4_53.1 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc4_53: init %i32 = call %.loc4_53.2(%.loc4_51) [template = constants.%.24] -// CHECK:STDOUT: %.loc4_53.3: %i32 = value_of_initializer %int.convert_checked.loc4_53 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_53.4: %i32 = converted %.loc4_51, %.loc4_53.3 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_64: Core.IntLiteral = int_value 4 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_53.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %.loc4_53.2: = bound_method %.loc4_51, %.loc4_53.1 [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc4_53: init %i32 = call %.loc4_53.2(%.loc4_51) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_53.3: %i32 = value_of_initializer %int.convert_checked.loc4_53 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_53.4: %i32 = converted %.loc4_51, %.loc4_53.3 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_64: Core.IntLiteral = int_value 4 [template = constants.%.36] // CHECK:STDOUT: %.loc4_69.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc4_69: init type = call constants.%Int(%.loc4_69.1) [template = constants.%i32] // CHECK:STDOUT: %.loc4_69.2: type = value_of_initializer %int.make_type_signed.loc4_69 [template = constants.%i32] // CHECK:STDOUT: %.loc4_69.3: type = converted %int.make_type_signed.loc4_69, %.loc4_69.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_66.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %.loc4_66.2: = bound_method %.loc4_64, %.loc4_66.1 [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc4_66: init %i32 = call %.loc4_66.2(%.loc4_64) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_66.3: %i32 = value_of_initializer %int.convert_checked.loc4_66 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_66.4: %i32 = converted %.loc4_64, %.loc4_66.3 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_61.1: %Op.type.1 = interface_witness_access constants.%.22, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %.loc4_61.2: = bound_method %.loc4_53.4, %.loc4_61.1 [template = constants.%.35] -// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc4_61.2(%.loc4_53.4, %.loc4_66.4) [template = constants.%.36] +// CHECK:STDOUT: %.loc4_66.1: %Convert.type.2 = interface_witness_access constants.%.18, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %.loc4_66.2: = bound_method %.loc4_64, %.loc4_66.1 [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc4_66: init %i32 = call %.loc4_66.2(%.loc4_64) [template = constants.%.39] +// CHECK:STDOUT: %.loc4_66.3: %i32 = value_of_initializer %int.convert_checked.loc4_66 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_66.4: %i32 = converted %.loc4_64, %.loc4_66.3 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_61.1: %Op.type.1 = interface_witness_access constants.%.27, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %.loc4_61.2: = bound_method %.loc4_53.4, %.loc4_61.1 [template = constants.%.40] +// CHECK:STDOUT: %int.sadd: init %i32 = call %.loc4_61.2(%.loc4_53.4, %.loc4_66.4) [template = constants.%.41] // CHECK:STDOUT: %.loc4_73.1: %tuple.type = tuple_literal (%.loc4_44, %.loc4_47, %int.sadd) -// CHECK:STDOUT: %.loc4_73.2: %Convert.type.4 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.8] -// CHECK:STDOUT: %.loc4_73.3: = bound_method %.loc4_44, %.loc4_73.2 [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc4_73.1: init %i32 = call %.loc4_73.3(%.loc4_44) [template = constants.%.24] -// CHECK:STDOUT: %.loc4_73.4: init %i32 = converted %.loc4_44, %int.convert_checked.loc4_73.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_73.5: Core.IntLiteral = int_value 0 [template = constants.%.37] +// CHECK:STDOUT: %.loc4_73.2: %Convert.type.4 = interface_witness_access constants.%.43, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %.loc4_73.3: = bound_method %.loc4_44, %.loc4_73.2 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc4_73.1: init %i32 = call %.loc4_73.3(%.loc4_44) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_73.4: init %i32 = converted %.loc4_44, %int.convert_checked.loc4_73.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_73.5: Core.IntLiteral = int_value 0 [template = constants.%.42] // CHECK:STDOUT: %.loc4_73.6: ref %i32 = array_index file.%arr.var, %.loc4_73.5 -// CHECK:STDOUT: %.loc4_73.7: init %i32 = initialize_from %.loc4_73.4 to %.loc4_73.6 [template = constants.%.24] -// CHECK:STDOUT: %.loc4_73.8: %Convert.type.4 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.8] -// CHECK:STDOUT: %.loc4_73.9: = bound_method %.loc4_47, %.loc4_73.8 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc4_73.2: init %i32 = call %.loc4_73.9(%.loc4_47) [template = constants.%.34] -// CHECK:STDOUT: %.loc4_73.10: init %i32 = converted %.loc4_47, %int.convert_checked.loc4_73.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc4_73.7: init %i32 = initialize_from %.loc4_73.4 to %.loc4_73.6 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_73.8: %Convert.type.4 = interface_witness_access constants.%.43, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %.loc4_73.9: = bound_method %.loc4_47, %.loc4_73.8 [template = constants.%.45] +// CHECK:STDOUT: %int.convert_checked.loc4_73.2: init %i32 = call %.loc4_73.9(%.loc4_47) [template = constants.%.39] +// CHECK:STDOUT: %.loc4_73.10: init %i32 = converted %.loc4_47, %int.convert_checked.loc4_73.2 [template = constants.%.39] // CHECK:STDOUT: %.loc4_73.11: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_73.12: ref %i32 = array_index file.%arr.var, %.loc4_73.11 -// CHECK:STDOUT: %.loc4_73.13: init %i32 = initialize_from %.loc4_73.10 to %.loc4_73.12 [template = constants.%.34] -// CHECK:STDOUT: %.loc4_73.14: Core.IntLiteral = int_value 2 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_73.13: init %i32 = initialize_from %.loc4_73.10 to %.loc4_73.12 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_73.14: Core.IntLiteral = int_value 2 [template = constants.%.21] // CHECK:STDOUT: %.loc4_73.15: ref %i32 = array_index file.%arr.var, %.loc4_73.14 -// CHECK:STDOUT: %.loc4_73.16: init %i32 = initialize_from %int.sadd to %.loc4_73.15 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_73.17: init %.29 = array_init (%.loc4_73.7, %.loc4_73.13, %.loc4_73.16) to file.%arr.var [template = constants.%array] -// CHECK:STDOUT: %.loc4_74: init %.29 = converted %.loc4_73.1, %.loc4_73.17 [template = constants.%array] +// CHECK:STDOUT: %.loc4_73.16: init %i32 = initialize_from %int.sadd to %.loc4_73.15 [template = constants.%.41] +// CHECK:STDOUT: %.loc4_73.17: init %.34 = array_init (%.loc4_73.7, %.loc4_73.13, %.loc4_73.16) to file.%arr.var [template = constants.%array] +// CHECK:STDOUT: %.loc4_74: init %.34 = converted %.loc4_73.1, %.loc4_73.17 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_74 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -880,6 +905,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @As(constants.%i32) { @@ -891,8 +917,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.5 -// CHECK:STDOUT: %.2 => constants.%.6 +// CHECK:STDOUT: %.1 => constants.%.7 +// CHECK:STDOUT: %.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%T) { @@ -909,8 +935,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self => constants.%Self.5 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.1 => constants.%.10 -// CHECK:STDOUT: %.2 => constants.%.11 +// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %.2 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(%T) { @@ -927,6 +953,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.4 +// CHECK:STDOUT: %.1 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) { @@ -938,11 +965,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Self => constants.%Self.5 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.12 -// CHECK:STDOUT: %.2 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.16 +// CHECK:STDOUT: %.2 => constants.%.17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.1(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.24 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 91e1bbd93fb1..9ca773180fc6 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -31,10 +31,10 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,12 +91,12 @@ fn Main() { // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo] // CHECK:STDOUT: %.loc16_21.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc16_21.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_21.3: = bound_method %.loc16_21.1, %.loc16_21.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc16_21.4: = specific_function %.loc16_21.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_21.4(%.loc16_21.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc16_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc16_21.6: %i32 = converted %.loc16_21.1, %.loc16_21.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc16_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_21.3: = bound_method %.loc16_21.1, %.loc16_21.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc16_21.4: = specific_function %.loc16_21.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_21.4(%.loc16_21.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc16_21.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc16_21.6: %i32 = converted %.loc16_21.1, %.loc16_21.5 [template = constants.%.29] // CHECK:STDOUT: %Echo.call: init %i32 = call %Echo.ref(%.loc16_21.6) // CHECK:STDOUT: assign %b.var, %Echo.call // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index b2b9099ddc24..0c896114f028 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -35,16 +35,16 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.25) [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,26 +102,26 @@ fn Main() { // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: %.loc14_20: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_22.1: %tuple.type.3 = tuple_literal (%.loc14_20) -// CHECK:STDOUT: %.loc14_22.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_22.3: = bound_method %.loc14_20, %.loc14_22.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc14_22.4: = specific_function %.loc14_22.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_22.4(%.loc14_20) [template = constants.%.25] -// CHECK:STDOUT: %.loc14_22.5: init %i32 = converted %.loc14_20, %int.convert_checked.loc14 [template = constants.%.25] +// CHECK:STDOUT: %.loc14_22.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_22.3: = bound_method %.loc14_20, %.loc14_22.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_22.4: = specific_function %.loc14_22.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_22.4(%.loc14_20) [template = constants.%.29] +// CHECK:STDOUT: %.loc14_22.5: init %i32 = converted %.loc14_20, %int.convert_checked.loc14 [template = constants.%.29] // CHECK:STDOUT: %.loc14_22.6: init %tuple.type.2 = tuple_init (%.loc14_22.5) to %x.var [template = constants.%tuple] // CHECK:STDOUT: %.loc14_23: init %tuple.type.2 = converted %.loc14_22.1, %.loc14_22.6 [template = constants.%tuple] // CHECK:STDOUT: assign %x.var, %.loc14_23 // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %x.ref: ref %tuple.type.2 = name_ref x, %x -// CHECK:STDOUT: %.loc16_9: Core.IntLiteral = int_value 0 [template = constants.%.26] +// CHECK:STDOUT: %.loc16_9: Core.IntLiteral = int_value 0 [template = constants.%.30] // CHECK:STDOUT: %.loc16_8.1: ref %i32 = tuple_access %x.ref, element0 -// CHECK:STDOUT: %.loc16_12.1: Core.IntLiteral = int_value 6 [template = constants.%.27] +// CHECK:STDOUT: %.loc16_12.1: Core.IntLiteral = int_value 6 [template = constants.%.31] // CHECK:STDOUT: %.loc16_8.2: %i32 = bind_value %.loc16_8.1 -// CHECK:STDOUT: %.loc16_12.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_12.3: = bound_method %.loc16_12.1, %.loc16_12.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc16_12.4: = specific_function %.loc16_12.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_12.4(%.loc16_12.1) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_12.5: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%.30] -// CHECK:STDOUT: %.loc16_12.6: %i32 = converted %.loc16_12.1, %.loc16_12.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc16_12.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_12.3: = bound_method %.loc16_12.1, %.loc16_12.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc16_12.4: = specific_function %.loc16_12.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_12.4(%.loc16_12.1) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_12.5: %i32 = value_of_initializer %int.convert_checked.loc16 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_12.6: %i32 = converted %.loc16_12.1, %.loc16_12.5 [template = constants.%.34] // CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc16_8.2, %.loc16_12.6) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 636010830682..ab15ff51210c 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -30,10 +30,10 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,12 +75,12 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.29] // CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7.6) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 7078b5d19059..2c68d02df741 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -31,10 +31,10 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,21 +76,21 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.25] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.29] // CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.6) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc15_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_7.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_7.3: = bound_method %.loc15_7.1, %.loc15_7.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc15_7.4: = specific_function %.loc15_7.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_7.4(%.loc15_7.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc15_7.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.25] -// CHECK:STDOUT: %.loc15_7.6: %i32 = converted %.loc15_7.1, %.loc15_7.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc15_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_7.3: = bound_method %.loc15_7.1, %.loc15_7.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc15_7.4: = specific_function %.loc15_7.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_7.4(%.loc15_7.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc15_7.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_7.6: %i32 = converted %.loc15_7.1, %.loc15_7.5 [template = constants.%.29] // CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7.6) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 3239b9238afa..122433f2495b 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -31,13 +31,13 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,18 +88,18 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_10.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_10.3: = bound_method %.loc14_10.1, %.loc14_10.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_10.4: = specific_function %.loc14_10.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %.loc14_10.4(%.loc14_10.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_10.5: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_10.6: %i32 = converted %.loc14_10.1, %.loc14_10.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_10.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_10.3: = bound_method %.loc14_10.1, %.loc14_10.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_10.4: = specific_function %.loc14_10.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %.loc14_10.4(%.loc14_10.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_10.5: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_10.6: %i32 = converted %.loc14_10.1, %.loc14_10.5 [template = constants.%.33] // CHECK:STDOUT: %Foo.call: init %empty_tuple.type = call %Foo.ref(%.loc14_7.6, %.loc14_10.6) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index cdd0a4754c14..deee6bd4d21a 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -32,13 +32,13 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,34 +89,34 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc14_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc14_10.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_10.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_10.3: = bound_method %.loc14_10.1, %.loc14_10.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_10.4: = specific_function %.loc14_10.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %.loc14_10.4(%.loc14_10.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_10.5: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_10.6: %i32 = converted %.loc14_10.1, %.loc14_10.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_7.3: = bound_method %.loc14_7.1, %.loc14_7.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc14_7.4: = specific_function %.loc14_7.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %.loc14_7.4(%.loc14_7.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_7.5: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_7.6: %i32 = converted %.loc14_7.1, %.loc14_7.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_10.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_10.3: = bound_method %.loc14_10.1, %.loc14_10.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_10.4: = specific_function %.loc14_10.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %.loc14_10.4(%.loc14_10.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_10.5: %i32 = value_of_initializer %int.convert_checked.loc14_10 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_10.6: %i32 = converted %.loc14_10.1, %.loc14_10.5 [template = constants.%.33] // CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.6, %.loc14_10.6) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %.loc15_7.1: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc15_10.1: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc15_7.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_7.3: = bound_method %.loc15_7.1, %.loc15_7.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc15_7.4: = specific_function %.loc15_7.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %.loc15_7.4(%.loc15_7.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc15_7.5: %i32 = value_of_initializer %int.convert_checked.loc15_7 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_7.6: %i32 = converted %.loc15_7.1, %.loc15_7.5 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_10.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_10.3: = bound_method %.loc15_10.1, %.loc15_10.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_10.4: = specific_function %.loc15_10.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15_10: init %i32 = call %.loc15_10.4(%.loc15_10.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_10.5: %i32 = value_of_initializer %int.convert_checked.loc15_10 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_10.6: %i32 = converted %.loc15_10.1, %.loc15_10.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_7.3: = bound_method %.loc15_7.1, %.loc15_7.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc15_7.4: = specific_function %.loc15_7.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %.loc15_7.4(%.loc15_7.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc15_7.5: %i32 = value_of_initializer %int.convert_checked.loc15_7 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_7.6: %i32 = converted %.loc15_7.1, %.loc15_7.5 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_10.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_10.3: = bound_method %.loc15_10.1, %.loc15_10.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_10.4: = specific_function %.loc15_10.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc15_10: init %i32 = call %.loc15_10.4(%.loc15_10.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_10.5: %i32 = value_of_initializer %int.convert_checked.loc15_10 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_10.6: %i32 = converted %.loc15_10.1, %.loc15_10.5 [template = constants.%.33] // CHECK:STDOUT: %Foo.call.loc15: init %empty_tuple.type = call %Foo.ref.loc15(%.loc15_7.6, %.loc15_10.6) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index a2061be7699f..d73354d22d9d 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -469,16 +469,16 @@ import library "extern_api"; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.25) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -533,9 +533,9 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] // CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed.loc8, %.loc8_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: %i32} [template = constants.%.26] -// CHECK:STDOUT: %c.var: ref %.26 = var c -// CHECK:STDOUT: %c: ref %.26 = bind_name c, %c.var +// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: %i32} [template = constants.%.30] +// CHECK:STDOUT: %c.var: ref %.30 = var c +// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var // CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -550,7 +550,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.26; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.30; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -563,26 +563,26 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc7_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_16.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_16.3: = bound_method %.loc7_16.1, %.loc7_16.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc7_16.4: = specific_function %.loc7_16.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %.loc7_16.4(%.loc7_16.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc7_16.5: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%.25] -// CHECK:STDOUT: %.loc7_16.6: %i32 = converted %.loc7_16.1, %.loc7_16.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc7_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_16.3: = bound_method %.loc7_16.1, %.loc7_16.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc7_16.4: = specific_function %.loc7_16.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %.loc7_16.4(%.loc7_16.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc7_16.5: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%.29] +// CHECK:STDOUT: %.loc7_16.6: %i32 = converted %.loc7_16.1, %.loc7_16.5 [template = constants.%.29] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc7_16.6) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc8_23: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_23, %.loc8_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_25.4(%.loc8_23) [template = constants.%.25] -// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.25] -// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_23, %.loc8_25.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_23, %.loc8_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_25.4(%.loc8_23) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_23, %.loc8_25.5 [template = constants.%.29] // CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc8_25.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc8_25.7: %tuple.type.1 = converted %.loc8_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.26 = call %C.ref(%.loc8_25.7) +// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc8_25.7) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() @@ -619,12 +619,12 @@ import library "extern_api"; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.26) [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.30) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -734,23 +734,23 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc53_16.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc53_16.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc53_16.3: = bound_method %.loc53_16.1, %.loc53_16.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc53_16.4: = specific_function %.loc53_16.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_16.4(%.loc53_16.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc53_16.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.26] -// CHECK:STDOUT: %.loc53_16.6: %i32 = converted %.loc53_16.1, %.loc53_16.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc53_16.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc53_16.3: = bound_method %.loc53_16.1, %.loc53_16.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc53_16.4: = specific_function %.loc53_16.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_16.4(%.loc53_16.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc53_16.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.30] +// CHECK:STDOUT: %.loc53_16.6: %i32 = converted %.loc53_16.1, %.loc53_16.5 [template = constants.%.30] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc53_16.6) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc54_23: Core.IntLiteral = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.3 = tuple_literal (%.loc54_23) -// CHECK:STDOUT: %.loc54_25.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc54_25.3: = bound_method %.loc54_23, %.loc54_25.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc54_25.4: = specific_function %.loc54_25.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %.loc54_25.4(%.loc54_23) [template = constants.%.26] -// CHECK:STDOUT: %.loc54_25.5: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%.26] -// CHECK:STDOUT: %.loc54_25.6: %i32 = converted %.loc54_23, %.loc54_25.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc54_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc54_25.3: = bound_method %.loc54_23, %.loc54_25.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc54_25.4: = specific_function %.loc54_25.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %.loc54_25.4(%.loc54_23) [template = constants.%.30] +// CHECK:STDOUT: %.loc54_25.5: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%.30] +// CHECK:STDOUT: %.loc54_25.6: %i32 = converted %.loc54_23, %.loc54_25.5 [template = constants.%.30] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc54_25.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc54_25.7: %tuple.type.2 = converted %.loc54_25.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc54_25.7) @@ -790,12 +790,12 @@ import library "extern_api"; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.26) [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.30) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -905,23 +905,23 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc13_16.1: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_16.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_16.3: = bound_method %.loc13_16.1, %.loc13_16.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_16.4: = specific_function %.loc13_16.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_16.4(%.loc13_16.1) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_16.5: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_16.6: %i32 = converted %.loc13_16.1, %.loc13_16.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_16.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_16.3: = bound_method %.loc13_16.1, %.loc13_16.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_16.4: = specific_function %.loc13_16.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_16.4(%.loc13_16.1) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_16.5: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_16.6: %i32 = converted %.loc13_16.1, %.loc13_16.5 [template = constants.%.30] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc13_16.6) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc14_23: Core.IntLiteral = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %.loc14_25.1: %tuple.type.3 = tuple_literal (%.loc14_23) -// CHECK:STDOUT: %.loc14_25.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_25.3: = bound_method %.loc14_23, %.loc14_25.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc14_25.4: = specific_function %.loc14_25.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_25.4(%.loc14_23) [template = constants.%.26] -// CHECK:STDOUT: %.loc14_25.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_25.6: %i32 = converted %.loc14_23, %.loc14_25.5 [template = constants.%.26] +// CHECK:STDOUT: %.loc14_25.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_25.3: = bound_method %.loc14_23, %.loc14_25.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc14_25.4: = specific_function %.loc14_25.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_25.4(%.loc14_23) [template = constants.%.30] +// CHECK:STDOUT: %.loc14_25.5: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_25.6: %i32 = converted %.loc14_23, %.loc14_25.5 [template = constants.%.30] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc14_25.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc14_25.7: %tuple.type.2 = converted %.loc14_25.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C.call: init %.2 = call %C.ref(%.loc14_25.7) @@ -952,16 +952,16 @@ import library "extern_api"; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.25) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -1016,9 +1016,9 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_signed.loc54: init type = call constants.%Int(%.loc54_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc54_13.2: type = value_of_initializer %int.make_type_signed.loc54 [template = constants.%i32] // CHECK:STDOUT: %.loc54_13.3: type = converted %int.make_type_signed.loc54, %.loc54_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: %i32} [template = constants.%.26] -// CHECK:STDOUT: %c.var: ref %.26 = var c -// CHECK:STDOUT: %c: ref %.26 = bind_name c, %c.var +// CHECK:STDOUT: %.loc54_16: type = struct_type {.c: %i32} [template = constants.%.30] +// CHECK:STDOUT: %c.var: ref %.30 = var c +// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var // CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -1033,7 +1033,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.26; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.30; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1046,26 +1046,26 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc53_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc53_16.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc53_16.3: = bound_method %.loc53_16.1, %.loc53_16.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc53_16.4: = specific_function %.loc53_16.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_16.4(%.loc53_16.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc53_16.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.25] -// CHECK:STDOUT: %.loc53_16.6: %i32 = converted %.loc53_16.1, %.loc53_16.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc53_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc53_16.3: = bound_method %.loc53_16.1, %.loc53_16.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc53_16.4: = specific_function %.loc53_16.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_16.4(%.loc53_16.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc53_16.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.29] +// CHECK:STDOUT: %.loc53_16.6: %i32 = converted %.loc53_16.1, %.loc53_16.5 [template = constants.%.29] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc53_16.6) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc54_23: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.2 = tuple_literal (%.loc54_23) -// CHECK:STDOUT: %.loc54_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc54_25.3: = bound_method %.loc54_23, %.loc54_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc54_25.4: = specific_function %.loc54_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %.loc54_25.4(%.loc54_23) [template = constants.%.25] -// CHECK:STDOUT: %.loc54_25.5: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%.25] -// CHECK:STDOUT: %.loc54_25.6: %i32 = converted %.loc54_23, %.loc54_25.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc54_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc54_25.3: = bound_method %.loc54_23, %.loc54_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc54_25.4: = specific_function %.loc54_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %.loc54_25.4(%.loc54_23) [template = constants.%.29] +// CHECK:STDOUT: %.loc54_25.5: %i32 = value_of_initializer %int.convert_checked.loc54 [template = constants.%.29] +// CHECK:STDOUT: %.loc54_25.6: %i32 = converted %.loc54_23, %.loc54_25.5 [template = constants.%.29] // CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc54_25.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc54_25.7: %tuple.type.1 = converted %.loc54_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.26 = call %C.ref(%.loc54_25.7) +// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc54_25.7) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() @@ -1093,16 +1093,16 @@ import library "extern_api"; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.25) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] // CHECK:STDOUT: %D: %D.type = struct_value () [template] // CHECK:STDOUT: %E.type: type = fn_type @E [template] @@ -1157,9 +1157,9 @@ import library "extern_api"; // CHECK:STDOUT: %int.make_type_signed.loc53: init type = call constants.%Int(%.loc53_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc53_13.2: type = value_of_initializer %int.make_type_signed.loc53 [template = constants.%i32] // CHECK:STDOUT: %.loc53_13.3: type = converted %int.make_type_signed.loc53, %.loc53_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc53_16: type = struct_type {.c: %i32} [template = constants.%.26] -// CHECK:STDOUT: %c.var: ref %.26 = var c -// CHECK:STDOUT: %c: ref %.26 = bind_name c, %c.var +// CHECK:STDOUT: %.loc53_16: type = struct_type {.c: %i32} [template = constants.%.30] +// CHECK:STDOUT: %c.var: ref %.30 = var c +// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var // CHECK:STDOUT: %.loc54_9.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc54_9.2: type = converted %.loc54_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d @@ -1174,7 +1174,7 @@ import library "extern_api"; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.1) -> %.26; +// CHECK:STDOUT: extern fn @C(%c.param_patt: %tuple.type.1) -> %.30; // CHECK:STDOUT: // CHECK:STDOUT: extern fn @D(); // CHECK:STDOUT: @@ -1187,26 +1187,26 @@ import library "extern_api"; // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc52_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc52_16.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc52_16.3: = bound_method %.loc52_16.1, %.loc52_16.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc52_16.4: = specific_function %.loc52_16.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc52: init %i32 = call %.loc52_16.4(%.loc52_16.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc52_16.5: %i32 = value_of_initializer %int.convert_checked.loc52 [template = constants.%.25] -// CHECK:STDOUT: %.loc52_16.6: %i32 = converted %.loc52_16.1, %.loc52_16.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc52_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc52_16.3: = bound_method %.loc52_16.1, %.loc52_16.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc52_16.4: = specific_function %.loc52_16.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc52: init %i32 = call %.loc52_16.4(%.loc52_16.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc52_16.5: %i32 = value_of_initializer %int.convert_checked.loc52 [template = constants.%.29] +// CHECK:STDOUT: %.loc52_16.6: %i32 = converted %.loc52_16.1, %.loc52_16.5 [template = constants.%.29] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc52_16.6) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc53_23: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc53_25.1: %tuple.type.2 = tuple_literal (%.loc53_23) -// CHECK:STDOUT: %.loc53_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc53_25.3: = bound_method %.loc53_23, %.loc53_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc53_25.4: = specific_function %.loc53_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_25.4(%.loc53_23) [template = constants.%.25] -// CHECK:STDOUT: %.loc53_25.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.25] -// CHECK:STDOUT: %.loc53_25.6: %i32 = converted %.loc53_23, %.loc53_25.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc53_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc53_25.3: = bound_method %.loc53_23, %.loc53_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc53_25.4: = specific_function %.loc53_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %.loc53_25.4(%.loc53_23) [template = constants.%.29] +// CHECK:STDOUT: %.loc53_25.5: %i32 = value_of_initializer %int.convert_checked.loc53 [template = constants.%.29] +// CHECK:STDOUT: %.loc53_25.6: %i32 = converted %.loc53_23, %.loc53_25.5 [template = constants.%.29] // CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc53_25.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc53_25.7: %tuple.type.1 = converted %.loc53_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.26 = call %C.ref(%.loc53_25.7) +// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc53_25.7) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: %D.ref: %D.type = name_ref D, imports.%import_ref.4 [template = constants.%D] // CHECK:STDOUT: %D.call: init %empty_tuple.type = call %D.ref() diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index d1d235de90bc..113a6383855f 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -257,16 +257,16 @@ fn D() {} // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: type = struct_type {.c: %i32} [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: type = struct_type {.c: %i32} [template] // CHECK:STDOUT: %C.type: type = fn_type @C [template] // CHECK:STDOUT: %C: %C.type = struct_value () [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.25) [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -309,16 +309,16 @@ fn D() {} // CHECK:STDOUT: %int.make_type_signed.loc8: init type = call constants.%Int(%.loc8_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc8_13.2: type = value_of_initializer %int.make_type_signed.loc8 [template = constants.%i32] // CHECK:STDOUT: %.loc8_13.3: type = converted %int.make_type_signed.loc8, %.loc8_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: %i32} [template = constants.%.26] -// CHECK:STDOUT: %c.var: ref %.26 = var c -// CHECK:STDOUT: %c: ref %.26 = bind_name c, %c.var +// CHECK:STDOUT: %.loc8_16: type = struct_type {.c: %i32} [template = constants.%.30] +// CHECK:STDOUT: %c.var: ref %.30 = var c +// CHECK:STDOUT: %c: ref %.30 = bind_name c, %c.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @A(); // CHECK:STDOUT: // CHECK:STDOUT: fn @B(%b.param_patt: %i32) -> %i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.26; +// CHECK:STDOUT: fn @C(%c.param_patt: %tuple.type.1) -> %.30; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: @@ -327,26 +327,26 @@ fn D() {} // CHECK:STDOUT: assign file.%a.var, %A.call // CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B] // CHECK:STDOUT: %.loc7_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc7_16.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_16.3: = bound_method %.loc7_16.1, %.loc7_16.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc7_16.4: = specific_function %.loc7_16.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %.loc7_16.4(%.loc7_16.1) [template = constants.%.25] -// CHECK:STDOUT: %.loc7_16.5: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%.25] -// CHECK:STDOUT: %.loc7_16.6: %i32 = converted %.loc7_16.1, %.loc7_16.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc7_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_16.3: = bound_method %.loc7_16.1, %.loc7_16.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc7_16.4: = specific_function %.loc7_16.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %.loc7_16.4(%.loc7_16.1) [template = constants.%.29] +// CHECK:STDOUT: %.loc7_16.5: %i32 = value_of_initializer %int.convert_checked.loc7 [template = constants.%.29] +// CHECK:STDOUT: %.loc7_16.6: %i32 = converted %.loc7_16.1, %.loc7_16.5 [template = constants.%.29] // CHECK:STDOUT: %B.call: init %i32 = call %B.ref(%.loc7_16.6) // CHECK:STDOUT: assign file.%b.var, %B.call // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %.loc8_23: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%.loc8_23) -// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_23, %.loc8_25.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_25.4(%.loc8_23) [template = constants.%.25] -// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.25] -// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_23, %.loc8_25.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc8_25.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc8_25.3: = bound_method %.loc8_23, %.loc8_25.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc8_25.4: = specific_function %.loc8_25.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_25.4(%.loc8_23) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_23, %.loc8_25.5 [template = constants.%.29] // CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc8_25.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc8_25.7: %tuple.type.1 = converted %.loc8_25.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C.call: init %.26 = call %C.ref(%.loc8_25.7) +// CHECK:STDOUT: %C.call: init %.30 = call %C.ref(%.loc8_25.7) // CHECK:STDOUT: assign file.%c.var, %C.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index c7814af59bc3..9313b05d5e0c 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -789,11 +789,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%.3, %.29) [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%.3, %.33) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -853,12 +853,12 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %.loc7_19.1: %tuple.type.3 = tuple_literal (%.loc7_15, %.loc7_18) // CHECK:STDOUT: %.loc7_3: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [template = constants.%.5] -// CHECK:STDOUT: %.loc7_19.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_19.3: = bound_method %.loc7_18, %.loc7_19.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_19.4: = specific_function %.loc7_19.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_19.4(%.loc7_18) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_19.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc7_19.6: %i32 = converted %.loc7_18, %.loc7_19.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc7_19.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_19.3: = bound_method %.loc7_18, %.loc7_19.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_19.4: = specific_function %.loc7_19.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_19.4(%.loc7_18) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_19.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc7_19.6: %i32 = converted %.loc7_18, %.loc7_19.5 [template = constants.%.33] // CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%.loc7_15, %.loc7_19.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc7_19.7: %tuple.type.4 = converted %.loc7_19.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %TupleParam.call: init %empty_tuple.type = call %.loc7_3(%.loc7_19.7) @@ -902,11 +902,11 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.7 = struct_value (%.4, %.32) [template] +// CHECK:STDOUT: %.33: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.7 = struct_value (%.4, %.36) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -965,12 +965,12 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %.loc7_29: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc7_30.1: %.6 = struct_literal (%.loc7_21, %.loc7_29) // CHECK:STDOUT: %.loc7_3: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [template = constants.%.8] -// CHECK:STDOUT: %.loc7_30.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_30.3: = bound_method %.loc7_29, %.loc7_30.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc7_30.4: = specific_function %.loc7_30.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_30.4(%.loc7_29) [template = constants.%.32] -// CHECK:STDOUT: %.loc7_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc7_30.6: %i32 = converted %.loc7_29, %.loc7_30.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc7_30.2: %Convert.type.2 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_30.3: = bound_method %.loc7_29, %.loc7_30.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_30.4: = specific_function %.loc7_30.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_30.4(%.loc7_29) [template = constants.%.36] +// CHECK:STDOUT: %.loc7_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.36] +// CHECK:STDOUT: %.loc7_30.6: %i32 = converted %.loc7_29, %.loc7_30.5 [template = constants.%.36] // CHECK:STDOUT: %struct: %.7 = struct_value (%.loc7_21, %.loc7_30.6) [template = constants.%struct] // CHECK:STDOUT: %.loc7_30.7: %.7 = converted %.loc7_30.1, %struct [template = constants.%struct] // CHECK:STDOUT: %StructParam.call: init %empty_tuple.type = call %.loc7_3(%.loc7_30.7) diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index ed6fc023d30d..71e37b25842e 100644 --- a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon @@ -25,10 +25,10 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%.1) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.19: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %.20: = bound_method %N.1, %Convert.13 [symbolic] -// CHECK:STDOUT: %.21: = specific_function %.20, @Convert.4(%.1) [symbolic] -// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.21(%N.1) [symbolic] +// CHECK:STDOUT: %.23: = interface_witness (%Convert.13) [template] +// CHECK:STDOUT: %.24: = bound_method %N.1, %Convert.13 [symbolic] +// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.4(%.1) [symbolic] +// CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %.25(%N.1) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -63,9 +63,9 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.1)] // CHECK:STDOUT: %.loc14_19.2: type = value_of_initializer %int.make_type_signed.loc14_19 [template = constants.%i32] // CHECK:STDOUT: %.loc14_19.3: type = converted %int.make_type_signed.loc14_19, %.loc14_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: %Convert.type.2 = interface_witness_access constants.%.19, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %.loc14_24.2: = bound_method %N.ref, %.loc14_24.1 [symbolic = %.loc14_24.6 (constants.%.20)] -// CHECK:STDOUT: %.loc14_24.3: = specific_function %.loc14_24.2, @Convert.4(constants.%.1) [symbolic = %.loc14_24.7 (constants.%.21)] +// CHECK:STDOUT: %.loc14_24.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %.loc14_24.2: = bound_method %N.ref, %.loc14_24.1 [symbolic = %.loc14_24.6 (constants.%.24)] +// CHECK:STDOUT: %.loc14_24.3: = specific_function %.loc14_24.2, @Convert.4(constants.%.1) [symbolic = %.loc14_24.7 (constants.%.25)] // CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %.loc14_24.3(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc14_24.4: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: %.loc14_24.5: Core.IntLiteral = converted %N.ref, %.loc14_24.4 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] @@ -81,8 +81,8 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: generic fn @F(%N.loc14_6.1: %i32) { // CHECK:STDOUT: %N.loc14_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc14_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc14_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %.loc14_24.6: = bound_method %N.loc14_6.2, constants.%Convert.13 [symbolic = %.loc14_24.6 (constants.%.20)] -// CHECK:STDOUT: %.loc14_24.7: = specific_function %.loc14_24.6, @Convert.4(constants.%.1) [symbolic = %.loc14_24.7 (constants.%.21)] +// CHECK:STDOUT: %.loc14_24.6: = bound_method %N.loc14_6.2, constants.%Convert.13 [symbolic = %.loc14_24.6 (constants.%.24)] +// CHECK:STDOUT: %.loc14_24.7: = specific_function %.loc14_24.6, @Convert.4(constants.%.1) [symbolic = %.loc14_24.7 (constants.%.25)] // CHECK:STDOUT: %int.convert_checked.loc14_24.2: init Core.IntLiteral = call %.loc14_24.7(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: %i32, %a.param_patt: ); @@ -91,8 +91,8 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc14_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc14_6.2 => constants.%N.1 -// CHECK:STDOUT: %.loc14_24.6 => constants.%.20 -// CHECK:STDOUT: %.loc14_24.7 => constants.%.21 +// CHECK:STDOUT: %.loc14_24.6 => constants.%.24 +// CHECK:STDOUT: %.loc14_24.7 => constants.%.25 // CHECK:STDOUT: %int.convert_checked.loc14_24.2 => constants.%int.convert_checked // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 015bbdbda354..789849559ae4 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -67,11 +67,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: = specific_function %Defined, @Defined(%i32) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: = specific_function %Defined, @Defined(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -141,13 +141,13 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_23.1) [template = constants.%i32] // CHECK:STDOUT: %.loc9_23.2: type = value_of_initializer %int.make_type_signed.loc9 [template = constants.%i32] // CHECK:STDOUT: %.loc9_23.3: type = converted %int.make_type_signed.loc9, %.loc9_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc9_20.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_20.2: = bound_method %.loc9_18, %.loc9_20.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc9_20.3: = specific_function %.loc9_20.2, @Convert.7(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_20.3(%.loc9_18) [template = constants.%.25] -// CHECK:STDOUT: %.loc9_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc9_20.5: %i32 = converted %.loc9_18, %.loc9_20.4 [template = constants.%.25] -// CHECK:STDOUT: %.loc9_10: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%.26] +// CHECK:STDOUT: %.loc9_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_20.2: = bound_method %.loc9_18, %.loc9_20.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc9_20.3: = specific_function %.loc9_20.2, @Convert.7(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_20.3(%.loc9_18) [template = constants.%.29] +// CHECK:STDOUT: %.loc9_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc9_20.5: %i32 = converted %.loc9_18, %.loc9_20.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc9_10: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%.30] // CHECK:STDOUT: %Defined.call: init %i32 = call %.loc9_10(%.loc9_20.5) // CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Defined.call // CHECK:STDOUT: %.loc9_27.2: %i32 = converted %Defined.call, %.loc9_27.1 @@ -183,11 +183,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: = specific_function %Defined, @Defined(%i32) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: = specific_function %Defined, @Defined(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -274,13 +274,13 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_23.1) [template = constants.%i32] // CHECK:STDOUT: %.loc7_23.2: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] // CHECK:STDOUT: %.loc7_23.3: type = converted %int.make_type_signed.loc7, %.loc7_23.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_20.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_20.2: = bound_method %.loc7_18, %.loc7_20.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc7_20.3: = specific_function %.loc7_20.2, @Convert.7(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_20.3(%.loc7_18) [template = constants.%.25] -// CHECK:STDOUT: %.loc7_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc7_20.5: %i32 = converted %.loc7_18, %.loc7_20.4 [template = constants.%.25] -// CHECK:STDOUT: %.loc7_10: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%.26] +// CHECK:STDOUT: %.loc7_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_20.2: = bound_method %.loc7_18, %.loc7_20.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc7_20.3: = specific_function %.loc7_20.2, @Convert.7(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_20.3(%.loc7_18) [template = constants.%.29] +// CHECK:STDOUT: %.loc7_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc7_20.5: %i32 = converted %.loc7_18, %.loc7_20.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc7_10: = specific_function %Defined.ref, @Defined(constants.%i32) [template = constants.%.30] // CHECK:STDOUT: %Defined.call: init %i32 = call %.loc7_10(%.loc7_20.5) // CHECK:STDOUT: %.loc7_27.1: %i32 = value_of_initializer %Defined.call // CHECK:STDOUT: %.loc7_27.2: %i32 = converted %Defined.call, %.loc7_27.1 @@ -316,11 +316,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.7(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: = specific_function %Undefined, @Undefined(%i32) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.7(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: = specific_function %Undefined, @Undefined(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -384,13 +384,13 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_25.1) [template = constants.%i32] // CHECK:STDOUT: %.loc13_25.2: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] // CHECK:STDOUT: %.loc13_25.3: type = converted %int.make_type_signed.loc13, %.loc13_25.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_22.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_22.2: = bound_method %.loc13_20, %.loc13_22.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc13_22.3: = specific_function %.loc13_22.2, @Convert.7(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_22.3(%.loc13_20) [template = constants.%.25] -// CHECK:STDOUT: %.loc13_22.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc13_22.5: %i32 = converted %.loc13_20, %.loc13_22.4 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_10: = specific_function %Undefined.ref, @Undefined(constants.%i32) [template = constants.%.26] +// CHECK:STDOUT: %.loc13_22.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_22.2: = bound_method %.loc13_20, %.loc13_22.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_22.3: = specific_function %.loc13_22.2, @Convert.7(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_22.3(%.loc13_20) [template = constants.%.29] +// CHECK:STDOUT: %.loc13_22.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc13_22.5: %i32 = converted %.loc13_20, %.loc13_22.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_10: = specific_function %Undefined.ref, @Undefined(constants.%i32) [template = constants.%.30] // CHECK:STDOUT: %Undefined.call: init %i32 = call %.loc13_10(%.loc13_22.5) // CHECK:STDOUT: %.loc13_29.1: %i32 = value_of_initializer %Undefined.call // CHECK:STDOUT: %.loc13_29.2: %i32 = converted %Undefined.call, %.loc13_29.1 diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index cbc552fa7ada..bb5a8d2b2e4e 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -20,10 +20,10 @@ var a: i32 = 0; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -52,11 +52,11 @@ var a: i32 = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_15.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_15.2: = bound_method %.loc10_14, %.loc10_15.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_15.3: = specific_function %.loc10_15.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_15.3(%.loc10_14) [template = constants.%.25] -// CHECK:STDOUT: %.loc10_15.4: init %i32 = converted %.loc10_14, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc10_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_15.2: = bound_method %.loc10_14, %.loc10_15.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc10_15.3: = specific_function %.loc10_15.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_15.3(%.loc10_14) [template = constants.%.29] +// CHECK:STDOUT: %.loc10_15.4: init %i32 = converted %.loc10_14, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign file.%a.var, %.loc10_15.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index 12f67c828674..ea8e6f1cb5c9 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -27,10 +27,10 @@ var a: i32 = test_a(); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,12 +71,12 @@ var a: i32 = test_a(); // CHECK:STDOUT: fn @test_a() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc12_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index 5f4e49119206..1e3f3ee8b7f7 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -54,16 +54,16 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] // CHECK:STDOUT: %If2: %If2.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] // CHECK:STDOUT: %If3: %If3.type = struct_value () [template] // CHECK:STDOUT: } @@ -149,12 +149,12 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.25] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.29] +// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc13_13.5 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: @@ -172,13 +172,13 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: br !if.done // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc25_12: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc25_13.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_13.2: = bound_method %.loc25_12, %.loc25_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc25_13.3: = specific_function %.loc25_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc25_13.3(%.loc25_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc25_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc25_13.5: %i32 = converted %.loc25_12, %.loc25_13.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc25_12: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc25_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_13.2: = bound_method %.loc25_12, %.loc25_13.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc25_13.3: = specific_function %.loc25_13.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc25_13.3(%.loc25_12) [template = constants.%.33] +// CHECK:STDOUT: %.loc25_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc25_13.5: %i32 = converted %.loc25_12, %.loc25_13.4 [template = constants.%.33] // CHECK:STDOUT: return %.loc25_13.5 // CHECK:STDOUT: // CHECK:STDOUT: !if.done: @@ -191,12 +191,12 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %.loc35_12: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc35_13.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc35_13.2: = bound_method %.loc35_12, %.loc35_13.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc35_13.3: = specific_function %.loc35_13.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc35_13.3(%.loc35_12) [template = constants.%.25] -// CHECK:STDOUT: %.loc35_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc35_13.5: %i32 = converted %.loc35_12, %.loc35_13.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc35_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc35_13.2: = bound_method %.loc35_12, %.loc35_13.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc35_13.3: = specific_function %.loc35_13.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc35_13.3(%.loc35_12) [template = constants.%.29] +// CHECK:STDOUT: %.loc35_13.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc35_13.5: %i32 = converted %.loc35_12, %.loc35_13.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc35_13.5 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 169b15f79c15..77503f69e92b 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -34,10 +34,10 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,11 +89,11 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 2 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_19.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_19.2: = bound_method %.loc13_18, %.loc13_19.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc13_19.3: = specific_function %.loc13_19.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_19.3(%.loc13_18) [template = constants.%.25] -// CHECK:STDOUT: %.loc13_19.4: init %i32 = converted %.loc13_18, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc13_19.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_19.2: = bound_method %.loc13_18, %.loc13_19.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_19.3: = specific_function %.loc13_19.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_19.3(%.loc13_18) [template = constants.%.29] +// CHECK:STDOUT: %.loc13_19.4: init %i32 = converted %.loc13_18, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %n.var, %.loc13_19.4 // CHECK:STDOUT: %n.ref.loc14: ref %i32 = name_ref n, %n // CHECK:STDOUT: %.loc14: %i32 = bind_value %n.ref.loc14 diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index fe6ef2ee3587..5e2b80244347 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -32,14 +32,14 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,22 +85,22 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %.loc13_12: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.25] -// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc13_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_13.2: = bound_method %.loc13_12, %.loc13_13.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_13.3: = specific_function %.loc13_13.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_13.3(%.loc13_12) [template = constants.%.29] +// CHECK:STDOUT: %.loc13_13.4: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_13.5: %i32 = converted %.loc13_12, %.loc13_13.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc13_13.5 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc15_12: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_13.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_13.2: = bound_method %.loc15_12, %.loc15_13.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc15_13.3: = specific_function %.loc15_13.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_13.3(%.loc15_12) [template = constants.%.29] -// CHECK:STDOUT: %.loc15_13.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] -// CHECK:STDOUT: %.loc15_13.5: %i32 = converted %.loc15_12, %.loc15_13.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_12: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_13.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_13.2: = bound_method %.loc15_12, %.loc15_13.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_13.3: = specific_function %.loc15_13.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_13.3(%.loc15_12) [template = constants.%.33] +// CHECK:STDOUT: %.loc15_13.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.33] +// CHECK:STDOUT: %.loc15_13.5: %i32 = converted %.loc15_12, %.loc15_13.4 [template = constants.%.33] // CHECK:STDOUT: return %.loc15_13.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 8bceb4b1fbe5..f9a788e55bac 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -31,11 +31,11 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 0 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.28) [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 0 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -102,14 +102,14 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var // CHECK:STDOUT: %.loc12_22: Core.IntLiteral = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc12_24.1: %tuple.type = tuple_literal (%.loc12_22) -// CHECK:STDOUT: %.loc12_24.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_24.3: = bound_method %.loc12_22, %.loc12_24.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_24.4: = specific_function %.loc12_24.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_24.4(%.loc12_22) [template = constants.%.28] -// CHECK:STDOUT: %.loc12_24.5: init %i32 = converted %.loc12_22, %int.convert_checked [template = constants.%.28] +// CHECK:STDOUT: %.loc12_24.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_24.3: = bound_method %.loc12_22, %.loc12_24.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_24.4: = specific_function %.loc12_24.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_24.4(%.loc12_22) [template = constants.%.32] +// CHECK:STDOUT: %.loc12_24.5: init %i32 = converted %.loc12_22, %int.convert_checked [template = constants.%.32] // CHECK:STDOUT: %.loc12_24.6: Core.IntLiteral = int_value 0 [template = constants.%.5] // CHECK:STDOUT: %.loc12_24.7: ref %i32 = array_index %x.var, %.loc12_24.6 -// CHECK:STDOUT: %.loc12_24.8: init %i32 = initialize_from %.loc12_24.5 to %.loc12_24.7 [template = constants.%.28] +// CHECK:STDOUT: %.loc12_24.8: init %i32 = initialize_from %.loc12_24.5 to %.loc12_24.7 [template = constants.%.32] // CHECK:STDOUT: %.loc12_24.9: init %.3 = array_init (%.loc12_24.8) to %x.var [template = constants.%array] // CHECK:STDOUT: %.loc12_25: init %.3 = converted %.loc12_24.1, %.loc12_24.9 [template = constants.%array] // CHECK:STDOUT: assign %x.var, %.loc12_25 diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 9e28c1b501e7..0054b024ac09 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -44,25 +44,25 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.30: bool = bool_literal true [template] +// CHECK:STDOUT: %.34: bool = bool_literal true [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.31: bool = bool_literal false [template] +// CHECK:STDOUT: %.35: bool = bool_literal false [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %.32: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.36: type = ptr_type %i32 [template] // CHECK:STDOUT: %PartiallyConstant.type: type = fn_type @PartiallyConstant [template] // CHECK:STDOUT: %PartiallyConstant: %PartiallyConstant.type = struct_value () [template] // CHECK:STDOUT: } @@ -162,30 +162,30 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc11_25.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_24: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_24, %.loc12_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_25.3(%.loc12_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_24, %.loc12_25.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_24: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_24, %.loc12_25.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_25.3(%.loc12_24) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_24, %.loc12_25.4 [template = constants.%.33] // CHECK:STDOUT: return %.loc12_25.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_13: bool = bool_literal true [template = constants.%.30] +// CHECK:STDOUT: %.loc15_13: bool = bool_literal true [template = constants.%.34] // CHECK:STDOUT: if %.loc15_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -209,7 +209,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc19_13: bool = bool_literal false [template = constants.%.31] +// CHECK:STDOUT: %.loc19_13: bool = bool_literal false [template = constants.%.35] // CHECK:STDOUT: if %.loc19_13 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -233,7 +233,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc23_13: bool = bool_literal true [template = constants.%.30] +// CHECK:STDOUT: %.loc23_13: bool = bool_literal true [template = constants.%.34] // CHECK:STDOUT: if %.loc23_13 br !if.expr.then.loc23 else br !if.expr.else.loc23 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc23: @@ -248,7 +248,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc23_32: init type = call constants.%Int(%.loc23_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_35.1: type = value_of_initializer %int.make_type_signed.loc23_32 [template = constants.%i32] // CHECK:STDOUT: %.loc23_35.2: type = converted %int.make_type_signed.loc23_32, %.loc23_35.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_35.3: type = ptr_type %i32 [template = constants.%.32] +// CHECK:STDOUT: %.loc23_35.3: type = ptr_type %i32 [template = constants.%.36] // CHECK:STDOUT: br !if.expr.result.loc23(%.loc23_35.3) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc23: @@ -256,13 +256,13 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc23_39: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_40.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_40.2: = bound_method %.loc23_39, %.loc23_40.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc23_40.3: = specific_function %.loc23_40.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc23_40.3(%.loc23_39) [template = constants.%.25] -// CHECK:STDOUT: %.loc23_40.4: init %i32 = converted %.loc23_39, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc23_40.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc23_40.2: = bound_method %.loc23_39, %.loc23_40.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc23_40.3: = specific_function %.loc23_40.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc23_40.3(%.loc23_39) [template = constants.%.29] +// CHECK:STDOUT: %.loc23_40.4: init %i32 = converted %.loc23_39, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %v.var, %.loc23_40.4 -// CHECK:STDOUT: %.loc24_13: bool = bool_literal false [template = constants.%.31] +// CHECK:STDOUT: %.loc24_13: bool = bool_literal false [template = constants.%.35] // CHECK:STDOUT: if %.loc24_13 br !if.expr.then.loc24 else br !if.expr.else.loc24 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc24: @@ -277,18 +277,18 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc24_33: init type = call constants.%Int(%.loc24_33) [template = constants.%i32] // CHECK:STDOUT: %.loc24_36.1: type = value_of_initializer %int.make_type_signed.loc24_33 [template = constants.%i32] // CHECK:STDOUT: %.loc24_36.2: type = converted %int.make_type_signed.loc24_33, %.loc24_36.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc24_36.3: type = ptr_type %i32 [template = constants.%.32] +// CHECK:STDOUT: %.loc24_36.3: type = ptr_type %i32 [template = constants.%.36] // CHECK:STDOUT: br !if.expr.result.loc24(%.loc24_36.3) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc24: -// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%.32] -// CHECK:STDOUT: %w.var: ref %.32 = var w -// CHECK:STDOUT: %w: ref %.32 = bind_name w, %w.var +// CHECK:STDOUT: %.loc24_10: type = block_arg !if.expr.result.loc24 [template = constants.%.36] +// CHECK:STDOUT: %w.var: ref %.36 = var w +// CHECK:STDOUT: %w: ref %.36 = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %.loc24_40: %.32 = addr_of %v.ref +// CHECK:STDOUT: %.loc24_40: %.36 = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %.loc24_40 -// CHECK:STDOUT: %w.ref: ref %.32 = name_ref w, %w -// CHECK:STDOUT: %.loc25_11: %.32 = bind_value %w.ref +// CHECK:STDOUT: %w.ref: ref %.36 = name_ref w, %w +// CHECK:STDOUT: %.loc25_11: %.36 = bind_value %w.ref // CHECK:STDOUT: %.loc25_10.1: ref %i32 = deref %.loc25_11 // CHECK:STDOUT: %.loc25_10.2: %i32 = bind_value %.loc25_10.1 // CHECK:STDOUT: return %.loc25_10.2 @@ -296,7 +296,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartiallyConstant(%t.param_patt: type) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc29_13: bool = bool_literal true [template = constants.%.30] +// CHECK:STDOUT: %.loc29_13: bool = bool_literal true [template = constants.%.34] // CHECK:STDOUT: if %.loc29_13 br !if.expr.then.loc29 else br !if.expr.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc29: @@ -315,13 +315,13 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc29_36: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc29_37.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_37.2: = bound_method %.loc29_36, %.loc29_37.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc29_37.3: = specific_function %.loc29_37.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc29_37.3(%.loc29_36) [template = constants.%.25] -// CHECK:STDOUT: %.loc29_37.4: init %i32 = converted %.loc29_36, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc29_37.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc29_37.2: = bound_method %.loc29_36, %.loc29_37.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc29_37.3: = specific_function %.loc29_37.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc29_37.3(%.loc29_36) [template = constants.%.29] +// CHECK:STDOUT: %.loc29_37.4: init %i32 = converted %.loc29_36, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %v.var, %.loc29_37.4 -// CHECK:STDOUT: %.loc30_13: bool = bool_literal false [template = constants.%.31] +// CHECK:STDOUT: %.loc30_13: bool = bool_literal false [template = constants.%.35] // CHECK:STDOUT: if %.loc30_13 br !if.expr.then.loc30 else br !if.expr.else.loc30 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc30: @@ -333,18 +333,18 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %int.make_type_signed.loc30: init type = call constants.%Int(%.loc30_31) [template = constants.%i32] // CHECK:STDOUT: %.loc30_34.1: type = value_of_initializer %int.make_type_signed.loc30 [template = constants.%i32] // CHECK:STDOUT: %.loc30_34.2: type = converted %int.make_type_signed.loc30, %.loc30_34.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc30_34.3: type = ptr_type %i32 [template = constants.%.32] +// CHECK:STDOUT: %.loc30_34.3: type = ptr_type %i32 [template = constants.%.36] // CHECK:STDOUT: br !if.expr.result.loc30(%.loc30_34.3) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc30: -// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%.32] -// CHECK:STDOUT: %w.var: ref %.32 = var w -// CHECK:STDOUT: %w: ref %.32 = bind_name w, %w.var +// CHECK:STDOUT: %.loc30_10: type = block_arg !if.expr.result.loc30 [template = constants.%.36] +// CHECK:STDOUT: %w.var: ref %.36 = var w +// CHECK:STDOUT: %w: ref %.36 = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v -// CHECK:STDOUT: %.loc30_38: %.32 = addr_of %v.ref +// CHECK:STDOUT: %.loc30_38: %.36 = addr_of %v.ref // CHECK:STDOUT: assign %w.var, %.loc30_38 -// CHECK:STDOUT: %w.ref: ref %.32 = name_ref w, %w -// CHECK:STDOUT: %.loc31_11: %.32 = bind_value %w.ref +// CHECK:STDOUT: %w.ref: ref %.36 = name_ref w, %w +// CHECK:STDOUT: %.loc31_11: %.36 = bind_value %w.ref // CHECK:STDOUT: %.loc31_10.1: ref %i32 = deref %.loc31_11 // CHECK:STDOUT: %.loc31_10.2: %i32 = bind_value %.loc31_10.1 // CHECK:STDOUT: return %.loc31_10.2 diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 1e8dd3b1f77b..a55c9c336e1e 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -28,16 +28,16 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -107,24 +107,24 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc11_25.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_24: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_24, %.loc12_25.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_25.3(%.loc12_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] -// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_24, %.loc12_25.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_24: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_24, %.loc12_25.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_25.3(%.loc12_24) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.33] +// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_24, %.loc12_25.4 [template = constants.%.33] // CHECK:STDOUT: return %.loc12_25.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 3d0b9ba16453..c991fd0da9a0 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -78,7 +78,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .n = .inst+407.loc37_8 +// CHECK:STDOUT: .n = .inst+413.loc37_8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index ea00d5bf77f0..af900e09955e 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -27,22 +27,22 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] // CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -106,22 +106,22 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12_20: // CHECK:STDOUT: %.loc12_30: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_30, %.loc12_25.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12_25: init %i32 = call %.loc12_25.3(%.loc12_30) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_30, %.loc12_25.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_25.2: = bound_method %.loc12_30, %.loc12_25.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_25.3: = specific_function %.loc12_25.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12_25: init %i32 = call %.loc12_25.3(%.loc12_30) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_25.4: %i32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_25.5: %i32 = converted %.loc12_30, %.loc12_25.4 [template = constants.%.29] // CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_25.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_20: -// CHECK:STDOUT: %.loc12_37: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_32.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_32.2: = bound_method %.loc12_37, %.loc12_32.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_32.3: = specific_function %.loc12_32.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.3(%.loc12_37) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_32.4: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_32.5: %i32 = converted %.loc12_37, %.loc12_32.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_37: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_32.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_32.2: = bound_method %.loc12_37, %.loc12_32.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_32.3: = specific_function %.loc12_32.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.3(%.loc12_37) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_32.4: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_32.5: %i32 = converted %.loc12_37, %.loc12_32.4 [template = constants.%.33] // CHECK:STDOUT: br !if.expr.result.loc12_20(%.loc12_32.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12_20: @@ -133,23 +133,23 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: if %c.ref br !if.expr.then.loc12_44 else br !if.expr.else.loc12_44 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc12_44: -// CHECK:STDOUT: %.loc12_54: Core.IntLiteral = int_value 3 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_49.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_49.2: = bound_method %.loc12_54, %.loc12_49.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_49.3: = specific_function %.loc12_49.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc12_49: init %i32 = call %.loc12_49.3(%.loc12_54) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_49.4: %i32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%.33] -// CHECK:STDOUT: %.loc12_49.5: %i32 = converted %.loc12_54, %.loc12_49.4 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_54: Core.IntLiteral = int_value 3 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_49.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_49.2: = bound_method %.loc12_54, %.loc12_49.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_49.3: = specific_function %.loc12_49.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc12_49: init %i32 = call %.loc12_49.3(%.loc12_54) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_49.4: %i32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_49.5: %i32 = converted %.loc12_54, %.loc12_49.4 [template = constants.%.37] // CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_49.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_44: -// CHECK:STDOUT: %.loc12_61: Core.IntLiteral = int_value 4 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_56.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_56.2: = bound_method %.loc12_61, %.loc12_56.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_56.3: = specific_function %.loc12_56.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12_56: init %i32 = call %.loc12_56.3(%.loc12_61) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_56.4: %i32 = value_of_initializer %int.convert_checked.loc12_56 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_56.5: %i32 = converted %.loc12_61, %.loc12_56.4 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_61: Core.IntLiteral = int_value 4 [template = constants.%.38] +// CHECK:STDOUT: %.loc12_56.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_56.2: = bound_method %.loc12_61, %.loc12_56.1 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_56.3: = specific_function %.loc12_56.2, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc12_56: init %i32 = call %.loc12_56.3(%.loc12_61) [template = constants.%.41] +// CHECK:STDOUT: %.loc12_56.4: %i32 = value_of_initializer %int.convert_checked.loc12_56 [template = constants.%.41] +// CHECK:STDOUT: %.loc12_56.5: %i32 = converted %.loc12_61, %.loc12_56.4 [template = constants.%.41] // CHECK:STDOUT: br !if.expr.result.loc12_44(%.loc12_56.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc12_44: diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 7ae25d97568a..80a2cd0948d3 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -36,14 +36,14 @@ fn F(cond: bool) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.29, %.32) [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -109,20 +109,20 @@ fn F(cond: bool) { // CHECK:STDOUT: %.loc14_37: Core.IntLiteral = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc14_45: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc14_46.1: %.6 = struct_literal (%.loc14_37, %.loc14_45) -// CHECK:STDOUT: %.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_46.3: = bound_method %.loc14_37, %.loc14_46.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_46.4: = specific_function %.loc14_46.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_46.1: init %i32 = call %.loc14_46.4(%.loc14_37) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_46.5: init %i32 = converted %.loc14_37, %int.convert_checked.loc14_46.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_46.3: = bound_method %.loc14_37, %.loc14_46.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_46.4: = specific_function %.loc14_46.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc14_46.1: init %i32 = call %.loc14_46.4(%.loc14_37) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_46.5: init %i32 = converted %.loc14_37, %int.convert_checked.loc14_46.1 [template = constants.%.33] // CHECK:STDOUT: %.loc14_46.6: ref %i32 = struct_access %a.var, element0 -// CHECK:STDOUT: %.loc14_46.7: init %i32 = initialize_from %.loc14_46.5 to %.loc14_46.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_46.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_46.9: = bound_method %.loc14_45, %.loc14_46.8 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_46.10: = specific_function %.loc14_46.9, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc14_46.2: init %i32 = call %.loc14_46.10(%.loc14_45) [template = constants.%.32] -// CHECK:STDOUT: %.loc14_46.11: init %i32 = converted %.loc14_45, %int.convert_checked.loc14_46.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_46.7: init %i32 = initialize_from %.loc14_46.5 to %.loc14_46.6 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_46.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_46.9: = bound_method %.loc14_45, %.loc14_46.8 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_46.10: = specific_function %.loc14_46.9, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc14_46.2: init %i32 = call %.loc14_46.10(%.loc14_45) [template = constants.%.36] +// CHECK:STDOUT: %.loc14_46.11: init %i32 = converted %.loc14_45, %int.convert_checked.loc14_46.2 [template = constants.%.36] // CHECK:STDOUT: %.loc14_46.12: ref %i32 = struct_access %a.var, element1 -// CHECK:STDOUT: %.loc14_46.13: init %i32 = initialize_from %.loc14_46.11 to %.loc14_46.12 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_46.13: init %i32 = initialize_from %.loc14_46.11 to %.loc14_46.12 [template = constants.%.36] // CHECK:STDOUT: %.loc14_46.14: init %.2 = struct_init (%.loc14_46.7, %.loc14_46.13) to %a.var [template = constants.%struct] // CHECK:STDOUT: %.loc14_47: init %.2 = converted %.loc14_46.1, %.loc14_46.14 [template = constants.%struct] // CHECK:STDOUT: assign %a.var, %.loc14_47 diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index b22c4d993265..8363d6d15a9a 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -44,24 +44,26 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %F.type.1 [template] // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%F.decl [template] +// CHECK:STDOUT: %.3: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element1, @Simple.%G.decl [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element1, @Simple.%G.decl [template] +// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.6 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.2, %G.2) [template] +// CHECK:STDOUT: %.7: %Simple.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.2, %G.2) [template] // CHECK:STDOUT: %NonInstanceCall.type: type = fn_type @NonInstanceCall [template] // CHECK:STDOUT: %NonInstanceCall: %NonInstanceCall.type = struct_value () [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] -// CHECK:STDOUT: %.7: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.9: type = ptr_type %i32 [template] // CHECK:STDOUT: %NonInstanceCallIndirect.type: type = fn_type @NonInstanceCallIndirect [template] // CHECK:STDOUT: %NonInstanceCallIndirect: %NonInstanceCallIndirect.type = struct_value () [template] // CHECK:STDOUT: %InstanceCallIndirect.type: type = fn_type @InstanceCallIndirect [template] @@ -88,7 +90,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc16_6.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc16_6.1: Core.IntLiteral = int_value 32 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc16_6.1) [template = constants.%i32] // CHECK:STDOUT: %.loc16_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc16_6.3: type = converted %int.make_type_signed, %.loc16_6.2 [template = constants.%i32] @@ -98,7 +100,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_23.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc21_23.1: Core.IntLiteral = int_value 32 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc21_23.1) [template = constants.%i32] // CHECK:STDOUT: %.loc21_23.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc21_23.3: type = converted %int.make_type_signed, %.loc21_23.2 [template = constants.%i32] @@ -109,7 +111,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc25_20.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc25_20.1: Core.IntLiteral = int_value 32 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc25_20.1) [template = constants.%i32] // CHECK:STDOUT: %.loc25_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc25_20.3: type = converted %int.make_type_signed, %.loc25_20.2 [template = constants.%i32] @@ -117,28 +119,28 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_31: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc29_31: Core.IntLiteral = int_value 32 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc29_31) [template = constants.%i32] // CHECK:STDOUT: %.loc29_34.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc29_34.2: type = converted %int.make_type_signed, %.loc29_34.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc29_34.3: type = ptr_type %i32 [template = constants.%.7] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param +// CHECK:STDOUT: %.loc29_34.3: type = ptr_type %i32 [template = constants.%.9] +// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { -// CHECK:STDOUT: %p.patt: %.7 = binding_pattern p -// CHECK:STDOUT: %p.param_patt: %.7 = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: %.9 = binding_pattern p +// CHECK:STDOUT: %p.param_patt: %.9 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc33_28: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc33_28: Core.IntLiteral = int_value 32 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc33_28) [template = constants.%i32] // CHECK:STDOUT: %.loc33_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc33_31.2: type = converted %int.make_type_signed, %.loc33_31.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc33_31.3: type = ptr_type %i32 [template = constants.%.7] -// CHECK:STDOUT: %p.param: %.7 = value_param runtime_param0 -// CHECK:STDOUT: %p: %.7 = bind_name p, %p.param +// CHECK:STDOUT: %.loc33_31.3: type = ptr_type %i32 [template = constants.%.9] +// CHECK:STDOUT: %p.param: %.9 = value_param runtime_param0 +// CHECK:STDOUT: %p: %.9 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -147,16 +149,16 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} // CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %self.patt: @G.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.1.%.loc13_14.1 (%.3) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.1.%.loc13_14.1 (%.3) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref, %.loc13_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @G.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %.loc13_14.1 (constants.%.3)] +// CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref, %.loc13_14.2 [symbolic = %.loc13_14.1 (constants.%.3)] +// CHECK:STDOUT: %self.param: @G.1.%.loc13_14.1 (%.3) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.1.%.loc13_14.1 (%.3) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.3 = assoc_entity element1, %G.decl [template = constants.%.4] +// CHECK:STDOUT: %.loc13: %.4 = assoc_entity element1, %G.decl [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -171,14 +173,14 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_14.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc18_14.1: Core.IntLiteral = int_value 32 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc18_14.1) [template = constants.%i32] // CHECK:STDOUT: %.loc18_14.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc18_14.3: type = converted %int.make_type_signed, %.loc18_14.2 [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc16_20: = interface_witness (%F.decl, %G.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -193,8 +195,9 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc13_14.1: type = facet_access_type %Self [symbolic = %.loc13_14.1 (constants.%.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self (%Self)](); +// CHECK:STDOUT: fn[%self.param_patt: @G.1.%.loc13_14.1 (%.3)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(); @@ -206,7 +209,7 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Simple.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc22() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -215,31 +218,31 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc13 [template = constants.%.4] -// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.6, element1 [template = constants.%G.2] +// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] +// CHECK:STDOUT: %.loc26_4.1: %G.type.1 = interface_witness_access constants.%.8, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc26_4.2: = bound_method %n.ref, %.loc26_4.1 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc26_4.2(%n.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p.param_patt: %.7) { +// CHECK:STDOUT: fn @NonInstanceCallIndirect(%p.param_patt: %.9) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: %F.ref: %.1 = name_ref F, @Simple.%.loc12 [template = constants.%.2] // CHECK:STDOUT: %.loc30_4.1: ref %i32 = deref %p.ref -// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc30_4.2: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc30_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @InstanceCallIndirect(%p.param_patt: %.7) { +// CHECK:STDOUT: fn @InstanceCallIndirect(%p.param_patt: %.9) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %p.ref: %.7 = name_ref p, %p +// CHECK:STDOUT: %p.ref: %.9 = name_ref p, %p // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.3 = name_ref G, @Simple.%.loc13 [template = constants.%.4] +// CHECK:STDOUT: %G.ref: %.4 = name_ref G, @Simple.%.loc13 [template = constants.%.5] // CHECK:STDOUT: %.loc34_4.1: ref %i32 = deref %p.ref -// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.6, element1 [template = constants.%G.2] +// CHECK:STDOUT: %.loc34_4.2: %G.type.1 = interface_witness_access constants.%.8, element1 [template = constants.%G.2] // CHECK:STDOUT: %.loc34_4.3: = bound_method %.loc34_4.1, %.loc34_4.2 // CHECK:STDOUT: %.loc34_4.4: %i32 = bind_value %.loc34_4.1 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc34_4.3(%.loc34_4.4) @@ -250,11 +253,13 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc13_14.1 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%i32) {} +// CHECK:STDOUT: specific @F.1(constants.%.7) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%i32) { -// CHECK:STDOUT: %Self => constants.%i32 +// CHECK:STDOUT: specific @G.1(constants.%.7) { +// CHECK:STDOUT: %Self => constants.%.7 +// CHECK:STDOUT: %.loc13_14.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index cfa0bf343c40..7f228cf3752c 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -36,9 +36,10 @@ fn G(c: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -83,7 +84,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -95,7 +96,7 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -116,16 +117,16 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %F.ref.loc22: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %.loc22() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %F.ref.loc23: %.1 = name_ref F, @HasF.%.loc12 [template = constants.%.2] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %.loc23() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 1681cb9be916..b3cbdcef73cc 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -76,19 +76,20 @@ class X(U:! type) { // CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.10: type = struct_type {} [template] -// CHECK:STDOUT: %.11: = complete_type_witness %.10 [template] -// CHECK:STDOUT: %.13: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.14: type = struct_type {.x: Core.IntLiteral} [template] +// CHECK:STDOUT: %.9: %HasF.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.11: type = struct_type {} [template] +// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] +// CHECK:STDOUT: %.14: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.15: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%.3) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.34: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.35: = bound_method %.13, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.3) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %Param = struct_value (%.37) [template] +// CHECK:STDOUT: %.39: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.40: = bound_method %.14, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.3) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %Param = struct_value (%.42) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -170,7 +171,7 @@ class X(U:! type) { // CHECK:STDOUT: %return.param: ref %Param = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Param = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -197,7 +198,7 @@ class X(U:! type) { // CHECK:STDOUT: %Param.ref: type = name_ref Param, file.%Param.decl [template = constants.%Param] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%Param)> [template = constants.%HasF.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = complete_type_witness %.10 [template = constants.%.11] +// CHECK:STDOUT: %.loc18: = complete_type_witness %.11 [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -212,15 +213,15 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() -> %return: %Param { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_20: Core.IntLiteral = int_value 2 [template = constants.%.13] -// CHECK:STDOUT: %.loc15_21.1: %.14 = struct_literal (%.loc15_20) -// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.34, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_20, %.loc15_21.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.3) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_21.4(%.loc15_20) [template = constants.%.37] -// CHECK:STDOUT: %.loc15_21.5: init %i32 = converted %.loc15_20, %int.convert_checked [template = constants.%.37] +// CHECK:STDOUT: %.loc15_20: Core.IntLiteral = int_value 2 [template = constants.%.14] +// CHECK:STDOUT: %.loc15_21.1: %.15 = struct_literal (%.loc15_20) +// CHECK:STDOUT: %.loc15_21.2: %Convert.type.2 = interface_witness_access constants.%.39, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_21.3: = bound_method %.loc15_20, %.loc15_21.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc15_21.4: = specific_function %.loc15_21.3, @Convert.2(constants.%.3) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_21.4(%.loc15_20) [template = constants.%.42] +// CHECK:STDOUT: %.loc15_21.5: init %i32 = converted %.loc15_20, %int.convert_checked [template = constants.%.42] // CHECK:STDOUT: %.loc15_21.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc15_21.7: init %i32 = initialize_from %.loc15_21.5 to %.loc15_21.6 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_21.7: init %i32 = initialize_from %.loc15_21.5 to %.loc15_21.6 [template = constants.%.42] // CHECK:STDOUT: %.loc15_21.8: init %Param = class_init (%.loc15_21.7), %return [template = constants.%struct] // CHECK:STDOUT: %.loc15_22: init %Param = converted %.loc15_21.1, %.loc15_21.8 [template = constants.%struct] // CHECK:STDOUT: return %.loc15_22 to %return @@ -235,7 +236,7 @@ class X(U:! type) { // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc21_17.1: %.7 = specific_constant @HasF.%.loc5_14.1, @HasF(constants.%Param) [template = constants.%.8] // CHECK:STDOUT: %F.ref.loc21: %.7 = name_ref F, %.loc21_17.1 [template = constants.%.8] -// CHECK:STDOUT: %.loc21_17.2: %F.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc21_17.2: %F.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc21_19.1: ref %Param = temporary_storage // CHECK:STDOUT: %F.call.loc21: init %Param = call %.loc21_17.2() to %.loc21_19.1 // CHECK:STDOUT: %.loc21_19.2: ref %Param = temporary %.loc21_19.1, %F.call.loc21 @@ -252,7 +253,7 @@ class X(U:! type) { // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %.loc22_17.1: %.7 = specific_constant @HasF.%.loc5_14.1, @HasF(constants.%Param) [template = constants.%.8] // CHECK:STDOUT: %F.ref.loc22: %.7 = name_ref F, %.loc22_17.1 [template = constants.%.8] -// CHECK:STDOUT: %.loc22_17.2: %F.type.2 = interface_witness_access constants.%.9, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc22_17.2: %F.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc22_19.1: ref %Param = temporary_storage // CHECK:STDOUT: %F.call.loc22: init %Param = call %.loc22_17.2() to %.loc22_19.1 // CHECK:STDOUT: %.loc22_19.2: ref %Param = temporary %.loc22_19.1, %F.call.loc22 @@ -290,7 +291,7 @@ class X(U:! type) { // CHECK:STDOUT: %.loc5_14.3 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%Param, constants.%C) { +// CHECK:STDOUT: specific @F.1(constants.%Param, constants.%.9) { // CHECK:STDOUT: %T => constants.%Param // CHECK:STDOUT: } // CHECK:STDOUT: @@ -303,10 +304,11 @@ class X(U:! type) { // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%T) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic] // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 0 [symbolic] // CHECK:STDOUT: %X.type: type = generic_class_type @X [template] @@ -315,13 +317,14 @@ class X(U:! type) { // CHECK:STDOUT: %I.type.3: type = facet_type <@I, @I(%U)> [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.1, @I(%U) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type.3, %F.type.2 [symbolic] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type.3, %F.type.2 [symbolic] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%U) [symbolic] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%F.3) [symbolic] -// CHECK:STDOUT: %.6: type = struct_type {} [template] -// CHECK:STDOUT: %.7: = complete_type_witness %.6 [template] +// CHECK:STDOUT: %.6: %I.type.2 = facet_value %X.2, %X.2 [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [symbolic] +// CHECK:STDOUT: %.8: type = struct_type {} [template] +// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -363,28 +366,28 @@ class X(U:! type) { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%T.loc4_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc5_25.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc5_25.2 (constants.%.1)] -// CHECK:STDOUT: %.loc5_25.3: @I.%.loc5_25.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_25.3 (constants.%.2)] +// CHECK:STDOUT: %.loc5_25.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc5_25.2 (constants.%.2)] +// CHECK:STDOUT: %.loc5_25.3: @I.%.loc5_25.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_25.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @I.%F (constants.%F.1)] { -// CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.1.%.loc5_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%.loc5_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %t.patt: @F.1.%T (%T) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @F.1.%T (%T) = value_param_pattern %t.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc5_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref, %.loc5_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_14.2: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc5_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_14.3: type = facet_access_type %Self.ref [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_14.4: type = converted %Self.ref, %.loc5_14.3 [symbolic = %.loc5_14.1 (constants.%.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.1.%.loc5_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%.loc5_14.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: %t.param: @F.1.%T (%T) = value_param runtime_param1 // CHECK:STDOUT: %t: @F.1.%T (%T) = bind_name t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5_25.1: @I.%.loc5_25.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc5_25.3 (constants.%.2)] +// CHECK:STDOUT: %.loc5_25.1: @I.%.loc5_25.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc5_25.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -401,7 +404,7 @@ class X(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%U) [symbolic = %F.type (constants.%F.type.3)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.3) = struct_value () [symbolic = %F (constants.%F.3)] -// CHECK:STDOUT: %.loc9_23.2: = interface_witness (%F) [symbolic = %.loc9_23.2 (constants.%.5)] +// CHECK:STDOUT: %.loc9_23.2: = interface_witness (%F) [symbolic = %.loc9_23.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %I.type.loc9_19.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.3) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.3)] { @@ -418,7 +421,7 @@ class X(U:! type) { // CHECK:STDOUT: %t.param: @F.2.%U (%U) = value_param runtime_param1 // CHECK:STDOUT: %t: @F.2.%U (%U) = bind_name t, %t.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_23.1: = interface_witness (%F.decl) [symbolic = %.loc9_23.2 (constants.%.5)] +// CHECK:STDOUT: %.loc9_23.1: = interface_witness (%F.decl) [symbolic = %.loc9_23.2 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -441,7 +444,7 @@ class X(U:! type) { // CHECK:STDOUT: %I.type.loc9_19.1: type = facet_type <@I, @I(constants.%U)> [symbolic = %I.type.loc9_19.2 (constants.%I.type.3)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc9: type = specific_constant @impl.%I.type.loc9_19.1, @impl(constants.%U) [symbolic = %I.type (constants.%I.type.3)] -// CHECK:STDOUT: %.loc12: = complete_type_witness %.6 [template = constants.%.7] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%X.2 @@ -453,8 +456,9 @@ class X(U:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_14.1: type = facet_access_type %Self [symbolic = %.loc5_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self (%Self)](%t.param_patt: @F.1.%T (%T)); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc5_14.1 (%.1)](%t.param_patt: @F.1.%T (%T)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@X.%U.loc8_9.1: type) { @@ -483,6 +487,7 @@ class X(U:! type) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc5_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(%T.loc4_13.2) { @@ -507,8 +512,8 @@ class X(U:! type) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc5_25.2 => constants.%.3 -// CHECK:STDOUT: %.loc5_25.3 => constants.%.4 +// CHECK:STDOUT: %.loc5_25.2 => constants.%.4 +// CHECK:STDOUT: %.loc5_25.3 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(@impl.%U) { @@ -529,7 +534,7 @@ class X(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc9_23.2 => constants.%.5 +// CHECK:STDOUT: %.loc9_23.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @X(@F.2.%U) { @@ -542,10 +547,11 @@ class X(U:! type) { // CHECK:STDOUT: %X => constants.%X.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%U, constants.%X.2) { +// CHECK:STDOUT: specific @F.1(constants.%U, constants.%.6) { // CHECK:STDOUT: %T => constants.%U // CHECK:STDOUT: %I.type => constants.%I.type.3 -// CHECK:STDOUT: %Self => constants.%X.2 +// CHECK:STDOUT: %Self => constants.%.6 +// CHECK:STDOUT: %.loc5_14.1 => constants.%X.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%U) { diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index 31744c1c4fc6..2b528ab5302f 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -28,16 +28,18 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Simple.type: type = facet_type <@Simple> [template] // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %G.type.1: type = fn_type @G.1 [template] // CHECK:STDOUT: %G.1: %G.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Simple.type, %G.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Simple.%G.decl [template] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Simple.type, %G.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Simple.%G.decl [template] +// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] +// CHECK:STDOUT: %.5: %Simple.type = facet_value %i32, %i32 [template] // CHECK:STDOUT: %InstanceCall.type: type = fn_type @InstanceCall [template] // CHECK:STDOUT: %InstanceCall: %InstanceCall.type = struct_value () [template] // CHECK:STDOUT: } @@ -59,7 +61,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Simple.decl: type = interface_decl @Simple [template = constants.%Simple.type] {} {} // CHECK:STDOUT: impl_decl @impl [template] {} { -// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc15_6.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc15_6.1) [template = constants.%i32] // CHECK:STDOUT: %.loc15_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc15_6.3: type = converted %int.make_type_signed, %.loc15_6.2 [template = constants.%i32] @@ -69,7 +71,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc22_20.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc22_20.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc22_20.1) [template = constants.%i32] // CHECK:STDOUT: %.loc22_20.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc22_20.3: type = converted %int.make_type_signed, %.loc22_20.2 [template = constants.%i32] @@ -81,16 +83,16 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: interface @Simple { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %G.decl: %G.type.1 = fn_decl @G.1 [template = constants.%G.1] { -// CHECK:STDOUT: %self.patt: @G.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @G.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @G.1.%.loc12_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @G.1.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref, %.loc12_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @G.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @G.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @G.1.%.loc12_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @G.1.%.loc12_14.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %G.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %G.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -116,8 +118,9 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @G.1(@Simple.%Self: %Simple.type) { // CHECK:STDOUT: %Self: %Simple.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @G.1.%Self (%Self)](); +// CHECK:STDOUT: fn[%self.param_patt: @G.1.%.loc12_14.1 (%.1)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.2[%self.param_patt: ](); @@ -126,7 +129,7 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] -// CHECK:STDOUT: %G.ref: %.1 = name_ref G, @Simple.%.loc12 [template = constants.%.2] +// CHECK:STDOUT: %G.ref: %.2 = name_ref G, @Simple.%.loc12 [template = constants.%.3] // CHECK:STDOUT: %.loc23_4.1: %G.type.1 = interface_witness_access , element0 [template = ] // CHECK:STDOUT: %.loc23_4.2: = bound_method %n.ref, %.loc23_4.1 // CHECK:STDOUT: return @@ -134,9 +137,11 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%i32) { -// CHECK:STDOUT: %Self => constants.%i32 +// CHECK:STDOUT: specific @G.1(constants.%.5) { +// CHECK:STDOUT: %Self => constants.%.5 +// CHECK:STDOUT: %.loc12_14.1 => constants.%i32 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index e3210b1cfb15..b57784c22981 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -37,9 +37,10 @@ class C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: %GenericInterface.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -105,7 +106,7 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc19_23.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc19_56.2: = interface_witness (%F) [symbolic = %.loc19_56.2 (constants.%.3)] +// CHECK:STDOUT: %.loc19_56.2: = interface_witness (%F) [symbolic = %.loc19_56.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc19_52.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -116,7 +117,7 @@ class C { // CHECK:STDOUT: %x.param: @F.2.%T (%T) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.2.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_56.1: = interface_witness (%F.decl) [symbolic = %.loc19_56.2 (constants.%.3)] +// CHECK:STDOUT: %.loc19_56.1: = interface_witness (%F.decl) [symbolic = %.loc19_56.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -137,7 +138,7 @@ class C { // CHECK:STDOUT: %T.loc19_23.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_23.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc19: type = specific_constant @impl.%GenericInterface.type.loc19_52.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.2] -// CHECK:STDOUT: %.loc22: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -196,14 +197,14 @@ class C { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc19_56.2 => constants.%.3 +// CHECK:STDOUT: %.loc19_56.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%C) { +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.3) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index e9e098ecb65d..928cea065638 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -133,7 +133,7 @@ class FMissingReturnType { class FDifferentParamType { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: redeclaration differs at parameter 1 [RedeclParamDiffers] + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: type `FDifferentParamType` of parameter 1 in redeclaration differs from previous parameter type `bool` [RedeclParamDiffersType] // CHECK:STDERR: fn F[self: bool](b: Self) -> bool; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note: previous declaration's corresponding parameter here [RedeclParamPrevious] @@ -146,7 +146,7 @@ class FDifferentParamType { class FDifferentImplicitParamType { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: redeclaration differs at implicit parameter 1 [RedeclParamDiffers] + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: type `FDifferentImplicitParamType` of implicit parameter 1 in redeclaration differs from previous parameter type `bool` [RedeclParamDiffersType] // CHECK:STDERR: fn F[self: Self](b: bool) -> bool; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-59]]:20: note: previous declaration's corresponding implicit parameter here [RedeclParamPrevious] @@ -190,7 +190,7 @@ interface SelfNested { class SelfNestedBadParam { impl as SelfNested { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: redeclaration differs at parameter 1 [RedeclParamDiffers] + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: type `(SelfNestedBadParam*, {.x: i32, .y: i32})` of parameter 1 in redeclaration differs from previous parameter type `(SelfNestedBadParam*, {.x: SelfNestedBadParam, .y: i32})` [RedeclParamDiffersType] // CHECK:STDERR: fn F(x: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> [SelfNestedBadParam; 4]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-8]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious] @@ -235,71 +235,84 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.3: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.5: %I.type = facet_value %FExtraParam, %FExtraParam [template] // CHECK:STDOUT: %FExtraImplicitParam: type = class_type @FExtraImplicitParam [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.4: %F.type.3 = struct_value () [template] +// CHECK:STDOUT: %.6: %I.type = facet_value %FExtraImplicitParam, %FExtraImplicitParam [template] // CHECK:STDOUT: %FExtraReturnType: type = class_type @FExtraReturnType [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.5: %F.type.4 = struct_value () [template] +// CHECK:STDOUT: %.7: %I.type = facet_value %FExtraReturnType, %FExtraReturnType [template] // CHECK:STDOUT: %J.type: type = facet_type <@J> [template] // CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.6: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %J.type, %F.type.5 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @J.%F.decl [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %J.type, %F.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @J.%F.decl [template] // CHECK:STDOUT: %FMissingParam: type = class_type @FMissingParam [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.7: %F.type.6 = struct_value () [template] +// CHECK:STDOUT: %.10: %J.type = facet_value %FMissingParam, %FMissingParam [template] // CHECK:STDOUT: %FMissingImplicitParam: type = class_type @FMissingImplicitParam [template] // CHECK:STDOUT: %F.type.7: type = fn_type @F.7 [template] // CHECK:STDOUT: %F.8: %F.type.7 = struct_value () [template] +// CHECK:STDOUT: %.11: %J.type = facet_value %FMissingImplicitParam, %FMissingImplicitParam [template] // CHECK:STDOUT: %FMissingReturnType: type = class_type @FMissingReturnType [template] // CHECK:STDOUT: %F.type.8: type = fn_type @F.8 [template] // CHECK:STDOUT: %F.9: %F.type.8 = struct_value () [template] +// CHECK:STDOUT: %.12: %J.type = facet_value %FMissingReturnType, %FMissingReturnType [template] // CHECK:STDOUT: %FDifferentParamType: type = class_type @FDifferentParamType [template] // CHECK:STDOUT: %F.type.9: type = fn_type @F.9 [template] // CHECK:STDOUT: %F.10: %F.type.9 = struct_value () [template] +// CHECK:STDOUT: %.13: %J.type = facet_value %FDifferentParamType, %FDifferentParamType [template] // CHECK:STDOUT: %FDifferentImplicitParamType: type = class_type @FDifferentImplicitParamType [template] // CHECK:STDOUT: %F.type.10: type = fn_type @F.10 [template] // CHECK:STDOUT: %F.11: %F.type.10 = struct_value () [template] +// CHECK:STDOUT: %.14: %J.type = facet_value %FDifferentImplicitParamType, %FDifferentImplicitParamType [template] // CHECK:STDOUT: %FDifferentReturnType: type = class_type @FDifferentReturnType [template] // CHECK:STDOUT: %F.type.11: type = fn_type @F.11 [template] // CHECK:STDOUT: %F.12: %F.type.11 = struct_value () [template] +// CHECK:STDOUT: %.15: %J.type = facet_value %FDifferentReturnType, %FDifferentReturnType [template] // CHECK:STDOUT: %FDifferentParamName: type = class_type @FDifferentParamName [template] // CHECK:STDOUT: %F.type.12: type = fn_type @F.12 [template] // CHECK:STDOUT: %F.13: %F.type.12 = struct_value () [template] +// CHECK:STDOUT: %.16: %J.type = facet_value %FDifferentParamName, %FDifferentParamName [template] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [template] // CHECK:STDOUT: %Self.3: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.7: type = ptr_type %Self.3 [symbolic] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.17: type = facet_access_type %Self.3 [symbolic] +// CHECK:STDOUT: %.18: type = ptr_type %.17 [symbolic] +// CHECK:STDOUT: %.19: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.8 [template] -// CHECK:STDOUT: %.9: type = struct_type {.x: %Self.3, .y: %i32} [symbolic] +// CHECK:STDOUT: %i32: type = int_type signed, %.19 [template] +// CHECK:STDOUT: %.20: type = struct_type {.x: %.17, .y: %i32} [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.7, %.9) [symbolic] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.11: type = array_type %.10, %Self.3 [symbolic] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.18, %.20) [symbolic] +// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.22: type = array_type %.21, %.17 [symbolic] // CHECK:STDOUT: %F.type.13: type = fn_type @F.13 [template] // CHECK:STDOUT: %F.14: %F.type.13 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.23: type = assoc_entity_type %SelfNested.type, %F.type.13 [template] +// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, @SelfNested.%F.decl [template] // CHECK:STDOUT: %SelfNestedBadParam: type = class_type @SelfNestedBadParam [template] -// CHECK:STDOUT: %.14: type = ptr_type %SelfNestedBadParam [template] -// CHECK:STDOUT: %.15: type = struct_type {.x: %i32, .y: %i32} [template] -// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.14, %.15) [template] -// CHECK:STDOUT: %.16: type = array_type %.10, %SelfNestedBadParam [template] +// CHECK:STDOUT: %.25: type = ptr_type %SelfNestedBadParam [template] +// CHECK:STDOUT: %.26: type = struct_type {.x: %i32, .y: %i32} [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.25, %.26) [template] +// CHECK:STDOUT: %.27: type = array_type %.21, %SelfNestedBadParam [template] // CHECK:STDOUT: %F.type.14: type = fn_type @F.14 [template] // CHECK:STDOUT: %F.15: %F.type.14 = struct_value () [template] -// CHECK:STDOUT: %.17: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [template] -// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.14, %.17) [template] +// CHECK:STDOUT: %.28: %SelfNested.type = facet_value %SelfNestedBadParam, %SelfNestedBadParam [template] +// CHECK:STDOUT: %.29: type = struct_type {.x: %SelfNestedBadParam, .y: %i32} [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.25, %.29) [template] // CHECK:STDOUT: %SelfNestedBadReturnType: type = class_type @SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.18: type = ptr_type %SelfNestedBadReturnType [template] -// CHECK:STDOUT: %.19: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template] -// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.18, %.19) [template] +// CHECK:STDOUT: %.30: type = ptr_type %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.31: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template] +// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%.30, %.31) [template] // CHECK:STDOUT: %F.type.15: type = fn_type @F.15 [template] // CHECK:STDOUT: %F.16: %F.type.15 = struct_value () [template] -// CHECK:STDOUT: %.20: type = array_type %.10, %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.32: %SelfNested.type = facet_value %SelfNestedBadReturnType, %SelfNestedBadReturnType [template] +// CHECK:STDOUT: %.33: type = array_type %.21, %SelfNestedBadReturnType [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -393,7 +406,7 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc93: %.5 = assoc_entity element0, %F.decl [template = constants.%.6] +// CHECK:STDOUT: %.loc93: %.8 = assoc_entity element0, %F.decl [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -406,34 +419,34 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.decl: %F.type.13 = fn_decl @F.13 [template = constants.%F.14] { // CHECK:STDOUT: %x.patt: @F.13.%tuple.type (%tuple.type.2) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @F.13.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.13.%.loc188_52.1 (%.11) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.13.%.loc188_52.1 (%.11) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.13.%.loc188_52.1 (%.22) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.13.%.loc188_52.1 (%.22) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.2: type = facet_type_access %Self.ref.loc188_12 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.3: type = converted %Self.ref.loc188_12, %.loc188_16.2 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.4: type = ptr_type %Self.3 [symbolic = %.loc188_16.1 (constants.%.7)] +// CHECK:STDOUT: %.loc188_16.3: type = facet_access_type %Self.ref.loc188_12 [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_16.4: type = converted %Self.ref.loc188_12, %.loc188_16.3 [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_16.5: type = ptr_type %.17 [symbolic = %.loc188_16.2 (constants.%.18)] // CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_24.1: type = facet_type_access %Self.ref.loc188_24 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_34.1: Core.IntLiteral = int_value 32 [template = constants.%.8] +// CHECK:STDOUT: %.loc188_24.1: type = facet_access_type %Self.ref.loc188_24 [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_24.2: type = converted %Self.ref.loc188_24, %.loc188_24.1 [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_34.1: Core.IntLiteral = int_value 32 [template = constants.%.19] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc188_34.1) [template = constants.%i32] // CHECK:STDOUT: %.loc188_34.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc188_34.3: type = converted %int.make_type_signed, %.loc188_34.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc188_37.2: type = struct_type {.x: %Self.3, .y: %i32} [symbolic = %.loc188_37.1 (constants.%.9)] -// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%.loc188_16.4, %.loc188_37.2) +// CHECK:STDOUT: %.loc188_37.2: type = struct_type {.x: %.17, .y: %i32} [symbolic = %.loc188_37.1 (constants.%.20)] +// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%.loc188_16.5, %.loc188_37.2) // CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %Self.ref.loc188_45: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_51: Core.IntLiteral = int_value 4 [template = constants.%.10] -// CHECK:STDOUT: %.loc188_45.1: type = facet_type_access %Self.ref.loc188_45 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_45.2: type = converted %Self.ref.loc188_45, %.loc188_45.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_52.2: type = array_type %.loc188_51, %Self.3 [symbolic = %.loc188_52.1 (constants.%.11)] +// CHECK:STDOUT: %.loc188_51: Core.IntLiteral = int_value 4 [template = constants.%.21] +// CHECK:STDOUT: %.loc188_45.1: type = facet_access_type %Self.ref.loc188_45 [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_45.2: type = converted %Self.ref.loc188_45, %.loc188_45.1 [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_52.2: type = array_type %.loc188_51, %.17 [symbolic = %.loc188_52.1 (constants.%.22)] // CHECK:STDOUT: %x.param: @F.13.%tuple.type (%tuple.type.2) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.13.%tuple.type (%tuple.type.2) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.13.%.loc188_52.1 (%.11) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.13.%.loc188_52.1 (%.11) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @F.13.%.loc188_52.1 (%.22) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.13.%.loc188_52.1 (%.22) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc188: %.12 = assoc_entity element0, %F.decl [template = constants.%.13] +// CHECK:STDOUT: %.loc188: %.23 = assoc_entity element0, %F.decl [template = constants.%.24] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -720,29 +733,29 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.decl: %F.type.14 = fn_decl @F.14 [template = constants.%F.15] { // CHECK:STDOUT: %x.patt: %tuple.type.3 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.16 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.16 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.27 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.27 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.14] -// CHECK:STDOUT: %.loc200_40.1: Core.IntLiteral = int_value 32 [template = constants.%.8] +// CHECK:STDOUT: %.loc200_32: type = ptr_type %SelfNestedBadParam [template = constants.%.25] +// CHECK:STDOUT: %.loc200_40.1: Core.IntLiteral = int_value 32 [template = constants.%.19] // CHECK:STDOUT: %int.make_type_signed.loc200_40: init type = call constants.%Int(%.loc200_40.1) [template = constants.%i32] // CHECK:STDOUT: %.loc200_40.2: type = value_of_initializer %int.make_type_signed.loc200_40 [template = constants.%i32] // CHECK:STDOUT: %.loc200_40.3: type = converted %int.make_type_signed.loc200_40, %.loc200_40.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_49.1: Core.IntLiteral = int_value 32 [template = constants.%.8] +// CHECK:STDOUT: %.loc200_49.1: Core.IntLiteral = int_value 32 [template = constants.%.19] // CHECK:STDOUT: %int.make_type_signed.loc200_49: init type = call constants.%Int(%.loc200_49.1) [template = constants.%i32] // CHECK:STDOUT: %.loc200_49.2: type = value_of_initializer %int.make_type_signed.loc200_49 [template = constants.%i32] // CHECK:STDOUT: %.loc200_49.3: type = converted %int.make_type_signed.loc200_49, %.loc200_49.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: %i32, .y: %i32} [template = constants.%.15] +// CHECK:STDOUT: %.loc200_52: type = struct_type {.x: %i32, .y: %i32} [template = constants.%.26] // CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%.loc200_32, %.loc200_52) // CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc200_80: Core.IntLiteral = int_value 4 [template = constants.%.10] -// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.16] +// CHECK:STDOUT: %.loc200_80: Core.IntLiteral = int_value 4 [template = constants.%.21] +// CHECK:STDOUT: %.loc200_81: type = array_type %.loc200_80, %SelfNestedBadParam [template = constants.%.27] // CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.16 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.16 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.27 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.27 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc192: = interface_witness () [template = ] // CHECK:STDOUT: @@ -755,26 +768,26 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %F.decl: %F.type.15 = fn_decl @F.15 [template = constants.%F.16] { // CHECK:STDOUT: %x.patt: %tuple.type.5 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %tuple.type.5 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.16 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.16 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.27 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.27 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.18] +// CHECK:STDOUT: %.loc212_37: type = ptr_type %SelfNestedBadReturnType [template = constants.%.30] // CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %.loc212_74.1: Core.IntLiteral = int_value 32 [template = constants.%.8] +// CHECK:STDOUT: %.loc212_74.1: Core.IntLiteral = int_value 32 [template = constants.%.19] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc212_74.1) [template = constants.%i32] // CHECK:STDOUT: %.loc212_74.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc212_74.3: type = converted %int.make_type_signed, %.loc212_74.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%.19] +// CHECK:STDOUT: %.loc212_77: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%.31] // CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%.loc212_37, %.loc212_77) // CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%tuple.type.5 [template = constants.%tuple.type.5] // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %.loc212_105: Core.IntLiteral = int_value 4 [template = constants.%.10] -// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.16] +// CHECK:STDOUT: %.loc212_105: Core.IntLiteral = int_value 4 [template = constants.%.21] +// CHECK:STDOUT: %.loc212_106: type = array_type %.loc212_105, %SelfNestedBadParam [template = constants.%.27] // CHECK:STDOUT: %x.param: %tuple.type.5 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.5 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.16 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.16 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.27 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.27 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc205: = interface_witness () [template = ] // CHECK:STDOUT: @@ -984,63 +997,67 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.13(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %.loc188_16.1: type = ptr_type @F.13.%Self (%Self.3) [symbolic = %.loc188_16.1 (constants.%.7)] -// CHECK:STDOUT: %.loc188_37.1: type = struct_type {.x: @F.13.%Self (%Self.3), .y: %i32} [symbolic = %.loc188_37.1 (constants.%.9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.13.%.loc188_16.1 (%.7), @F.13.%.loc188_37.1 (%.9)) [symbolic = %tuple.type (constants.%tuple.type.2)] -// CHECK:STDOUT: %.loc188_52.1: type = array_type constants.%.10, @F.13.%Self (%Self.3) [symbolic = %.loc188_52.1 (constants.%.11)] +// CHECK:STDOUT: %.loc188_16.1: type = facet_access_type %Self [symbolic = %.loc188_16.1 (constants.%.17)] +// CHECK:STDOUT: %.loc188_16.2: type = ptr_type @F.13.%.loc188_16.1 (%.17) [symbolic = %.loc188_16.2 (constants.%.18)] +// CHECK:STDOUT: %.loc188_37.1: type = struct_type {.x: @F.13.%.loc188_16.1 (%.17), .y: %i32} [symbolic = %.loc188_37.1 (constants.%.20)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.13.%.loc188_16.2 (%.18), @F.13.%.loc188_37.1 (%.20)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %.loc188_52.1: type = array_type constants.%.21, @F.13.%.loc188_16.1 (%.17) [symbolic = %.loc188_52.1 (constants.%.22)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%x.param_patt: @F.13.%tuple.type (%tuple.type.2)) -> @F.13.%.loc188_52.1 (%.11); +// CHECK:STDOUT: fn(%x.param_patt: @F.13.%tuple.type (%tuple.type.2)) -> @F.13.%.loc188_52.1 (%.22); // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.14(%x.param_patt: %tuple.type.3) -> %.16; +// CHECK:STDOUT: fn @F.14(%x.param_patt: %tuple.type.3) -> %.27; // CHECK:STDOUT: -// CHECK:STDOUT: fn @F.15(%x.param_patt: %tuple.type.5) -> %.16; +// CHECK:STDOUT: fn @F.15(%x.param_patt: %tuple.type.5) -> %.27; // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%FExtraParam) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%FExtraImplicitParam) {} +// CHECK:STDOUT: specific @F.1(constants.%.6) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%FExtraReturnType) {} +// CHECK:STDOUT: specific @F.1(constants.%.7) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.5(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FMissingParam) {} +// CHECK:STDOUT: specific @F.5(constants.%.10) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FMissingImplicitParam) {} +// CHECK:STDOUT: specific @F.5(constants.%.11) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FMissingReturnType) {} +// CHECK:STDOUT: specific @F.5(constants.%.12) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FDifferentParamType) {} +// CHECK:STDOUT: specific @F.5(constants.%.13) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FDifferentImplicitParamType) {} +// CHECK:STDOUT: specific @F.5(constants.%.14) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FDifferentReturnType) {} +// CHECK:STDOUT: specific @F.5(constants.%.15) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.5(constants.%FDifferentParamName) {} +// CHECK:STDOUT: specific @F.5(constants.%.16) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.13(constants.%Self.3) { // CHECK:STDOUT: %Self => constants.%Self.3 -// CHECK:STDOUT: %.loc188_16.1 => constants.%.7 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.9 +// CHECK:STDOUT: %.loc188_16.1 => constants.%.17 +// CHECK:STDOUT: %.loc188_16.2 => constants.%.18 +// CHECK:STDOUT: %.loc188_37.1 => constants.%.20 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.11 +// CHECK:STDOUT: %.loc188_52.1 => constants.%.22 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.13(constants.%SelfNestedBadParam) { -// CHECK:STDOUT: %Self => constants.%SelfNestedBadParam -// CHECK:STDOUT: %.loc188_16.1 => constants.%.14 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.17 +// CHECK:STDOUT: specific @F.13(constants.%.28) { +// CHECK:STDOUT: %Self => constants.%.28 +// CHECK:STDOUT: %.loc188_16.1 => constants.%SelfNestedBadParam +// CHECK:STDOUT: %.loc188_16.2 => constants.%.25 +// CHECK:STDOUT: %.loc188_37.1 => constants.%.29 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.16 +// CHECK:STDOUT: %.loc188_52.1 => constants.%.27 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.13(constants.%SelfNestedBadReturnType) { -// CHECK:STDOUT: %Self => constants.%SelfNestedBadReturnType -// CHECK:STDOUT: %.loc188_16.1 => constants.%.18 -// CHECK:STDOUT: %.loc188_37.1 => constants.%.19 +// CHECK:STDOUT: specific @F.13(constants.%.32) { +// CHECK:STDOUT: %Self => constants.%.32 +// CHECK:STDOUT: %.loc188_16.1 => constants.%SelfNestedBadReturnType +// CHECK:STDOUT: %.loc188_16.2 => constants.%.30 +// CHECK:STDOUT: %.loc188_37.1 => constants.%.31 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.5 -// CHECK:STDOUT: %.loc188_52.1 => constants.%.20 +// CHECK:STDOUT: %.loc188_52.1 => constants.%.33 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon new file mode 100644 index 000000000000..e4cf2f798550 --- /dev/null +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -0,0 +1,202 @@ +// Part of the Carbon Language project, under the Apache License v2.0 with LLVM +// Exceptions. See /LICENSE for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_self_type_mismatch.carbon + +class C[T:! type](X:! T) {} + +interface I { + fn F(c: C(Self)); +} + +impl i32 as I { + // CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE+6]]:8: error: type `C(i32)` of parameter 1 in redeclaration differs from previous parameter type `C(i32 as I)` [RedeclParamDiffersType] + // CHECK:STDERR: fn F(c: C(i32)); + // CHECK:STDERR: ^~~~~~~~~ + // CHECK:STDERR: fail_self_type_mismatch.carbon:[[@LINE-7]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious] + // CHECK:STDERR: fn F(c: C(Self)); + // CHECK:STDERR: ^~~~~~~~~~ + fn F(c: C(i32)); +} + +// CHECK:STDOUT: --- fail_self_type_mismatch.carbon +// CHECK:STDOUT: +// CHECK:STDOUT: constants { +// CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] +// CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %X: %T = bind_symbolic_name X, 1 [symbolic] +// CHECK:STDOUT: %X.patt: %T = symbolic_binding_pattern X, 1 [symbolic] +// CHECK:STDOUT: %C.type: type = generic_class_type @C [template] +// CHECK:STDOUT: %C.1: %C.type = struct_value () [template] +// CHECK:STDOUT: %C.2: type = class_type @C, @C(%T, %X) [symbolic] +// CHECK:STDOUT: %.1: type = struct_type {} [template] +// CHECK:STDOUT: %.2: = complete_type_witness %.1 [template] +// CHECK:STDOUT: %I.type: type = facet_type <@I> [template] +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%I.type, %Self) [symbolic] +// CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] +// CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] +// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(type, %i32) [template] +// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] +// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] +// CHECK:STDOUT: %.6: %I.type = facet_value %i32, %i32 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%I.type, %.6) [template] +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: .Int = %import_ref +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: file { +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .C = %C.decl +// CHECK:STDOUT: .I = %I.decl +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { +// CHECK:STDOUT: %T.patt.loc11_9.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc11_9.1, runtime_param [symbolic = %T.patt.loc11_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %X.patt.loc11_19.1: @C.%T.loc11_9.2 (%T) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc11_19.2 (constants.%X.patt)] +// CHECK:STDOUT: %X.param_patt: @C.%T.loc11_9.2 (%T) = value_param_pattern %X.patt.loc11_19.1, runtime_param [symbolic = %X.patt.loc11_19.2 (constants.%X.patt)] +// CHECK:STDOUT: } { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_9.1 [symbolic = %T.loc11_9.2 (constants.%T)] +// CHECK:STDOUT: %T.param: type = value_param runtime_param +// CHECK:STDOUT: %T.loc11_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_9.2 (constants.%T)] +// CHECK:STDOUT: %X.param: @C.%T.loc11_9.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %X.loc11_19.1: @C.%T.loc11_9.2 (%T) = bind_symbolic_name X, 1, %X.param [symbolic = %X.loc11_19.2 (constants.%X)] +// CHECK:STDOUT: } +// CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} +// CHECK:STDOUT: impl_decl @impl [template] {} { +// CHECK:STDOUT: %.loc17_6.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc17_6.1) [template = constants.%i32] +// CHECK:STDOUT: %.loc17_6.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc17_6.3: type = converted %int.make_type_signed, %.loc17_6.2 [template = constants.%i32] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: interface @I { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] +// CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { +// CHECK:STDOUT: %c.patt: @F.1.%C.loc14_12.1 (%C.3) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @F.1.%C.loc14_12.1 (%C.3) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %C.loc14_12.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_12.1 (constants.%C.3)] +// CHECK:STDOUT: %c.param: @F.1.%C.loc14_12.1 (%C.3) = value_param runtime_param0 +// CHECK:STDOUT: %c: @F.1.%C.loc14_12.1 (%C.3) = bind_name c, %c.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = %Self +// CHECK:STDOUT: .F = %.loc14 +// CHECK:STDOUT: witness = (%F.decl) +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: impl @impl: %.loc17_6.3 as %I.ref { +// CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { +// CHECK:STDOUT: %c.patt: %C.4 = binding_pattern c +// CHECK:STDOUT: %c.param_patt: %C.4 = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] +// CHECK:STDOUT: %.loc24: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc24) [template = constants.%i32] +// CHECK:STDOUT: %C: type = class_type @C, @C(type, constants.%i32) [template = constants.%C.4] +// CHECK:STDOUT: %c.param: %C.4 = value_param runtime_param0 +// CHECK:STDOUT: %c: %C.4 = bind_name c, %c.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %.loc17_15: = interface_witness () [template = ] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: witness = %.loc17_15 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic class @C(%T.loc11_9.1: type, %X.loc11_19.1: @C.%T.loc11_9.2 (%T)) { +// CHECK:STDOUT: %T.loc11_9.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_9.2 (constants.%T)] +// CHECK:STDOUT: %T.patt.loc11_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_9.2 (constants.%T.patt)] +// CHECK:STDOUT: %X.loc11_19.2: %T = bind_symbolic_name X, 1 [symbolic = %X.loc11_19.2 (constants.%X)] +// CHECK:STDOUT: %X.patt.loc11_19.2: %T = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc11_19.2 (constants.%X.patt)] +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: +// CHECK:STDOUT: class { +// CHECK:STDOUT: %.loc11: = complete_type_witness %.1 [template = constants.%.2] +// CHECK:STDOUT: +// CHECK:STDOUT: !members: +// CHECK:STDOUT: .Self = constants.%C.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { +// CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %C.loc14_12.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc14_12.1 (constants.%C.3)] +// CHECK:STDOUT: +// CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc14_12.1 (%C.3)); +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: fn @F.2(%c.param_patt: %C.4); +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%T, constants.%X) { +// CHECK:STDOUT: %T.loc11_9.2 => constants.%T +// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%T +// CHECK:STDOUT: %X.loc11_19.2 => constants.%X +// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%X +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%Self) { +// CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type +// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type +// CHECK:STDOUT: %X.loc11_19.2 => constants.%Self +// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%Self +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%I.type, @F.1.%Self) { +// CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type +// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type +// CHECK:STDOUT: %X.loc11_19.2 => constants.%Self +// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%Self +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F.1(constants.%Self) { +// CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %C.loc14_12.1 => constants.%C.3 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(type, constants.%i32) { +// CHECK:STDOUT: %T.loc11_9.2 => type +// CHECK:STDOUT: %T.patt.loc11_9.2 => type +// CHECK:STDOUT: %X.loc11_19.2 => constants.%i32 +// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%i32 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @F.1(constants.%.6) { +// CHECK:STDOUT: %Self => constants.%.6 +// CHECK:STDOUT: %C.loc14_12.1 => constants.%C.5 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%I.type, constants.%.6) { +// CHECK:STDOUT: %T.loc11_9.2 => constants.%I.type +// CHECK:STDOUT: %T.patt.loc11_9.2 => constants.%I.type +// CHECK:STDOUT: %X.loc11_19.2 => constants.%.6 +// CHECK:STDOUT: %X.patt.loc11_19.2 => constants.%.6 +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index eca1444b5a10..9bad9ade8550 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -33,9 +33,10 @@ class C { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: %Simple.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -70,7 +71,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -82,7 +83,7 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %Simple.ref: type = name_ref Simple, file.%Simple.decl [template = constants.%Simple.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -98,7 +99,7 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_19.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc19_19.1: %.5 = struct_literal () // CHECK:STDOUT: %.loc19_19.2: init %C = class_init (), %c.var [template = constants.%struct] // CHECK:STDOUT: %.loc19_20: init %C = converted %.loc19_19.1, %.loc19_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_20 @@ -107,5 +108,5 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/impl_forall.carbon b/toolchain/check/testdata/impl/impl_forall.carbon index 9fd0bf9b365f..7db8e3e446d8 100644 --- a/toolchain/check/testdata/impl/impl_forall.carbon +++ b/toolchain/check/testdata/impl/impl_forall.carbon @@ -29,7 +29,8 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.3: %Simple.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,11 +76,11 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc15_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc15_36.2: = interface_witness (%F) [symbolic = %.loc15_36.2 (constants.%.3)] +// CHECK:STDOUT: %.loc15_36.2: = interface_witness (%F) [symbolic = %.loc15_36.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc15_36.1: = interface_witness (%F.decl) [symbolic = %.loc15_36.2 (constants.%.3)] +// CHECK:STDOUT: %.loc15_36.1: = interface_witness (%F.decl) [symbolic = %.loc15_36.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -110,12 +111,12 @@ impl forall [T:! type] T as Simple { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc15_36.2 => constants.%.3 +// CHECK:STDOUT: %.loc15_36.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc15_14.2) { // CHECK:STDOUT: %T.loc15_14.2 => constants.%T diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index f69e24cc0826..2f8772cbb695 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -40,7 +40,8 @@ fn G(c: C) { // CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -89,7 +90,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -121,16 +122,16 @@ fn G(c: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %G.ref.loc24: %.1 = name_ref G, @C.%G [template = constants.%.2] -// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc24: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc24: init %empty_tuple.type = call %.loc24() // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %G.ref.loc25: %.1 = name_ref G, @C.%G [template = constants.%.2] -// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc25: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc25: init %empty_tuple.type = call %.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index b964ca878e87..1b796f4d9350 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -48,7 +48,8 @@ impl C as I { // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.7: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -101,7 +102,7 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] {} {} -// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc27: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -139,5 +140,5 @@ impl C as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.7) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 2b4d44b3919f..e75fd2a674aa 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -135,14 +135,15 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.3: %HasF.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.4) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.5) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.6: = specific_function %F.3, @F.2(%.4) [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.7: = specific_function %F.3, @F.2(%.5) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -170,13 +171,13 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param +// CHECK:STDOUT: %.loc12_10.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.5 [template = constants.%.5] +// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -198,11 +199,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.3)] +// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.3)] +// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -224,13 +225,13 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.4) { +// CHECK:STDOUT: fn @G(%x.param_patt: %.5) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_4.1: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.4) [template = constants.%.6] +// CHECK:STDOUT: %.loc13_4.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.5) [template = constants.%.7] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -244,29 +245,29 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.3 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.4) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.4 +// CHECK:STDOUT: specific @impl(constants.%.5) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%.5 +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.5 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.4) { +// CHECK:STDOUT: specific @F.2(constants.%.5) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: @@ -275,22 +276,24 @@ fn G(x: A) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %HasF.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %HasF.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.4: %HasF.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.6: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.4) [template] +// CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.6) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %struct: %.4 = struct_value () [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %struct: %.6 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -318,42 +321,42 @@ fn G(x: A) { // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.4 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.4 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %x.patt: %.6 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.6 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: %.6 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.6 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %.loc12_17.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref %.4 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.4 = return_slot %return.param +// CHECK:STDOUT: %.loc12_10.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%.6 [template = constants.%.6] +// CHECK:STDOUT: %.loc12_17.1: %.6 = struct_literal () +// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%.6 [template = constants.%.6] +// CHECK:STDOUT: %x.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.6 = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref %.6 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.6 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @HasF { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.1.%Self (%Self) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%Self (%Self) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %self.patt: @F.1.%.loc5_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%.loc5_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.1.%.loc5_14.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%.loc5_14.1 (%.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.1: type = facet_type_access %Self.ref.loc5_14 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref.loc5_14, %.loc5_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_14.2: type = facet_access_type %Self.ref.loc5_14 [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_14.3: type = converted %Self.ref.loc5_14, %.loc5_14.2 [symbolic = %.loc5_14.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_25.1: type = facet_type_access %Self.ref.loc5_25 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_25.2: type = converted %Self.ref.loc5_25, %.loc5_25.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.1.%Self (%Self) = return_slot %return.param +// CHECK:STDOUT: %.loc5_25.1: type = facet_access_type %Self.ref.loc5_25 [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_25.2: type = converted %Self.ref.loc5_25, %.loc5_25.1 [symbolic = %.loc5_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.1.%.loc5_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%.loc5_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.1.%.loc5_14.1 (%.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.1.%.loc5_14.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -368,7 +371,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.3)] +// CHECK:STDOUT: %.loc8_34.2: = interface_witness (%F) [symbolic = %.loc8_34.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -384,7 +387,7 @@ fn G(x: A) { // CHECK:STDOUT: %return.param: ref @F.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.3)] +// CHECK:STDOUT: %.loc8_34.1: = interface_witness (%F.decl) [symbolic = %.loc8_34.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -394,8 +397,9 @@ fn G(x: A) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@HasF.%Self: %HasF.type) { // CHECK:STDOUT: %Self: %HasF.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_14.1: type = facet_access_type %Self [symbolic = %.loc5_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self (%Self)]() -> @F.1.%Self (%Self); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc5_14.1 (%.1)]() -> @F.1.%.loc5_14.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@impl.%T.loc8_14.1: type) { @@ -410,24 +414,25 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.4) -> %.4 { +// CHECK:STDOUT: fn @G(%x.param_patt: %.6) -> %.6 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.6 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] -// CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc13_11.1: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.3] +// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @HasF.%.loc5 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_11.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc13_11.2: = bound_method %x.ref, %.loc13_11.1 -// CHECK:STDOUT: %.loc13_11.3: = specific_function %.loc13_11.2, @F.2(constants.%.4) -// CHECK:STDOUT: %F.call: init %.4 = call %.loc13_11.3(%x.ref) -// CHECK:STDOUT: %.loc13_20.1: ref %.4 = temporary_storage -// CHECK:STDOUT: %.loc13_20.2: ref %.4 = temporary %.loc13_20.1, %F.call -// CHECK:STDOUT: %struct: %.4 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc13_22: %.4 = converted %F.call, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc13_11.3: = specific_function %.loc13_11.2, @F.2(constants.%.6) +// CHECK:STDOUT: %F.call: init %.6 = call %.loc13_11.3(%x.ref) +// CHECK:STDOUT: %.loc13_20.1: ref %.6 = temporary_storage +// CHECK:STDOUT: %.loc13_20.2: ref %.6 = temporary %.loc13_20.1, %F.call +// CHECK:STDOUT: %struct: %.6 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc13_22: %.6 = converted %F.call, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc13_22 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc5_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { @@ -437,15 +442,16 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.3 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) { -// CHECK:STDOUT: %Self => constants.%T +// CHECK:STDOUT: specific @F.1(constants.%.4) { +// CHECK:STDOUT: %Self => constants.%.4 +// CHECK:STDOUT: %.loc5_14.1 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { @@ -453,18 +459,18 @@ fn G(x: A) { // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.4) { -// CHECK:STDOUT: %T.loc8_14.2 => constants.%.4 -// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.4 +// CHECK:STDOUT: specific @impl(constants.%.6) { +// CHECK:STDOUT: %T.loc8_14.2 => constants.%.6 +// CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc8_34.2 => constants.%.5 +// CHECK:STDOUT: %.loc8_34.2 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.4) { -// CHECK:STDOUT: %T => constants.%.4 +// CHECK:STDOUT: specific @F.2(constants.%.6) { +// CHECK:STDOUT: %T => constants.%.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -488,14 +494,15 @@ fn G(x: A) { // CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.5: %HasF.type = facet_value %C.2, %C.2 [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%.3) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.2, @impl(%.3) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] -// CHECK:STDOUT: %.8: = specific_function %F.3, @F.2(%.3) [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.9: = specific_function %F.3, @F.2(%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -564,11 +571,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc10_25.1 as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -609,8 +616,8 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %C.3 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_4.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc15_4.2: = specific_function %.loc15_4.1, @F.2(constants.%.3) [template = constants.%.8] +// CHECK:STDOUT: %.loc15_4.1: %F.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%F.3] +// CHECK:STDOUT: %.loc15_4.2: = specific_function %.loc15_4.1, @F.2(constants.%.3) [template = constants.%.9] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc15_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -635,12 +642,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.5 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C.2) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc10_14.2) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T @@ -663,7 +670,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.7 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%.3) { @@ -687,18 +694,19 @@ fn G(x: A) { // CHECK:STDOUT: %.3: type = struct_type {} [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.4: %HasF.type.2 = facet_value %.3, %.3 [symbolic] +// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%.3)> [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%.3) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: %F.type.4: type = fn_type @F.2, @impl(%.3) [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.4) [template] -// CHECK:STDOUT: %.8: = specific_function %F.4, @F.2(%.3) [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.4) [template] +// CHECK:STDOUT: %.9: = specific_function %F.4, @F.2(%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -777,11 +785,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_38.2: = interface_witness (%F) [symbolic = %.loc8_38.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_38.2: = interface_witness (%F) [symbolic = %.loc8_38.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_34.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_38.1: = interface_witness (%F.decl) [symbolic = %.loc8_38.2 (constants.%.4)] +// CHECK:STDOUT: %.loc8_38.1: = interface_witness (%F.decl) [symbolic = %.loc8_38.2 (constants.%.5)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -810,10 +818,10 @@ fn G(x: A) { // CHECK:STDOUT: %.loc13_12: %.3 = struct_literal () // CHECK:STDOUT: %.loc13_10: type = converted %.loc13_12, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%.3)> [template = constants.%HasF.type.3] -// CHECK:STDOUT: %.loc13_14: %.5 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%.3) [template = constants.%.6] -// CHECK:STDOUT: %F.ref: %.5 = name_ref F, %.loc13_14 [template = constants.%.6] -// CHECK:STDOUT: %.loc13_4.1: %F.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%F.4] -// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.3) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_14: %.6 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%.3) [template = constants.%.7] +// CHECK:STDOUT: %F.ref: %.6 = name_ref F, %.loc13_14 [template = constants.%.7] +// CHECK:STDOUT: %.loc13_4.1: %F.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%F.4] +// CHECK:STDOUT: %.loc13_4.2: = specific_function %.loc13_4.1, @F.2(constants.%.3) [template = constants.%.9] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc13_4.2() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -851,12 +859,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_38.2 => constants.%.4 +// CHECK:STDOUT: %.loc8_38.2 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.3) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.4) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T @@ -873,8 +881,8 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.5 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.6 +// CHECK:STDOUT: %.loc5_9.2 => constants.%.6 +// CHECK:STDOUT: %.loc5_9.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%.3) { @@ -885,7 +893,7 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.loc8_38.2 => constants.%.7 +// CHECK:STDOUT: %.loc8_38.2 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%.3) { @@ -907,8 +915,9 @@ fn G(x: A) { // CHECK:STDOUT: %U.patt: type = symbolic_binding_pattern U, 1 [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T, %U) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.3: %HasF.type = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.5: type = struct_type {} [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } @@ -942,13 +951,13 @@ fn G(x: A) { // CHECK:STDOUT: %U.loc9_24.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc9_24.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { -// CHECK:STDOUT: %x.patt: %.4 = binding_pattern x -// CHECK:STDOUT: %x.param_patt: %.4 = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: %.5 = binding_pattern x +// CHECK:STDOUT: %x.param_patt: %.5 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: %.4 = struct_literal () -// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%.4 [template = constants.%.4] -// CHECK:STDOUT: %x.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %x: %.4 = bind_name x, %x.param +// CHECK:STDOUT: %.loc13_10.1: %.5 = struct_literal () +// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%.5 [template = constants.%.5] +// CHECK:STDOUT: %x.param: %.5 = value_param runtime_param0 +// CHECK:STDOUT: %x: %.5 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -972,11 +981,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc9_14.2, %U.loc9_24.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc9_44.2: = interface_witness (%F) [symbolic = %.loc9_44.2 (constants.%.3)] +// CHECK:STDOUT: %.loc9_44.2: = interface_witness (%F) [symbolic = %.loc9_44.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc9_44.1: = interface_witness (%F.decl) [symbolic = %.loc9_44.2 (constants.%.3)] +// CHECK:STDOUT: %.loc9_44.1: = interface_witness (%F.decl) [symbolic = %.loc9_44.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -998,9 +1007,9 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%x.param_patt: %.4) { +// CHECK:STDOUT: fn @G(%x.param_patt: %.5) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: %.4 = name_ref x, %x +// CHECK:STDOUT: %x.ref: %.5 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: %F.ref: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] // CHECK:STDOUT: return @@ -1017,12 +1026,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc9_44.2 => constants.%.3 +// CHECK:STDOUT: %.loc9_44.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T, constants.%U) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc9_14.2, %U.loc9_24.2) { // CHECK:STDOUT: %T.loc9_14.2 => constants.%T @@ -1046,18 +1055,19 @@ fn G(x: A) { // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @HasF.%F.decl [symbolic] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.3: %HasF.type.2 = facet_value %T, %T [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: %A: type = class_type @A [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %B: type = class_type @B [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %HasF.type.3: type = facet_type <@HasF, @HasF(%B)> [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @HasF(%B) [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] -// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @HasF.%F.decl [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %HasF.type.3, %F.type.3 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, @HasF.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1138,11 +1148,11 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc8_37.2: = interface_witness (%F) [symbolic = %.loc8_37.2 (constants.%.3)] +// CHECK:STDOUT: %.loc8_37.2: = interface_witness (%F) [symbolic = %.loc8_37.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_33.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc8_37.1: = interface_witness (%F.decl) [symbolic = %.loc8_37.2 (constants.%.3)] +// CHECK:STDOUT: %.loc8_37.1: = interface_witness (%F.decl) [symbolic = %.loc8_37.2 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -1151,14 +1161,14 @@ fn G(x: A) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %.loc13: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc13: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%B @@ -1184,8 +1194,8 @@ fn G(x: A) { // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%B)> [template = constants.%HasF.type.3] -// CHECK:STDOUT: %.loc21: %.7 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%B) [template = constants.%.8] -// CHECK:STDOUT: %F.ref: %.7 = name_ref F, %.loc21 [template = constants.%.8] +// CHECK:STDOUT: %.loc21: %.8 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%B) [template = constants.%.9] +// CHECK:STDOUT: %F.ref: %.8 = name_ref F, %.loc21 [template = constants.%.9] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1222,12 +1232,12 @@ fn G(x: A) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc8_37.2 => constants.%.3 +// CHECK:STDOUT: %.loc8_37.2 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%T, constants.%T) {} +// CHECK:STDOUT: specific @F.1(constants.%T, constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T @@ -1244,7 +1254,7 @@ fn G(x: A) { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc5_9.2 => constants.%.7 -// CHECK:STDOUT: %.loc5_9.3 => constants.%.8 +// CHECK:STDOUT: %.loc5_9.2 => constants.%.8 +// CHECK:STDOUT: %.loc5_9.3 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 792c8588600b..54b2ca1e9c45 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -30,19 +30,21 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.1: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %.2: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.1 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.2 [template] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type.1 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.3: type = assoc_entity_type %I.type, %F.type.1 [template] +// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.5: type = struct_type {} [template] -// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] +// CHECK:STDOUT: %.5: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.7: type = struct_type {} [template] +// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: } @@ -73,7 +75,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc11 [template = constants.%C] -// CHECK:STDOUT: %.loc23_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] +// CHECK:STDOUT: %.loc23_15.1: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_15.1) [template = constants.%i32] // CHECK:STDOUT: %.loc23_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc23_15.3: type = converted %int.make_type_signed, %.loc23_15.2 [template = constants.%i32] @@ -87,24 +89,24 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.1.%.loc14_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%.loc14_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 32 [template = constants.%.1] +// CHECK:STDOUT: %.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %.loc14_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc14_14.3: type = converted %Self.ref, %.loc14_14.2 [symbolic = %.loc14_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc14_25.1: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc14_25.1) [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_signed, %.loc14_25.2 [template = constants.%i32] -// CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.1.%.loc14_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%.loc14_14.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] +// CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -120,7 +122,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %.loc19_27.1: Core.IntLiteral = int_value 32 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_27.1: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_27.1) [template = constants.%i32] // CHECK:STDOUT: %.loc19_27.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc19_27.3: type = converted %int.make_type_signed, %.loc19_27.2 [template = constants.%i32] @@ -129,7 +131,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.4] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -141,7 +143,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc21: = complete_type_witness %.5 [template = constants.%.6] +// CHECK:STDOUT: %.loc21: = complete_type_witness %.7 [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -150,8 +152,9 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc14_14.1: type = facet_access_type %Self [symbolic = %.loc14_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self (%Self)]() -> %i32; +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc14_14.1 (%.1)]() -> %i32; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %C]() -> %i32; @@ -159,8 +162,8 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: fn @F.3(%c.param_patt: %C) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc14 [template = constants.%.3] -// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] +// CHECK:STDOUT: %F.ref: %.3 = name_ref F, @I.%.loc14 [template = constants.%.4] +// CHECK:STDOUT: %.loc24_11.1: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] // CHECK:STDOUT: %.loc24_11.2: = bound_method %c.ref, %.loc24_11.1 // CHECK:STDOUT: %F.call: init %i32 = call %.loc24_11.2(%c.ref) // CHECK:STDOUT: %.loc24_15.1: %i32 = value_of_initializer %F.call @@ -170,9 +173,11 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc14_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) { -// CHECK:STDOUT: %Self => constants.%C +// CHECK:STDOUT: specific @F.1(constants.%.5) { +// CHECK:STDOUT: %Self => constants.%.5 +// CHECK:STDOUT: %.loc14_14.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon index d51db4a1be31..d148c9bae908 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -49,10 +49,11 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%U)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.4: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1, @I(%U) [symbolic] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.5: type = assoc_entity_type %I.type.2, %F.type.1 [symbolic] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %V: type = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: type = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %A.3: type = class_type @A, @A(%V) [symbolic] @@ -61,44 +62,45 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] // CHECK:STDOUT: %F.type.3: type = fn_type @F.1, @I(%V) [symbolic] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.6: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @I.%F.decl [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [symbolic] -// CHECK:STDOUT: %.9: type = unbound_element_type %A.3, %V [symbolic] -// CHECK:STDOUT: %.10: type = struct_type {.n: %V} [symbolic] -// CHECK:STDOUT: %.11: = complete_type_witness %.10 [symbolic] +// CHECK:STDOUT: %.7: type = assoc_entity_type %I.type.3, %F.type.3 [symbolic] +// CHECK:STDOUT: %.8: %.7 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.9: %I.type.2 = facet_value %A.3, %A.3 [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.11: type = unbound_element_type %A.3, %V [symbolic] +// CHECK:STDOUT: %.12: type = struct_type {.n: %V} [symbolic] +// CHECK:STDOUT: %.13: = complete_type_witness %.12 [symbolic] // CHECK:STDOUT: %W: type = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: type = symbolic_binding_pattern W, 0 [symbolic] // CHECK:STDOUT: %A.4: type = class_type @A, @A(%W) [symbolic] // CHECK:STDOUT: %TestGeneric.type: type = fn_type @TestGeneric [template] // CHECK:STDOUT: %TestGeneric: %TestGeneric.type = struct_value () [template] -// CHECK:STDOUT: %.13: type = unbound_element_type %A.4, %W [symbolic] -// CHECK:STDOUT: %.14: type = struct_type {.n: %W} [symbolic] -// CHECK:STDOUT: %.15: = complete_type_witness %.14 [symbolic] +// CHECK:STDOUT: %.15: type = unbound_element_type %A.4, %W [symbolic] +// CHECK:STDOUT: %.16: type = struct_type {.n: %W} [symbolic] +// CHECK:STDOUT: %.17: = complete_type_witness %.16 [symbolic] // CHECK:STDOUT: %I.type.4: type = facet_type <@I, @I(%W)> [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.1, @I(%W) [symbolic] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.17: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] -// CHECK:STDOUT: %.18: %.17 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.19: type = assoc_entity_type %I.type.4, %F.type.4 [symbolic] +// CHECK:STDOUT: %.20: %.19 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %F.type.5: type = fn_type @F.2, @impl(%W) [symbolic] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [symbolic] -// CHECK:STDOUT: %.19: = interface_witness (%F.5) [symbolic] -// CHECK:STDOUT: %.20: type = struct_type {} [template] -// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.20) [template] +// CHECK:STDOUT: %.21: = interface_witness (%F.5) [symbolic] +// CHECK:STDOUT: %.22: type = struct_type {} [template] +// CHECK:STDOUT: %A.5: type = class_type @A, @A(%.22) [template] // CHECK:STDOUT: %TestSpecific.type: type = fn_type @TestSpecific [template] // CHECK:STDOUT: %TestSpecific: %TestSpecific.type = struct_value () [template] -// CHECK:STDOUT: %.21: type = unbound_element_type %A.5, %.20 [template] -// CHECK:STDOUT: %.22: type = struct_type {.n: %.20} [template] -// CHECK:STDOUT: %.23: = complete_type_witness %.22 [template] -// CHECK:STDOUT: %I.type.5: type = facet_type <@I, @I(%.20)> [template] -// CHECK:STDOUT: %F.type.6: type = fn_type @F.1, @I(%.20) [template] +// CHECK:STDOUT: %.23: type = unbound_element_type %A.5, %.22 [template] +// CHECK:STDOUT: %.24: type = struct_type {.n: %.22} [template] +// CHECK:STDOUT: %.25: = complete_type_witness %.24 [template] +// CHECK:STDOUT: %I.type.5: type = facet_type <@I, @I(%.22)> [template] +// CHECK:STDOUT: %F.type.6: type = fn_type @F.1, @I(%.22) [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.26: type = assoc_entity_type %I.type.5, %F.type.6 [template] -// CHECK:STDOUT: %.27: %.26 = assoc_entity element0, @I.%F.decl [template] -// CHECK:STDOUT: %F.type.7: type = fn_type @F.2, @impl(%.20) [template] +// CHECK:STDOUT: %.28: type = assoc_entity_type %I.type.5, %F.type.6 [template] +// CHECK:STDOUT: %.29: %.28 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %F.type.7: type = fn_type @F.2, @impl(%.22) [template] // CHECK:STDOUT: %F.7: %F.type.7 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%F.7) [template] -// CHECK:STDOUT: %struct: %.20 = struct_value () [template] +// CHECK:STDOUT: %.30: = interface_witness (%F.7) [template] +// CHECK:STDOUT: %struct: %.22 = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -157,19 +159,19 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %TestSpecific.decl: %TestSpecific.type = fn_decl @TestSpecific [template = constants.%TestSpecific] { // CHECK:STDOUT: %a.patt: %A.5 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %A.5 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: %.20 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: %.20 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: %.22 = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: %.22 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] -// CHECK:STDOUT: %.loc20_23: %.20 = struct_literal () -// CHECK:STDOUT: %.loc20_21: type = converted %.loc20_23, constants.%.20 [template = constants.%.20] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.20) [template = constants.%A.5] -// CHECK:STDOUT: %.loc20_31.1: %.20 = struct_literal () -// CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%.20 [template = constants.%.20] +// CHECK:STDOUT: %.loc20_23: %.22 = struct_literal () +// CHECK:STDOUT: %.loc20_21: type = converted %.loc20_23, constants.%.22 [template = constants.%.22] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.22) [template = constants.%A.5] +// CHECK:STDOUT: %.loc20_31.1: %.22 = struct_literal () +// CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%.22 [template = constants.%.22] // CHECK:STDOUT: %a.param: %A.5 = value_param runtime_param0 // CHECK:STDOUT: %a: %A.5 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref %.20 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref %.20 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref %.22 = out_param runtime_param1 +// CHECK:STDOUT: %return: ref %.22 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -182,28 +184,28 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F.1, @I(%U.loc6_13.2) [symbolic = %F.type (constants.%F.type.1)] // CHECK:STDOUT: %F: @I.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] -// CHECK:STDOUT: %.loc7_26.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc7_26.2 (constants.%.4)] -// CHECK:STDOUT: %.loc7_26.3: @I.%.loc7_26.2 (%.4) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.5)] +// CHECK:STDOUT: %.loc7_26.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type.1) [symbolic = %.loc7_26.2 (constants.%.5)] +// CHECK:STDOUT: %.loc7_26.3: @I.%.loc7_26.2 (%.5) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @I.%F (constants.%F.1)] { -// CHECK:STDOUT: %self.patt: @F.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.1.%.loc7_14.1 (%.4) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%.loc7_14.1 (%.4) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @F.1.%U (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.1.%U (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc7_14.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc7_14.3: type = converted %Self.ref, %.loc7_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc7_14.2: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc7_14.3: type = facet_access_type %Self.ref [symbolic = %.loc7_14.1 (constants.%.4)] +// CHECK:STDOUT: %.loc7_14.4: type = converted %Self.ref, %.loc7_14.3 [symbolic = %.loc7_14.1 (constants.%.4)] // CHECK:STDOUT: %U.ref: type = name_ref U, @I.%U.loc6_13.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %self.param: @F.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @F.1.%.loc7_14.1 (%.4) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%.loc7_14.1 (%.4) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.1.%U (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.1.%U (%U) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7_26.1: @I.%.loc7_26.2 (%.4) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.5)] +// CHECK:STDOUT: %.loc7_26.1: @I.%.loc7_26.2 (%.5) = assoc_entity element0, %F.decl [symbolic = %.loc7_26.3 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -221,7 +223,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.8)] +// CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %A.loc10_25.1 as %I.type.loc10_33.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { @@ -237,7 +239,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.param: ref @F.2.%V (%V) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%V (%V) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.8)] +// CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -270,8 +272,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%U)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc7_14.1: type = facet_access_type %Self [symbolic = %.loc7_14.1 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self (%Self)]() -> @F.1.%U (%U); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc7_14.1 (%.4)]() -> @F.1.%U (%U); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.2(@impl.%V.loc10_14.1: type) { @@ -279,12 +282,12 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A: type = class_type @A, @A(%V) [symbolic = %A (constants.%A.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.loc12_16.3 (constants.%.9)] +// CHECK:STDOUT: %.loc12_16.3: type = unbound_element_type @F.2.%A (%A.3), @F.2.%V (%V) [symbolic = %.loc12_16.3 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%self.param_patt: @F.2.%A (%A.3)]() -> @F.2.%V (%V) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: @F.2.%A (%A.3) = name_ref self, %self -// CHECK:STDOUT: %n.ref: @F.2.%.loc12_16.3 (%.9) = name_ref n, @A.%.loc3_8.1 [template = @A.%.loc3_8.1] +// CHECK:STDOUT: %n.ref: @F.2.%.loc12_16.3 (%.11) = name_ref n, @A.%.loc3_8.1 [template = @A.%.loc3_8.1] // CHECK:STDOUT: %.loc12_16.1: ref @F.2.%V (%V) = class_element_access %self.ref, element0 // CHECK:STDOUT: %.loc12_16.2: @F.2.%V (%V) = bind_value %.loc12_16.1 // CHECK:STDOUT: return %.loc12_16.2 @@ -299,8 +302,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type.loc17_14.2: type = facet_type <@I, @I(%W.loc16_16.2)> [symbolic = %I.type.loc17_14.2 (constants.%I.type.4)] // CHECK:STDOUT: %F.type.loc17_17: type = fn_type @F.1, @I(%W.loc16_16.2) [symbolic = %F.type.loc17_17 (constants.%F.type.4)] -// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_14.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.17)] -// CHECK:STDOUT: %.loc17_17.3: @TestGeneric.%.loc17_17.2 (%.17) = assoc_entity element0, @I.%F.decl [symbolic = %.loc17_17.3 (constants.%.18)] +// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_14.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.19)] +// CHECK:STDOUT: %.loc17_17.3: @TestGeneric.%.loc17_17.2 (%.19) = assoc_entity element0, @I.%F.decl [symbolic = %.loc17_17.3 (constants.%.20)] // CHECK:STDOUT: %F.type.loc17_11: type = fn_type @F.2, @impl(%W.loc16_16.2) [symbolic = %F.type.loc17_11 (constants.%F.type.5)] // CHECK:STDOUT: %F: @TestGeneric.%F.type.loc17_11 (%F.type.5) = struct_value () [symbolic = %F (constants.%F.5)] // CHECK:STDOUT: @@ -310,9 +313,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %W.ref.loc17: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %I.type.loc17_14.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc17_14.2 (constants.%I.type.4)] -// CHECK:STDOUT: %.loc17_17.1: @TestGeneric.%.loc17_17.2 (%.17) = specific_constant @I.%.loc7_26.1, @I(constants.%W) [symbolic = %.loc17_17.3 (constants.%.18)] -// CHECK:STDOUT: %F.ref: @TestGeneric.%.loc17_17.2 (%.17) = name_ref F, %.loc17_17.1 [symbolic = %.loc17_17.3 (constants.%.18)] -// CHECK:STDOUT: %.loc17_11.1: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%.19, element0 [symbolic = %F (constants.%F.5)] +// CHECK:STDOUT: %.loc17_17.1: @TestGeneric.%.loc17_17.2 (%.19) = specific_constant @I.%.loc7_26.1, @I(constants.%W) [symbolic = %.loc17_17.3 (constants.%.20)] +// CHECK:STDOUT: %F.ref: @TestGeneric.%.loc17_17.2 (%.19) = name_ref F, %.loc17_17.1 [symbolic = %.loc17_17.3 (constants.%.20)] +// CHECK:STDOUT: %.loc17_11.1: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%.21, element0 [symbolic = %F (constants.%F.5)] // CHECK:STDOUT: %.loc17_11.2: = bound_method %a.ref, %.loc17_11.1 // CHECK:STDOUT: %.loc17_11.3: = specific_function %.loc17_11.2, @F.2(constants.%W) // CHECK:STDOUT: %F.call: init @TestGeneric.%W.loc16_16.2 (%W) = call %.loc17_11.3(%a.ref) @@ -322,23 +325,23 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.5) -> %.20 { +// CHECK:STDOUT: fn @TestSpecific(%a.param_patt: %A.5) -> %.22 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %A.5 = name_ref a, %a // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] -// CHECK:STDOUT: %.loc21_16: %.20 = struct_literal () -// CHECK:STDOUT: %.loc21_14: type = converted %.loc21_16, constants.%.20 [template = constants.%.20] -// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%.20)> [template = constants.%I.type.5] -// CHECK:STDOUT: %.loc21_18: %.26 = specific_constant @I.%.loc7_26.1, @I(constants.%.20) [template = constants.%.27] -// CHECK:STDOUT: %F.ref: %.26 = name_ref F, %.loc21_18 [template = constants.%.27] -// CHECK:STDOUT: %.loc21_11.1: %F.type.6 = interface_witness_access constants.%.28, element0 [template = constants.%F.7] +// CHECK:STDOUT: %.loc21_16: %.22 = struct_literal () +// CHECK:STDOUT: %.loc21_14: type = converted %.loc21_16, constants.%.22 [template = constants.%.22] +// CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%.22)> [template = constants.%I.type.5] +// CHECK:STDOUT: %.loc21_18: %.28 = specific_constant @I.%.loc7_26.1, @I(constants.%.22) [template = constants.%.29] +// CHECK:STDOUT: %F.ref: %.28 = name_ref F, %.loc21_18 [template = constants.%.29] +// CHECK:STDOUT: %.loc21_11.1: %F.type.6 = interface_witness_access constants.%.30, element0 [template = constants.%F.7] // CHECK:STDOUT: %.loc21_11.2: = bound_method %a.ref, %.loc21_11.1 -// CHECK:STDOUT: %.loc21_11.3: = specific_function %.loc21_11.2, @F.2(constants.%.20) -// CHECK:STDOUT: %F.call: init %.20 = call %.loc21_11.3(%a.ref) -// CHECK:STDOUT: %.loc21_21.1: ref %.20 = temporary_storage -// CHECK:STDOUT: %.loc21_21.2: ref %.20 = temporary %.loc21_21.1, %F.call -// CHECK:STDOUT: %struct: %.20 = struct_value () [template = constants.%struct] -// CHECK:STDOUT: %.loc21_23: %.20 = converted %F.call, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc21_11.3: = specific_function %.loc21_11.2, @F.2(constants.%.22) +// CHECK:STDOUT: %F.call: init %.22 = call %.loc21_11.3(%a.ref) +// CHECK:STDOUT: %.loc21_21.1: ref %.22 = temporary_storage +// CHECK:STDOUT: %.loc21_21.2: ref %.22 = temporary %.loc21_21.1, %F.call +// CHECK:STDOUT: %struct: %.22 = struct_value () [template = constants.%struct] +// CHECK:STDOUT: %.loc21_23: %.22 = converted %F.call, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc21_23 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -366,6 +369,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc7_14.1 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(%U.loc6_13.2) { @@ -379,9 +383,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.3 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.9 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.10 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.11 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.11 +// CHECK:STDOUT: %.loc4_1.2 => constants.%.12 +// CHECK:STDOUT: %.loc4_1.3 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%V) { @@ -393,8 +397,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.3 // CHECK:STDOUT: %F => constants.%F.3 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.6 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.7 +// CHECK:STDOUT: %.loc7_26.2 => constants.%.7 +// CHECK:STDOUT: %.loc7_26.3 => constants.%.8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@impl.%V.loc10_14.2) { @@ -416,7 +420,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.8 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@F.2.%V) { @@ -429,10 +433,11 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A => constants.%A.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%V, constants.%A.3) { +// CHECK:STDOUT: specific @F.1(constants.%V, constants.%.9) { // CHECK:STDOUT: %U => constants.%V // CHECK:STDOUT: %I.type => constants.%I.type.3 -// CHECK:STDOUT: %Self => constants.%A.3 +// CHECK:STDOUT: %Self => constants.%.9 +// CHECK:STDOUT: %.loc7_14.1 => constants.%A.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%V.loc10_14.2) { @@ -448,9 +453,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.4 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.13 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.14 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.15 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.15 +// CHECK:STDOUT: %.loc4_1.2 => constants.%.16 +// CHECK:STDOUT: %.loc4_1.3 => constants.%.17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(@TestGeneric.%W.loc16_16.2) { @@ -473,8 +478,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.4 // CHECK:STDOUT: %F => constants.%F.4 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.17 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.18 +// CHECK:STDOUT: %.loc7_26.2 => constants.%.19 +// CHECK:STDOUT: %.loc7_26.3 => constants.%.20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%W) { @@ -486,7 +491,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.5 // CHECK:STDOUT: %F => constants.%F.5 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.19 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%W) { @@ -494,7 +499,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %A => constants.%A.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3 => constants.%.13 +// CHECK:STDOUT: %.loc12_16.3 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@TestGeneric.%W.loc16_16.2) { @@ -509,47 +514,47 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @A(constants.%.20) { -// CHECK:STDOUT: %T.loc2_9.2 => constants.%.20 -// CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%.20 +// CHECK:STDOUT: specific @A(constants.%.22) { +// CHECK:STDOUT: %T.loc2_9.2 => constants.%.22 +// CHECK:STDOUT: %T.patt.loc2_9.2 => constants.%.22 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.5 -// CHECK:STDOUT: %.loc3_8.2 => constants.%.21 -// CHECK:STDOUT: %.loc4_1.2 => constants.%.22 -// CHECK:STDOUT: %.loc4_1.3 => constants.%.23 +// CHECK:STDOUT: %.loc3_8.2 => constants.%.23 +// CHECK:STDOUT: %.loc4_1.2 => constants.%.24 +// CHECK:STDOUT: %.loc4_1.3 => constants.%.25 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @I(constants.%.20) { -// CHECK:STDOUT: %U.loc6_13.2 => constants.%.20 -// CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%.20 +// CHECK:STDOUT: specific @I(constants.%.22) { +// CHECK:STDOUT: %U.loc6_13.2 => constants.%.22 +// CHECK:STDOUT: %U.patt.loc6_13.2 => constants.%.22 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %I.type => constants.%I.type.5 // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type.6 // CHECK:STDOUT: %F => constants.%F.6 -// CHECK:STDOUT: %.loc7_26.2 => constants.%.26 -// CHECK:STDOUT: %.loc7_26.3 => constants.%.27 +// CHECK:STDOUT: %.loc7_26.2 => constants.%.28 +// CHECK:STDOUT: %.loc7_26.3 => constants.%.29 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl(constants.%.20) { -// CHECK:STDOUT: %V.loc10_14.2 => constants.%.20 -// CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%.20 +// CHECK:STDOUT: specific @impl(constants.%.22) { +// CHECK:STDOUT: %V.loc10_14.2 => constants.%.22 +// CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%.22 // CHECK:STDOUT: %A.loc10_25.2 => constants.%A.5 // CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.7 // CHECK:STDOUT: %F => constants.%F.7 -// CHECK:STDOUT: %.loc10_37.2 => constants.%.28 +// CHECK:STDOUT: %.loc10_37.2 => constants.%.30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%.20) { -// CHECK:STDOUT: %V => constants.%.20 +// CHECK:STDOUT: specific @F.2(constants.%.22) { +// CHECK:STDOUT: %V => constants.%.22 // CHECK:STDOUT: %A => constants.%A.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_16.3 => constants.%.21 +// CHECK:STDOUT: %.loc12_16.3 => constants.%.23 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index bbed86ef78f5..727e944bb13a 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -152,7 +152,7 @@ import PackageGenericInterface; fn M() { var obj: PackageHasParam.AnyParam( PackageGenericInterface.GenericInterface) = {}; - // CHECK:STDERR: fail_todo_use_generic_interface_as_param.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Y` in type `AnyParam()` that does not implement that interface [MissingImplInMemberAccess] + // CHECK:STDERR: fail_todo_use_generic_interface_as_param.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Y` in type `AnyParam()` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: obj.(PackageHasParam.Y.K)(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -207,7 +207,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -236,7 +237,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc11: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc11: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -262,7 +263,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: // CHECK:STDOUT: --- package_b.carbon // CHECK:STDOUT: @@ -279,17 +280,20 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %.5: %HasG.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF> [template] // CHECK:STDOUT: %Self.2: %HasF.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%F.1) [template] +// CHECK:STDOUT: %.7: %HasF.type = facet_value %D, %D [template] +// CHECK:STDOUT: %.8: = interface_witness (%F.1) [template] // CHECK:STDOUT: %G.type.3: type = fn_type @G.3 [template] // CHECK:STDOUT: %G.3: %G.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%G.3) [template] +// CHECK:STDOUT: %.9: %HasG.type = facet_value %D, %D [template] +// CHECK:STDOUT: %.10: = interface_witness (%G.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -351,7 +355,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %C.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%G.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc13: = interface_witness (%G.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl @@ -360,7 +364,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %D.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc18: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -369,7 +373,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.3: %D.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.3 = fn_decl @G.3 [template = constants.%G.3] {} {} -// CHECK:STDOUT: %.loc23: = interface_witness (%G.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc23: = interface_witness (%G.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl @@ -415,13 +419,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.1) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%C) {} +// CHECK:STDOUT: specific @G.1(constants.%.5) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.2(constants.%D) {} +// CHECK:STDOUT: specific @F.2(constants.%.7) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%D) {} +// CHECK:STDOUT: specific @G.1(constants.%.9) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_cf.carbon // CHECK:STDOUT: @@ -454,7 +458,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.6 = import_ref PackageA//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref PackageA//default, inst+17, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.9: type = import_ref PackageA//default, inst+18, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.10: = import_ref PackageA//default, inst+23, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.10: = import_ref PackageA//default, inst+24, loaded [template = constants.%.6] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -548,19 +552,19 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.8 = import_ref PackageA//default, inst+13, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref PackageA//default, inst+17, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.10: type = import_ref PackageA//default, inst+18, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.11 = import_ref PackageA//default, inst+23, unloaded +// CHECK:STDOUT: %import_ref.11 = import_ref PackageA//default, inst+24, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref PackageB//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref PackageB//default, inst+12, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref PackageB//default, inst+7, unloaded // CHECK:STDOUT: %import_ref.15: type = import_ref PackageB//default, inst+24, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.16: type = import_ref PackageB//default, inst+25, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.17 = import_ref PackageB//default, inst+30, unloaded -// CHECK:STDOUT: %import_ref.18: type = import_ref PackageB//default, inst+33, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+42, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.20: = import_ref PackageB//default, inst+50, loaded [template = constants.%.6] -// CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+53, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.22: type = import_ref PackageB//default, inst+54, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.23 = import_ref PackageB//default, inst+59, unloaded +// CHECK:STDOUT: %import_ref.17 = import_ref PackageB//default, inst+31, unloaded +// CHECK:STDOUT: %import_ref.18: type = import_ref PackageB//default, inst+34, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+43, loaded [template = constants.%HasF.type] +// CHECK:STDOUT: %import_ref.20: = import_ref PackageB//default, inst+52, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+55, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.22: type = import_ref PackageB//default, inst+56, loaded [template = constants.%HasG.type] +// CHECK:STDOUT: %import_ref.23 = import_ref PackageB//default, inst+62, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -685,17 +689,17 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.10 = import_ref PackageA//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref PackageA//default, inst+17, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.12: type = import_ref PackageA//default, inst+18, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.13 = import_ref PackageA//default, inst+23, unloaded +// CHECK:STDOUT: %import_ref.13 = import_ref PackageA//default, inst+24, unloaded // CHECK:STDOUT: %import_ref.14: type = import_ref PackageB//default, inst+24, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.15: type = import_ref PackageB//default, inst+25, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.16: = import_ref PackageB//default, inst+30, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.16: = import_ref PackageB//default, inst+31, loaded [template = constants.%.6] // CHECK:STDOUT: %import_ref.17 = import_ref PackageB//default, inst+15, unloaded -// CHECK:STDOUT: %import_ref.18: type = import_ref PackageB//default, inst+33, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+42, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.20 = import_ref PackageB//default, inst+50, unloaded -// CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+53, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.22: type = import_ref PackageB//default, inst+54, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.23 = import_ref PackageB//default, inst+59, unloaded +// CHECK:STDOUT: %import_ref.18: type = import_ref PackageB//default, inst+34, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+43, loaded [template = constants.%HasF.type] +// CHECK:STDOUT: %import_ref.20 = import_ref PackageB//default, inst+52, unloaded +// CHECK:STDOUT: %import_ref.21: type = import_ref PackageB//default, inst+55, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.22: type = import_ref PackageB//default, inst+56, loaded [template = constants.%HasG.type] +// CHECK:STDOUT: %import_ref.23 = import_ref PackageB//default, inst+62, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -815,16 +819,16 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.8 = import_ref PackageB//default, inst+23, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref PackageB//default, inst+24, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.10: type = import_ref PackageB//default, inst+25, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.11 = import_ref PackageB//default, inst+30, unloaded -// CHECK:STDOUT: %import_ref.12 = import_ref PackageB//default, inst+39, unloaded -// CHECK:STDOUT: %import_ref.13 = import_ref PackageB//default, inst+40, unloaded -// CHECK:STDOUT: %import_ref.14 = import_ref PackageB//default, inst+41, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref PackageB//default, inst+33, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.16: type = import_ref PackageB//default, inst+42, loaded [template = constants.%HasF.type] -// CHECK:STDOUT: %import_ref.17 = import_ref PackageB//default, inst+50, unloaded -// CHECK:STDOUT: %import_ref.18: type = import_ref PackageB//default, inst+53, loaded [template = constants.%D] -// CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+54, loaded [template = constants.%HasG.type] -// CHECK:STDOUT: %import_ref.20: = import_ref PackageB//default, inst+59, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.11 = import_ref PackageB//default, inst+31, unloaded +// CHECK:STDOUT: %import_ref.12 = import_ref PackageB//default, inst+40, unloaded +// CHECK:STDOUT: %import_ref.13 = import_ref PackageB//default, inst+41, unloaded +// CHECK:STDOUT: %import_ref.14 = import_ref PackageB//default, inst+42, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref PackageB//default, inst+34, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.16: type = import_ref PackageB//default, inst+43, loaded [template = constants.%HasF.type] +// CHECK:STDOUT: %import_ref.17 = import_ref PackageB//default, inst+52, unloaded +// CHECK:STDOUT: %import_ref.18: type = import_ref PackageB//default, inst+55, loaded [template = constants.%D] +// CHECK:STDOUT: %import_ref.19: type = import_ref PackageB//default, inst+56, loaded [template = constants.%HasG.type] +// CHECK:STDOUT: %import_ref.20: = import_ref PackageB//default, inst+62, loaded [template = constants.%.6] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -915,7 +919,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Z.%H.decl [template] // CHECK:STDOUT: %H.type.2: type = fn_type @H.2 [template] // CHECK:STDOUT: %H.2: %H.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%H.2) [template] +// CHECK:STDOUT: %.3: %Z.type = facet_value %empty_tuple.type, %empty_tuple.type [template] +// CHECK:STDOUT: %.4: = interface_witness (%H.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -943,7 +948,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %.loc8_7.2 as %Z.ref { // CHECK:STDOUT: %H.decl: %H.type.2 = fn_decl @H.2 [template = constants.%H.2] {} {} -// CHECK:STDOUT: %.loc8_14: = interface_witness (%H.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc8_14: = interface_witness (%H.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .H = %H.decl @@ -962,7 +967,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @H.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @H.1(constants.%empty_tuple.type) {} +// CHECK:STDOUT: specific @H.1(constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: --- import_associated_interface.carbon // CHECK:STDOUT: @@ -991,7 +996,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.4 = import_ref PackageAssociatedInterface//default, inst+5, unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref PackageAssociatedInterface//default, inst+13, loaded [template = constants.%empty_tuple.type] // CHECK:STDOUT: %import_ref.7: type = import_ref PackageAssociatedInterface//default, inst+14, loaded [template = constants.%Z.type] -// CHECK:STDOUT: %import_ref.8: = import_ref PackageAssociatedInterface//default, inst+19, loaded [template = constants.%.3] +// CHECK:STDOUT: %import_ref.8: = import_ref PackageAssociatedInterface//default, inst+20, loaded [template = constants.%.3] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1145,12 +1150,13 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %K.1: %K.type.1 = struct_value () [template] // CHECK:STDOUT: %K.type.2: type = fn_type @K.2 [template] // CHECK:STDOUT: %K.2: %K.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%K.1) [template] +// CHECK:STDOUT: %.3: %Y.type = facet_value %AnyParam.3, %AnyParam.3 [template] +// CHECK:STDOUT: %.4: = interface_witness (%K.1) [template] // CHECK:STDOUT: %L.type: type = fn_type @L [template] // CHECK:STDOUT: %L: %L.type = struct_value () [template] // CHECK:STDOUT: %struct: %AnyParam.3 = struct_value () [template] -// CHECK:STDOUT: %.5: type = assoc_entity_type %Y.type, %K.type.2 [template] -// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.7 [template] +// CHECK:STDOUT: %.6: type = assoc_entity_type %Y.type, %K.type.2 [template] +// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.7 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -1163,7 +1169,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.2 = import_ref PackageHasParam//default, inst+22, unloaded // CHECK:STDOUT: %import_ref.3: type = import_ref PackageHasParam//default, inst+26, loaded [template = constants.%Y.type] // CHECK:STDOUT: %import_ref.4 = import_ref PackageHasParam//default, inst+28, unloaded -// CHECK:STDOUT: %import_ref.5: %.5 = import_ref PackageHasParam//default, inst+34, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.5: %.6 = import_ref PackageHasParam//default, inst+34, loaded [template = constants.%.7] // CHECK:STDOUT: %import_ref.6: %K.type.2 = import_ref PackageHasParam//default, inst+30, loaded [template = constants.%K.2] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1218,7 +1224,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %AnyParam as %Y.ref { // CHECK:STDOUT: %K.decl: %K.type.1 = fn_decl @K.1 [template = constants.%K.1] {} {} -// CHECK:STDOUT: %.loc8: = interface_witness (%K.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc8: = interface_witness (%K.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl @@ -1265,8 +1271,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %obj.ref: ref %AnyParam.3 = name_ref obj, %obj // CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%import_ref.3 [template = constants.%Y.type] -// CHECK:STDOUT: %K.ref: %.5 = name_ref K, imports.%import_ref.5 [template = constants.%.6] -// CHECK:STDOUT: %.loc14: %K.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%K.1] +// CHECK:STDOUT: %K.ref: %.6 = name_ref K, imports.%import_ref.5 [template = constants.%.7] +// CHECK:STDOUT: %.loc14: %K.type.2 = interface_witness_access constants.%.4, element0 [template = constants.%K.1] // CHECK:STDOUT: %K.call: init %empty_tuple.type = call %.loc14() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1306,7 +1312,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: specific @K.2(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @K.2(constants.%AnyParam.3) {} +// CHECK:STDOUT: specific @K.2(constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_todo_use_generic_interface_as_param.carbon // CHECK:STDOUT: @@ -1501,7 +1507,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.type.2) [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: %I.type = facet_value %C.3, %C.3 [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1627,7 +1634,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc16_79: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc16_79: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -1670,7 +1677,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %T.patt.loc13_9.2 => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C.3) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_use_has_extra_interfaces.carbon // CHECK:STDOUT: @@ -1721,7 +1728,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %import_ref.15 = import_ref HasExtraInterfaces//default, inst+3, unloaded // CHECK:STDOUT: %import_ref.16: type = import_ref HasExtraInterfaces//default, inst+72, loaded [template = constants.%C.4] // CHECK:STDOUT: %import_ref.17: type = import_ref HasExtraInterfaces//default, inst+74, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.18 = import_ref HasExtraInterfaces//default, inst+79, unloaded +// CHECK:STDOUT: %import_ref.18 = import_ref HasExtraInterfaces//default, inst+80, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index 3216e91262df..62544c24cd33 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -178,12 +178,14 @@ fn P(o: O) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: %HasF.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: %G.type.2: type = fn_type @G.2 [template] // CHECK:STDOUT: %G.2: %G.type.2 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%G.2) [template] -// CHECK:STDOUT: %.7: type = struct_type {} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.7: %HasG.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.8: = interface_witness (%G.2) [template] +// CHECK:STDOUT: %.9: type = struct_type {} [template] +// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: } @@ -241,7 +243,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasF.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc13: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -250,7 +252,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasG.ref { // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%G.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc16: = interface_witness (%G.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .G = %G.decl @@ -266,7 +268,7 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %HasG.ref: type = name_ref HasG, file.%HasG.decl [template = constants.%HasG.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.9 [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -298,19 +300,19 @@ fn P(o: O) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc22: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %F.ref.loc22: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc22: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc22: init %empty_tuple.type = call %.loc22() // CHECK:STDOUT: %c.ref.loc23: %C = name_ref c, %c // CHECK:STDOUT: %F.ref.loc23: %.1 = name_ref F, @HasF.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.5, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc23: %F.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc23: init %empty_tuple.type = call %.loc23() // CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %G.ref.loc24: %.3 = name_ref G, @HasG.%.loc9 [template = constants.%.4] -// CHECK:STDOUT: %.loc24: %G.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%G.2] +// CHECK:STDOUT: %.loc24: %G.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%G.2] // CHECK:STDOUT: %G.call.loc24: init %empty_tuple.type = call %.loc24() // CHECK:STDOUT: %c.ref.loc25: %C = name_ref c, %c // CHECK:STDOUT: %G.ref.loc25: %.3 = name_ref G, @HasG.%.loc9 [template = constants.%.4] -// CHECK:STDOUT: %.loc25: %G.type.1 = interface_witness_access constants.%.6, element0 [template = constants.%G.2] +// CHECK:STDOUT: %.loc25: %G.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%G.2] // CHECK:STDOUT: %G.call.loc25: init %empty_tuple.type = call %.loc25() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -319,9 +321,9 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @G.1(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @G.1(constants.%C) {} +// CHECK:STDOUT: specific @G.1(constants.%.7) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_ambiguous_impls.carbon // CHECK:STDOUT: @@ -341,12 +343,14 @@ fn P(o: O) { // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %A.type.3: type = fn_type @A.3 [template] // CHECK:STDOUT: %A.3: %A.type.3 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%A.3) [template] +// CHECK:STDOUT: %.5: %HasA1.type = facet_value %D, %D [template] +// CHECK:STDOUT: %.6: = interface_witness (%A.3) [template] // CHECK:STDOUT: %A.type.4: type = fn_type @A.4 [template] // CHECK:STDOUT: %A.4: %A.type.4 = struct_value () [template] -// CHECK:STDOUT: %.6: = interface_witness (%A.4) [template] -// CHECK:STDOUT: %.7: type = struct_type {} [template] -// CHECK:STDOUT: %.8: = complete_type_witness %.7 [template] +// CHECK:STDOUT: %.7: %HasA2.type = facet_value %D, %D [template] +// CHECK:STDOUT: %.8: = interface_witness (%A.4) [template] +// CHECK:STDOUT: %.9: type = struct_type {} [template] +// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: } @@ -404,7 +408,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasA1.ref { // CHECK:STDOUT: %A.decl: %A.type.3 = fn_decl @A.3 [template = constants.%A.3] {} {} -// CHECK:STDOUT: %.loc13: = interface_witness (%A.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc13: = interface_witness (%A.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl @@ -413,7 +417,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasA2.ref { // CHECK:STDOUT: %A.decl: %A.type.4 = fn_decl @A.4 [template = constants.%A.4] {} {} -// CHECK:STDOUT: %.loc16: = interface_witness (%A.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc16: = interface_witness (%A.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .A = %A.decl @@ -429,7 +433,7 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%D [template = constants.%D] // CHECK:STDOUT: %HasA2.ref: type = name_ref HasA2, file.%HasA2.decl [template = constants.%HasA2.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = complete_type_witness %.7 [template = constants.%.8] +// CHECK:STDOUT: %.loc19: = complete_type_witness %.9 [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -470,9 +474,9 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @A.2(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.1(constants.%D) {} +// CHECK:STDOUT: specific @A.1(constants.%.5) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @A.2(constants.%D) {} +// CHECK:STDOUT: specific @A.2(constants.%.7) {} // CHECK:STDOUT: // CHECK:STDOUT: --- different_impl_and_base.carbon // CHECK:STDOUT: @@ -493,9 +497,10 @@ fn P(o: O) { // CHECK:STDOUT: %.6: type = unbound_element_type %E, %B [template] // CHECK:STDOUT: %I.type.2: type = fn_type @I.2 [template] // CHECK:STDOUT: %I.2: %I.type.2 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%I.2) [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %B} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.7: %HasI.type = facet_value %E, %E [template] +// CHECK:STDOUT: %.8: = interface_witness (%I.2) [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %B} [template] +// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] // CHECK:STDOUT: } @@ -542,7 +547,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasI.ref { // CHECK:STDOUT: %I.decl: %I.type.2 = fn_decl @I.2 [template = constants.%I.2] {} {} -// CHECK:STDOUT: %.loc14: = interface_witness (%I.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc14: = interface_witness (%I.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .I = %I.decl @@ -565,7 +570,7 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%E [template = constants.%E] // CHECK:STDOUT: %HasI.ref: type = name_ref HasI, file.%HasI.decl [template = constants.%HasI.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.9 [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%E @@ -593,11 +598,11 @@ fn P(o: O) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %E.ref.loc20: type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %I.ref.loc20: %.1 = name_ref I, @HasI.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc20: %I.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%I.2] +// CHECK:STDOUT: %.loc20: %I.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%I.2] // CHECK:STDOUT: %I.call.loc20: init %empty_tuple.type = call %.loc20() // CHECK:STDOUT: %e.ref.loc21: %E = name_ref e, %e // CHECK:STDOUT: %I.ref.loc21: %.1 = name_ref I, @HasI.%.loc5 [template = constants.%.2] -// CHECK:STDOUT: %.loc21: %I.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%I.2] +// CHECK:STDOUT: %.loc21: %I.type.1 = interface_witness_access constants.%.8, element0 [template = constants.%I.2] // CHECK:STDOUT: %I.call.loc21: init %empty_tuple.type = call %.loc21() // CHECK:STDOUT: %E.ref.loc22: type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %J.ref.loc22: %J.type = name_ref J, @B.%J.decl [template = constants.%J] @@ -610,7 +615,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @I.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @I.1(constants.%E) {} +// CHECK:STDOUT: specific @I.1(constants.%.7) {} // CHECK:STDOUT: // CHECK:STDOUT: --- fail_ambiguous_impl_and_base.carbon // CHECK:STDOUT: @@ -630,9 +635,10 @@ fn P(o: O) { // CHECK:STDOUT: %.6: type = unbound_element_type %L, %Base [template] // CHECK:STDOUT: %K.type.3: type = fn_type @K.3 [template] // CHECK:STDOUT: %K.3: %K.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%K.3) [template] -// CHECK:STDOUT: %.8: type = struct_type {.base: %Base} [template] -// CHECK:STDOUT: %.9: = complete_type_witness %.8 [template] +// CHECK:STDOUT: %.7: %HasK.type = facet_value %L, %L [template] +// CHECK:STDOUT: %.8: = interface_witness (%K.3) [template] +// CHECK:STDOUT: %.9: type = struct_type {.base: %Base} [template] +// CHECK:STDOUT: %.10: = complete_type_witness %.9 [template] // CHECK:STDOUT: %M.type: type = fn_type @M [template] // CHECK:STDOUT: %M: %M.type = struct_value () [template] // CHECK:STDOUT: } @@ -679,7 +685,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %HasK.ref { // CHECK:STDOUT: %K.decl: %K.type.3 = fn_decl @K.3 [template = constants.%K.3] {} {} -// CHECK:STDOUT: %.loc14: = interface_witness (%K.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc14: = interface_witness (%K.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .K = %K.decl @@ -702,7 +708,7 @@ fn P(o: O) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%L [template = constants.%L] // CHECK:STDOUT: %HasK.ref: type = name_ref HasK, file.%HasK.decl [template = constants.%HasK.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = complete_type_witness %.8 [template = constants.%.9] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.9 [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%L @@ -737,7 +743,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @K.2(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @K.2(constants.%L) {} +// CHECK:STDOUT: specific @K.2(constants.%.7) {} // CHECK:STDOUT: // CHECK:STDOUT: --- ambiguity_hidden.carbon // CHECK:STDOUT: @@ -764,14 +770,16 @@ fn P(o: O) { // CHECK:STDOUT: %.8: type = unbound_element_type %O, %NBase [template] // CHECK:STDOUT: %N.type.4: type = fn_type @N.4 [template] // CHECK:STDOUT: %N.4: %N.type.4 = struct_value () [template] -// CHECK:STDOUT: %.9: = interface_witness (%N.4) [template] +// CHECK:STDOUT: %.9: %HasN1.type = facet_value %O, %O [template] +// CHECK:STDOUT: %.10: = interface_witness (%N.4) [template] // CHECK:STDOUT: %N.type.5: type = fn_type @N.5 [template] // CHECK:STDOUT: %N.5: %N.type.5 = struct_value () [template] -// CHECK:STDOUT: %.10: = interface_witness (%N.5) [template] +// CHECK:STDOUT: %.11: %HasN2.type = facet_value %O, %O [template] +// CHECK:STDOUT: %.12: = interface_witness (%N.5) [template] // CHECK:STDOUT: %N.type.6: type = fn_type @N.6 [template] // CHECK:STDOUT: %N.6: %N.type.6 = struct_value () [template] -// CHECK:STDOUT: %.11: type = struct_type {.base: %NBase} [template] -// CHECK:STDOUT: %.12: = complete_type_witness %.11 [template] +// CHECK:STDOUT: %.13: type = struct_type {.base: %NBase} [template] +// CHECK:STDOUT: %.14: = complete_type_witness %.13 [template] // CHECK:STDOUT: %P.type: type = fn_type @P [template] // CHECK:STDOUT: %P: %P.type = struct_value () [template] // CHECK:STDOUT: } @@ -831,7 +839,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %Self.ref as %HasN1.ref { // CHECK:STDOUT: %N.decl: %N.type.4 = fn_decl @N.4 [template = constants.%N.4] {} {} -// CHECK:STDOUT: %.loc18: = interface_witness (%N.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc18: = interface_witness (%N.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl @@ -840,7 +848,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %Self.ref as %HasN2.ref { // CHECK:STDOUT: %N.decl: %N.type.5 = fn_decl @N.5 [template = constants.%N.5] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%N.decl) [template = constants.%.10] +// CHECK:STDOUT: %.loc21: = interface_witness (%N.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .N = %N.decl @@ -868,7 +876,7 @@ fn P(o: O) { // CHECK:STDOUT: %HasN2.ref: type = name_ref HasN2, file.%HasN2.decl [template = constants.%HasN2.type] // CHECK:STDOUT: } // CHECK:STDOUT: %N.decl: %N.type.6 = fn_decl @N.6 [template = constants.%N.6] {} {} -// CHECK:STDOUT: %.loc25: = complete_type_witness %.11 [template = constants.%.12] +// CHECK:STDOUT: %.loc25: = complete_type_witness %.13 [template = constants.%.14] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%O @@ -921,7 +929,7 @@ fn P(o: O) { // CHECK:STDOUT: // CHECK:STDOUT: specific @N.3(constants.%Self.2) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.2(constants.%O) {} +// CHECK:STDOUT: specific @N.2(constants.%.9) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @N.3(constants.%O) {} +// CHECK:STDOUT: specific @N.3(constants.%.11) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/basic.carbon b/toolchain/check/testdata/impl/no_prelude/basic.carbon index 8e1594268816..08478d30b5c5 100644 --- a/toolchain/check/testdata/impl/no_prelude/basic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/basic.carbon @@ -32,7 +32,8 @@ impl C as Simple { // CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: %Simple.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -61,7 +62,7 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %Simple.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%F.decl) [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -87,5 +88,5 @@ impl C as Simple { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index 89e811a52db7..35361be8e781 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -78,13 +78,17 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %Self.5: %L.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T.1: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.1: %I.type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %T.1 [symbolic] // CHECK:STDOUT: %T.2: %J.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.2: %J.type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.2: type = facet_access_type %T.2 [symbolic] // CHECK:STDOUT: %T.3: %K.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.3: %K.type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.3: type = facet_access_type %T.3 [symbolic] // CHECK:STDOUT: %T.4: %L.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt.4: %L.type = symbolic_binding_pattern T, 0 [symbolic] -// CHECK:STDOUT: %.1: = interface_witness () [template] +// CHECK:STDOUT: %.4: type = facet_access_type %T.4 [symbolic] +// CHECK:STDOUT: %.5: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -106,8 +110,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc11_21.1: type = facet_type_access %T.ref [symbolic = %T.loc11_14.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc11_21.2: type = converted %T.ref, %.loc11_21.1 [symbolic = %T.loc11_14.2 (constants.%T.1)] +// CHECK:STDOUT: %.loc11_21.1: type = facet_access_type %T.ref [symbolic = %.loc11_21.3 (constants.%.1)] +// CHECK:STDOUT: %.loc11_21.2: type = converted %T.ref, %.loc11_21.1 [symbolic = %.loc11_21.3 (constants.%.1)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc11_14.1: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_14.2 (constants.%T.1)] @@ -118,8 +122,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc12_21.1: type = facet_type_access %T.ref [symbolic = %T.loc12_14.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc12_21.2: type = converted %T.ref, %.loc12_21.1 [symbolic = %T.loc12_14.2 (constants.%T.2)] +// CHECK:STDOUT: %.loc12_21.1: type = facet_access_type %T.ref [symbolic = %.loc12_21.3 (constants.%.2)] +// CHECK:STDOUT: %.loc12_21.2: type = converted %T.ref, %.loc12_21.1 [symbolic = %.loc12_21.3 (constants.%.2)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %J.type = value_param runtime_param // CHECK:STDOUT: %T.loc12_14.1: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_14.2 (constants.%T.2)] @@ -130,8 +134,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc13_14.1 [symbolic = %T.loc13_14.2 (constants.%T.3)] -// CHECK:STDOUT: %.loc13_21.1: type = facet_type_access %T.ref [symbolic = %T.loc13_14.2 (constants.%T.3)] -// CHECK:STDOUT: %.loc13_21.2: type = converted %T.ref, %.loc13_21.1 [symbolic = %T.loc13_14.2 (constants.%T.3)] +// CHECK:STDOUT: %.loc13_21.1: type = facet_access_type %T.ref [symbolic = %.loc13_21.3 (constants.%.3)] +// CHECK:STDOUT: %.loc13_21.2: type = converted %T.ref, %.loc13_21.1 [symbolic = %.loc13_21.3 (constants.%.3)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %K.type = value_param runtime_param // CHECK:STDOUT: %T.loc13_14.1: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_14.2 (constants.%T.3)] @@ -142,8 +146,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T.4)] -// CHECK:STDOUT: %.loc14_21.1: type = facet_type_access %T.ref [symbolic = %T.loc14_14.2 (constants.%T.4)] -// CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref, %.loc14_21.1 [symbolic = %T.loc14_14.2 (constants.%T.4)] +// CHECK:STDOUT: %.loc14_21.1: type = facet_access_type %T.ref [symbolic = %.loc14_21.3 (constants.%.4)] +// CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref, %.loc14_21.1 [symbolic = %.loc14_21.3 (constants.%.4)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %L.type = value_param runtime_param // CHECK:STDOUT: %T.loc14_14.1: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_14.2 (constants.%T.4)] @@ -154,8 +158,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc18_14.1 [symbolic = %T.loc18_14.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc18_21.1: type = facet_type_access %T.ref [symbolic = %T.loc18_14.2 (constants.%T.1)] -// CHECK:STDOUT: %.loc18_21.2: type = converted %T.ref, %.loc18_21.1 [symbolic = %T.loc18_14.2 (constants.%T.1)] +// CHECK:STDOUT: %.loc18_21.1: type = facet_access_type %T.ref [symbolic = %.loc18_21.3 (constants.%.1)] +// CHECK:STDOUT: %.loc18_21.2: type = converted %T.ref, %.loc18_21.1 [symbolic = %.loc18_21.3 (constants.%.1)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc18_14.1: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc18_14.2 (constants.%T.1)] @@ -166,8 +170,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc19_14.1 [symbolic = %T.loc19_14.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc19_21.1: type = facet_type_access %T.ref [symbolic = %T.loc19_14.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc19_21.2: type = converted %T.ref, %.loc19_21.1 [symbolic = %T.loc19_14.2 (constants.%T.2)] +// CHECK:STDOUT: %.loc19_21.1: type = facet_access_type %T.ref [symbolic = %.loc19_21.3 (constants.%.2)] +// CHECK:STDOUT: %.loc19_21.2: type = converted %T.ref, %.loc19_21.1 [symbolic = %.loc19_21.3 (constants.%.2)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %J.type = value_param runtime_param // CHECK:STDOUT: %T.loc19_14.1: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_14.2 (constants.%T.2)] @@ -178,8 +182,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T.3)] -// CHECK:STDOUT: %.loc20_21.1: type = facet_type_access %T.ref [symbolic = %T.loc20_14.2 (constants.%T.3)] -// CHECK:STDOUT: %.loc20_21.2: type = converted %T.ref, %.loc20_21.1 [symbolic = %T.loc20_14.2 (constants.%T.3)] +// CHECK:STDOUT: %.loc20_21.1: type = facet_access_type %T.ref [symbolic = %.loc20_21.3 (constants.%.3)] +// CHECK:STDOUT: %.loc20_21.2: type = converted %T.ref, %.loc20_21.1 [symbolic = %.loc20_21.3 (constants.%.3)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %K.type = value_param runtime_param // CHECK:STDOUT: %T.loc20_14.1: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc20_14.2 (constants.%T.3)] @@ -190,8 +194,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T.4)] -// CHECK:STDOUT: %.loc21_21.1: type = facet_type_access %T.ref [symbolic = %T.loc21_14.2 (constants.%T.4)] -// CHECK:STDOUT: %.loc21_21.2: type = converted %T.ref, %.loc21_21.1 [symbolic = %T.loc21_14.2 (constants.%T.4)] +// CHECK:STDOUT: %.loc21_21.1: type = facet_access_type %T.ref [symbolic = %.loc21_21.3 (constants.%.4)] +// CHECK:STDOUT: %.loc21_21.2: type = converted %T.ref, %.loc21_21.1 [symbolic = %.loc21_21.3 (constants.%.4)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %L.type = value_param runtime_param // CHECK:STDOUT: %T.loc21_14.1: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_14.2 (constants.%T.4)] @@ -241,6 +245,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.1(%T.loc11_14.1: %I.type) { // CHECK:STDOUT: %T.loc11_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T.1)] // CHECK:STDOUT: %T.patt.loc11_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt.1)] +// CHECK:STDOUT: %.loc11_21.3: type = facet_access_type %T.loc11_14.2 [symbolic = %.loc11_21.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc11_21.2 as %Interface.ref; // CHECK:STDOUT: } @@ -248,6 +253,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.2(%T.loc12_14.1: %J.type) { // CHECK:STDOUT: %T.loc12_14.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc12_14.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc12_14.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.2)] +// CHECK:STDOUT: %.loc12_21.3: type = facet_access_type %T.loc12_14.2 [symbolic = %.loc12_21.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc12_21.2 as %Interface.ref; // CHECK:STDOUT: } @@ -255,6 +261,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.3(%T.loc13_14.1: %K.type) { // CHECK:STDOUT: %T.loc13_14.2: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc13_14.2 (constants.%T.3)] // CHECK:STDOUT: %T.patt.loc13_14.2: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_14.2 (constants.%T.patt.3)] +// CHECK:STDOUT: %.loc13_21.3: type = facet_access_type %T.loc13_14.2 [symbolic = %.loc13_21.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc13_21.2 as %Interface.ref; // CHECK:STDOUT: } @@ -262,6 +269,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.4(%T.loc14_14.1: %L.type) { // CHECK:STDOUT: %T.loc14_14.2: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc14_14.2 (constants.%T.4)] // CHECK:STDOUT: %T.patt.loc14_14.2: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt.4)] +// CHECK:STDOUT: %.loc14_21.3: type = facet_access_type %T.loc14_14.2 [symbolic = %.loc14_21.3 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc14_21.2 as %Interface.ref; // CHECK:STDOUT: } @@ -269,11 +277,12 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.5(%T.loc18_14.1: %I.type) { // CHECK:STDOUT: %T.loc18_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc18_14.2 (constants.%T.1)] // CHECK:STDOUT: %T.patt.loc18_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt.1)] +// CHECK:STDOUT: %.loc18_21.3: type = facet_access_type %T.loc18_14.2 [symbolic = %.loc18_21.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc18_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: %.loc18_36: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc18_36 @@ -283,11 +292,12 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.6(%T.loc19_14.1: %J.type) { // CHECK:STDOUT: %T.loc19_14.2: %J.type = bind_symbolic_name T, 0 [symbolic = %T.loc19_14.2 (constants.%T.2)] // CHECK:STDOUT: %T.patt.loc19_14.2: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_14.2 (constants.%T.patt.2)] +// CHECK:STDOUT: %.loc19_21.3: type = facet_access_type %T.loc19_14.2 [symbolic = %.loc19_21.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc19_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: %.loc19_36: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc19_36 @@ -297,11 +307,12 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.7(%T.loc20_14.1: %K.type) { // CHECK:STDOUT: %T.loc20_14.2: %K.type = bind_symbolic_name T, 0 [symbolic = %T.loc20_14.2 (constants.%T.3)] // CHECK:STDOUT: %T.patt.loc20_14.2: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt.3)] +// CHECK:STDOUT: %.loc20_21.3: type = facet_access_type %T.loc20_14.2 [symbolic = %.loc20_21.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc20_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: %.loc20_36: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc20_36 @@ -311,11 +322,12 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl.8(%T.loc21_14.1: %L.type) { // CHECK:STDOUT: %T.loc21_14.2: %L.type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T.4)] // CHECK:STDOUT: %T.patt.loc21_14.2: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt.4)] +// CHECK:STDOUT: %.loc21_21.3: type = facet_access_type %T.loc21_14.2 [symbolic = %.loc21_21.3 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc21_21.2 as %Interface.ref { -// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.1] +// CHECK:STDOUT: %.loc21_36: = interface_witness () [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: witness = %.loc21_36 @@ -325,41 +337,49 @@ impl (C, C).0 as I {} // CHECK:STDOUT: specific @impl.1(constants.%T.1) { // CHECK:STDOUT: %T.loc11_14.2 => constants.%T.1 // CHECK:STDOUT: %T.patt.loc11_14.2 => constants.%T.1 +// CHECK:STDOUT: %.loc11_21.3 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.2(constants.%T.2) { // CHECK:STDOUT: %T.loc12_14.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc12_14.2 => constants.%T.2 +// CHECK:STDOUT: %.loc12_21.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%T.3) { // CHECK:STDOUT: %T.loc13_14.2 => constants.%T.3 // CHECK:STDOUT: %T.patt.loc13_14.2 => constants.%T.3 +// CHECK:STDOUT: %.loc13_21.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.4(constants.%T.4) { // CHECK:STDOUT: %T.loc14_14.2 => constants.%T.4 // CHECK:STDOUT: %T.patt.loc14_14.2 => constants.%T.4 +// CHECK:STDOUT: %.loc14_21.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.5(constants.%T.1) { // CHECK:STDOUT: %T.loc18_14.2 => constants.%T.1 // CHECK:STDOUT: %T.patt.loc18_14.2 => constants.%T.1 +// CHECK:STDOUT: %.loc18_21.3 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.6(constants.%T.2) { // CHECK:STDOUT: %T.loc19_14.2 => constants.%T.2 // CHECK:STDOUT: %T.patt.loc19_14.2 => constants.%T.2 +// CHECK:STDOUT: %.loc19_21.3 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%T.3) { // CHECK:STDOUT: %T.loc20_14.2 => constants.%T.3 // CHECK:STDOUT: %T.patt.loc20_14.2 => constants.%T.3 +// CHECK:STDOUT: %.loc20_21.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.8(constants.%T.4) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T.4 // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T.4 +// CHECK:STDOUT: %.loc21_21.3 => constants.%.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_same_self_and_interface_redefined.carbon @@ -371,6 +391,7 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %Self.2: %J.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %T: %I.type = bind_symbolic_name T, 0 [symbolic] // CHECK:STDOUT: %T.patt: %I.type = symbolic_binding_pattern T, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -386,8 +407,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref.loc7: %I.type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_21.1: type = facet_type_access %T.ref.loc7 [symbolic = %T.loc7_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_21.2: type = converted %T.ref.loc7, %.loc7_21.1 [symbolic = %T.loc7_14.2 (constants.%T)] +// CHECK:STDOUT: %.loc7_21.1: type = facet_access_type %T.ref.loc7 [symbolic = %.loc7_21.3 (constants.%.1)] +// CHECK:STDOUT: %.loc7_21.2: type = converted %T.ref.loc7, %.loc7_21.1 [symbolic = %.loc7_21.3 (constants.%.1)] // CHECK:STDOUT: %J.ref.loc7: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.param.loc7: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc7_14.1: %I.type = bind_symbolic_name T, 0, %T.param.loc7 [symbolic = %T.loc7_14.2 (constants.%T)] @@ -398,8 +419,8 @@ impl (C, C).0 as I {} // CHECK:STDOUT: } { // CHECK:STDOUT: %I.ref.loc14: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref.loc14: %I.type = name_ref T, %T.loc14 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc14_21.1: type = facet_type_access %T.ref.loc14 [symbolic = constants.%T] -// CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref.loc14, %.loc14_21.1 [symbolic = constants.%T] +// CHECK:STDOUT: %.loc14_21.1: type = facet_access_type %T.ref.loc14 [symbolic = constants.%.1] +// CHECK:STDOUT: %.loc14_21.2: type = converted %T.ref.loc14, %.loc14_21.1 [symbolic = constants.%.1] // CHECK:STDOUT: %J.ref.loc14: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.param.loc14: %I.type = value_param runtime_param // CHECK:STDOUT: %T.loc14: %I.type = bind_symbolic_name T, 0, %T.param.loc14 [symbolic = constants.%T] @@ -425,18 +446,20 @@ impl (C, C).0 as I {} // CHECK:STDOUT: generic impl @impl(%T.loc7_14.1: %I.type) { // CHECK:STDOUT: %T.loc7_14.2: %I.type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_14.2: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %.loc7_21.3: type = facet_access_type %T.loc7_14.2 [symbolic = %.loc7_21.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: impl: %.loc7_21.2 as %J.ref.loc7 { // CHECK:STDOUT: !members: -// CHECK:STDOUT: witness = .inst+24.loc7_28 +// CHECK:STDOUT: witness = .inst+26.loc7_28 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T +// CHECK:STDOUT: %.loc7_21.3 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- same_type_different_spelling.carbon diff --git a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon index 5cfdf5a87e7d..35bfe49cf6e3 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon @@ -45,9 +45,10 @@ fn G(c: C) { // CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,7 +73,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %Self.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc9: = interface_witness (%F.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc9: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -84,7 +85,7 @@ fn G(c: C) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc12: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -103,7 +104,7 @@ fn G(c: C) { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: // CHECK:STDOUT: --- use_imported_class_extend_impl.carbon // CHECK:STDOUT: @@ -132,7 +133,7 @@ fn G(c: C) { // CHECK:STDOUT: %import_ref.7 = import_ref Main//extend_impl_library, inst+5, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//extend_impl_library, inst+14, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.10: type = import_ref Main//extend_impl_library, inst+15, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.11: = import_ref Main//extend_impl_library, inst+20, loaded [template = constants.%.6] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//extend_impl_library, inst+21, loaded [template = constants.%.6] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 448174866e69..911a4390a2bc 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -35,10 +35,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Add.type: type = facet_type <@Add> [template] // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %Op.type: type = fn_type @Op [template] // CHECK:STDOUT: %Op: %Op.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %Add.type, %Op.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @Add.%Op.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @Add.%Op.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -51,30 +52,30 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: interface @Add { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Op.decl: %Op.type = fn_decl @Op [template = constants.%Op] { -// CHECK:STDOUT: %self.patt: @Op.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Op.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %other.patt: @Op.%Self (%Self) = binding_pattern other -// CHECK:STDOUT: %other.param_patt: @Op.%Self (%Self) = value_param_pattern %other.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @Op.%Self (%Self) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Op.%Self (%Self) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @Op.%.loc5_15.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Op.%.loc5_15.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %other.patt: @Op.%.loc5_15.1 (%.1) = binding_pattern other +// CHECK:STDOUT: %other.param_patt: @Op.%.loc5_15.1 (%.1) = value_param_pattern %other.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @Op.%.loc5_15.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Op.%.loc5_15.1 (%.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_15.1: type = facet_type_access %Self.ref.loc5_15 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_15.2: type = converted %Self.ref.loc5_15, %.loc5_15.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_15.3: type = converted %Self.ref.loc5_15, %.loc5_15.2 [symbolic = %.loc5_15.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_28.1: type = facet_type_access %Self.ref.loc5_28 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %.loc5_28.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_28.1: type = facet_access_type %Self.ref.loc5_28 [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_28.2: type = converted %Self.ref.loc5_28, %.loc5_28.1 [symbolic = %.loc5_15.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_37.1: type = facet_type_access %Self.ref.loc5_37 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %.loc5_37.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @Op.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Op.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %other.param: @Op.%Self (%Self) = value_param runtime_param1 -// CHECK:STDOUT: %other: @Op.%Self (%Self) = bind_name other, %other.param -// CHECK:STDOUT: %return.param: ref @Op.%Self (%Self) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @Op.%Self (%Self) = return_slot %return.param +// CHECK:STDOUT: %.loc5_37.1: type = facet_access_type %Self.ref.loc5_37 [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc5_37.2: type = converted %Self.ref.loc5_37, %.loc5_37.1 [symbolic = %.loc5_15.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @Op.%.loc5_15.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Op.%.loc5_15.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %other.param: @Op.%.loc5_15.1 (%.1) = value_param runtime_param1 +// CHECK:STDOUT: %other: @Op.%.loc5_15.1 (%.1) = bind_name other, %other.param +// CHECK:STDOUT: %return.param: ref @Op.%.loc5_15.1 (%.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @Op.%.loc5_15.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc5: %.1 = assoc_entity element0, %Op.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc5: %.2 = assoc_entity element0, %Op.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -84,12 +85,14 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op(@Add.%Self: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc5_15.1: type = facet_access_type %Self [symbolic = %.loc5_15.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.%Self (%Self)](%other.param_patt: @Op.%Self (%Self)) -> @Op.%Self (%Self); +// CHECK:STDOUT: fn[%self.param_patt: @Op.%.loc5_15.1 (%.1)](%other.param_patt: @Op.%.loc5_15.1 (%.1)) -> @Op.%.loc5_15.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Op(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc5_15.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- b.carbon @@ -102,19 +105,21 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] -// CHECK:STDOUT: %.1: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] +// CHECK:STDOUT: %.2: %Add.type = facet_value %empty_tuple.type, %empty_tuple.type [template] +// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: type = assoc_entity_type %Add.type, %Op.type.2 [template] -// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.5 [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %Add.type, %Op.type.2 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, imports.%import_ref.5 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: type = import_ref Main//a, inst+1, loaded [template = constants.%Add.type] // CHECK:STDOUT: %import_ref.2 = import_ref Main//a, inst+3, unloaded -// CHECK:STDOUT: %import_ref.3: %.2 = import_ref Main//a, inst+32, loaded [template = constants.%.3] -// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Main//a, inst+26, loaded [template = constants.%Op.2] +// CHECK:STDOUT: %import_ref.3: %.4 = import_ref Main//a, inst+34, loaded [template = constants.%.5] +// CHECK:STDOUT: %import_ref.4: %Op.type.2 = import_ref Main//a, inst+27, loaded [template = constants.%Op.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -177,7 +182,7 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.1] +// CHECK:STDOUT: %.loc6_16: = interface_witness (%Op.decl) [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -194,16 +199,17 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Op.2(constants.%Self: %Add.type) { // CHECK:STDOUT: %Self: %Add.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Op.2.%Self (%Self)](%other.param_patt: @Op.2.%Self (%Self)) -> @Op.2.%Self (%Self); +// CHECK:STDOUT: fn[%self.param_patt: @Op.2.%.1 (%.1)](%other.param_patt: @Op.2.%.1 (%.1)) -> @Op.2.%.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%x.param_patt: %empty_tuple.type, %y.param_patt: %empty_tuple.type) -> %empty_tuple.type { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x // CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.1 [template = constants.%Add.type] -// CHECK:STDOUT: %Op.ref: %.2 = name_ref Op, imports.%import_ref.3 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.1, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %Op.ref: %.4 = name_ref Op, imports.%import_ref.3 [template = constants.%.5] +// CHECK:STDOUT: %.loc11_11.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc11_11.2: = bound_method %x.ref, %.loc11_11.1 // CHECK:STDOUT: %y.ref: %empty_tuple.type = name_ref y, %y // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc11_11.2(%x.ref, %y.ref) @@ -216,9 +222,11 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: // CHECK:STDOUT: specific @Op.2(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.2(constants.%empty_tuple.type) { -// CHECK:STDOUT: %Self => constants.%empty_tuple.type +// CHECK:STDOUT: specific @Op.2(constants.%.2) { +// CHECK:STDOUT: %Self => constants.%.2 +// CHECK:STDOUT: %.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon index 35c5ed7828fc..d356a06ffd3d 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -57,7 +57,8 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2, @impl(%T) [symbolic] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [symbolic] +// CHECK:STDOUT: %.5: %I.type = facet_value %C.2, %C.2 [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%F.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,11 +106,11 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] -// CHECK:STDOUT: %.loc10_34.2: = interface_witness (%F) [symbolic = %.loc10_34.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_34.2: = interface_witness (%F) [symbolic = %.loc10_34.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: %C.loc10_25.1 as %I.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} -// CHECK:STDOUT: %.loc10_34.1: = interface_witness (%F.decl) [symbolic = %.loc10_34.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_34.1: = interface_witness (%F.decl) [symbolic = %.loc10_34.2 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -165,12 +166,12 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %F => constants.%F.2 -// CHECK:STDOUT: %.loc10_34.2 => constants.%.5 +// CHECK:STDOUT: %.loc10_34.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.2(constants.%T) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C.2) {} +// CHECK:STDOUT: specific @F.1(constants.%.5) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @impl(%T.loc10_14.2) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T @@ -215,7 +216,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %import_ref.6 = import_ref Main//import_generic, inst+21, unloaded // CHECK:STDOUT: %import_ref.8: type = import_ref Main//import_generic, inst+32, loaded [symbolic = @impl.%C (constants.%C.2)] // CHECK:STDOUT: %import_ref.9: type = import_ref Main//import_generic, inst+33, loaded [template = constants.%I.type] -// CHECK:STDOUT: %import_ref.10: = import_ref Main//import_generic, inst+42, loaded [symbolic = @impl.%.1 (constants.%.6)] +// CHECK:STDOUT: %import_ref.10: = import_ref Main//import_generic, inst+43, loaded [symbolic = @impl.%.1 (constants.%.6)] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 10a9e4d8328b..54a2d55613ee 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -104,7 +104,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type %Action.type.3, %Op.type.3 [template] // CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @Action.%Op.decl [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.2) [template] +// CHECK:STDOUT: %.7: %Action.type.2 = facet_value %A, %A [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Op.2) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -169,7 +170,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %A.ref as %Action.type { // CHECK:STDOUT: %Op.decl: %Op.type.2 = fn_decl @Op.2 [template = constants.%Op.2] {} {} -// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc12: = interface_witness (%Op.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -215,7 +216,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Action.type: type = facet_type <@Action, @Action(constants.%B)> [template = constants.%Action.type.3] // CHECK:STDOUT: %.loc16_26: %.5 = specific_constant @Action.%.loc5_10.1, @Action(constants.%B) [template = constants.%.6] // CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, %.loc16_26 [template = constants.%.6] -// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%Op.2] +// CHECK:STDOUT: %.loc16_15: %Op.type.3 = interface_witness_access constants.%.8, element0 [template = constants.%Op.2] // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc16_15() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -245,7 +246,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.loc5_10.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Op.1(constants.%B, constants.%A) {} +// CHECK:STDOUT: specific @Op.1(constants.%B, constants.%.7) {} // CHECK:STDOUT: // CHECK:STDOUT: --- action.impl.carbon // CHECK:STDOUT: @@ -282,7 +283,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+28, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3: type = import_ref Main//action, inst+33, loaded [template = constants.%B] // CHECK:STDOUT: %import_ref.4 = import_ref Main//action, inst+36, unloaded -// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+60, unloaded +// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+61, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+34, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+14, unloaded // CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.3) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.8)] @@ -290,7 +291,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+29, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+39, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+42, loaded [template = constants.%Action.type.3] -// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+52, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.13: = import_ref Main//action, inst+53, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+45, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+16, unloaded // CHECK:STDOUT: } @@ -434,7 +435,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.2: type = import_ref Main//action, inst+28, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.3 = import_ref Main//action, inst+33, unloaded // CHECK:STDOUT: %import_ref.4: type = import_ref Main//action, inst+36, loaded [template = constants.%C] -// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+60, unloaded +// CHECK:STDOUT: %import_ref.5 = import_ref Main//action, inst+61, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//action, inst+34, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Main//action, inst+14, unloaded // CHECK:STDOUT: %import_ref.8: @Action.%.1 (%.3) = import_ref Main//action, inst+20, loaded [symbolic = @Action.%.2 (constants.%.10)] @@ -442,7 +443,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.10 = import_ref Main//action, inst+29, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Main//action, inst+39, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.12: type = import_ref Main//action, inst+42, loaded [template = constants.%Action.type.3] -// CHECK:STDOUT: %import_ref.13 = import_ref Main//action, inst+52, unloaded +// CHECK:STDOUT: %import_ref.13 = import_ref Main//action, inst+53, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Main//action, inst+45, unloaded // CHECK:STDOUT: %import_ref.15 = import_ref Main//action, inst+16, unloaded // CHECK:STDOUT: %import_ref.17 = import_ref Main//action, inst+37, unloaded @@ -588,7 +589,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %Make.3: %Make.type.3 = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type %Factory.type.3, %Make.type.3 [template] // CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @Factory.%Make.decl [template] -// CHECK:STDOUT: %.7: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %.7: %Factory.type.2 = facet_value %A, %A [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Make.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -654,7 +656,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.param: ref %B = out_param runtime_param0 // CHECK:STDOUT: %return: ref %B = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc11: = interface_witness (%Make.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl @@ -710,7 +712,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %.loc5_17.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make.1(constants.%B, constants.%A) { +// CHECK:STDOUT: specific @Make.1(constants.%B, constants.%.7) { // CHECK:STDOUT: %T => constants.%B // CHECK:STDOUT: } // CHECK:STDOUT: @@ -754,7 +756,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+35, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+42, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+45, loaded [template = constants.%Factory.type.3] -// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+60, loaded [template = constants.%.9] +// CHECK:STDOUT: %import_ref.11: = import_ref Main//factory, inst+61, loaded [template = constants.%.9] // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+53, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+21, unloaded // CHECK:STDOUT: } @@ -913,7 +915,7 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %import_ref.8 = import_ref Main//factory, inst+35, unloaded // CHECK:STDOUT: %import_ref.9: type = import_ref Main//factory, inst+42, loaded [template = constants.%A] // CHECK:STDOUT: %import_ref.10: type = import_ref Main//factory, inst+45, loaded [template = constants.%Factory.type.3] -// CHECK:STDOUT: %import_ref.11 = import_ref Main//factory, inst+60, unloaded +// CHECK:STDOUT: %import_ref.11 = import_ref Main//factory, inst+61, unloaded // CHECK:STDOUT: %import_ref.12 = import_ref Main//factory, inst+53, unloaded // CHECK:STDOUT: %import_ref.13 = import_ref Main//factory, inst+21, unloaded // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon index f0d0c5a28beb..894bed9cedd7 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_class.carbon @@ -27,17 +27,19 @@ class A { // CHECK:STDOUT: constants { // CHECK:STDOUT: %DefaultConstructible.type: type = facet_type <@DefaultConstructible> [template] // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %Make.type.1: type = fn_type @Make.1 [template] // CHECK:STDOUT: %Make.1: %Make.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %DefaultConstructible.type, %Make.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @DefaultConstructible.%Make.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %A: type = class_type @A [template] // CHECK:STDOUT: %Make.type.2: type = fn_type @Make.2 [template] // CHECK:STDOUT: %Make.2: %Make.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%Make.2) [template] +// CHECK:STDOUT: %.6: %DefaultConstructible.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.7: = interface_witness (%Make.2) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -55,16 +57,16 @@ class A { // CHECK:STDOUT: interface @DefaultConstructible { // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %Make.decl: %Make.type.1 = fn_decl @Make.1 [template = constants.%Make.1] { -// CHECK:STDOUT: %return.patt: @Make.1.%Self (%Self) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Make.1.%Self (%Self) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Make.1.%.loc12_16.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Make.1.%.loc12_16.1 (%.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %DefaultConstructible.type = name_ref Self, @DefaultConstructible.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_16.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_16.2: type = converted %Self.ref, %.loc12_16.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %return.param: ref @Make.1.%Self (%Self) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @Make.1.%Self (%Self) = return_slot %return.param +// CHECK:STDOUT: %.loc12_16.2: type = facet_access_type %Self.ref [symbolic = %.loc12_16.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_16.3: type = converted %Self.ref, %.loc12_16.2 [symbolic = %.loc12_16.1 (constants.%.1)] +// CHECK:STDOUT: %return.param: ref @Make.1.%.loc12_16.1 (%.1) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @Make.1.%.loc12_16.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %Make.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %Make.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -81,7 +83,7 @@ class A { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc18: = interface_witness (%Make.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Make = %Make.decl @@ -89,7 +91,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -100,7 +102,7 @@ class A { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %DefaultConstructible.ref: type = name_ref DefaultConstructible, file.%DefaultConstructible.decl [template = constants.%DefaultConstructible.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc23: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A @@ -108,13 +110,14 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make.1(@DefaultConstructible.%Self: %DefaultConstructible.type) { // CHECK:STDOUT: %Self: %DefaultConstructible.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc12_16.1: type = facet_access_type %Self [symbolic = %.loc12_16.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> @Make.1.%Self (%Self); +// CHECK:STDOUT: fn() -> @Make.1.%.loc12_16.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Make.2() -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc21_33.1: %.3 = struct_literal () +// CHECK:STDOUT: %.loc21_33.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc21_33.2: init %C = class_init (), %return [template = constants.%struct] // CHECK:STDOUT: %.loc21_34: init %C = converted %.loc21_33.1, %.loc21_33.2 [template = constants.%struct] // CHECK:STDOUT: return %.loc21_34 to %return @@ -122,9 +125,11 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: specific @Make.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc12_16.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Make.1(constants.%C) { -// CHECK:STDOUT: %Self => constants.%C +// CHECK:STDOUT: specific @Make.1(constants.%.6) { +// CHECK:STDOUT: %Self => constants.%.6 +// CHECK:STDOUT: %.loc12_16.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index cbb1ef306229..87ebbacedc68 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -41,45 +41,51 @@ impl D as SelfNested { // CHECK:STDOUT: constants { // CHECK:STDOUT: %UseSelf.type: type = facet_type <@UseSelf> [template] // CHECK:STDOUT: %Self.1: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %F.type.1: type = fn_type @F.1 [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %F.1: %F.type.1 = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type.1 [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.3: type = struct_type {} [template] -// CHECK:STDOUT: %.4: = complete_type_witness %.3 [template] +// CHECK:STDOUT: %.4: type = struct_type {} [template] +// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] // CHECK:STDOUT: %D: type = class_type @D [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.5: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.6: %UseSelf.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] // CHECK:STDOUT: %struct.1: %C = struct_value () [template] // CHECK:STDOUT: %F.type.3: type = fn_type @F.3 [template] // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.3) [template] +// CHECK:STDOUT: %.9: %UseSelf.type = facet_value %D, %D [template] +// CHECK:STDOUT: %.10: = interface_witness (%F.3) [template] // CHECK:STDOUT: %struct.2: %D = struct_value () [template] // CHECK:STDOUT: %SelfNested.type: type = facet_type <@SelfNested> [template] // CHECK:STDOUT: %Self.2: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %.8: type = ptr_type %Self.2 [symbolic] -// CHECK:STDOUT: %.9: type = struct_type {.x: %Self.2, .y: %empty_tuple.type} [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.12: type = ptr_type %.11 [symbolic] +// CHECK:STDOUT: %.13: type = struct_type {.x: %.11, .y: %empty_tuple.type} [symbolic] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.8, %.9) [symbolic] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%.12, %.13) [symbolic] // CHECK:STDOUT: %F.type.4: type = fn_type @F.4 [template] // CHECK:STDOUT: %F.4: %F.type.4 = struct_value () [template] -// CHECK:STDOUT: %.10: type = assoc_entity_type %SelfNested.type, %F.type.4 [template] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, @SelfNested.%F.decl [template] -// CHECK:STDOUT: %.12: type = ptr_type %C [template] -// CHECK:STDOUT: %.13: type = struct_type {.x: %C, .y: %empty_tuple.type} [template] -// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.12, %.13) [template] +// CHECK:STDOUT: %.14: type = assoc_entity_type %SelfNested.type, %F.type.4 [template] +// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, @SelfNested.%F.decl [template] +// CHECK:STDOUT: %.16: type = ptr_type %C [template] +// CHECK:STDOUT: %.17: type = struct_type {.x: %C, .y: %empty_tuple.type} [template] +// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%.16, %.17) [template] // CHECK:STDOUT: %F.type.5: type = fn_type @F.5 [template] // CHECK:STDOUT: %F.5: %F.type.5 = struct_value () [template] -// CHECK:STDOUT: %.14: = interface_witness (%F.5) [template] -// CHECK:STDOUT: %.15: type = ptr_type %D [template] -// CHECK:STDOUT: %.16: type = struct_type {.x: %D, .y: %empty_tuple.type} [template] -// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.15, %.16) [template] +// CHECK:STDOUT: %.18: %SelfNested.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.19: = interface_witness (%F.5) [template] +// CHECK:STDOUT: %.20: type = ptr_type %D [template] +// CHECK:STDOUT: %.21: type = struct_type {.x: %D, .y: %empty_tuple.type} [template] +// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%.20, %.21) [template] // CHECK:STDOUT: %F.type.6: type = fn_type @F.6 [template] // CHECK:STDOUT: %F.6: %F.type.6 = struct_value () [template] -// CHECK:STDOUT: %.17: = interface_witness (%F.6) [template] +// CHECK:STDOUT: %.22: %SelfNested.type = facet_value %D, %D [template] +// CHECK:STDOUT: %.23: = interface_witness (%F.6) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -114,30 +120,30 @@ impl D as SelfNested { // CHECK:STDOUT: interface @UseSelf { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.1] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %self.patt: @F.1.%Self (%Self.1) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.1.%Self (%Self.1) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %x.patt: @F.1.%Self (%Self.1) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @F.1.%Self (%Self.1) = value_param_pattern %x.patt, runtime_param1 -// CHECK:STDOUT: %return.patt: @F.1.%Self (%Self.1) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.1.%Self (%Self.1) = out_param_pattern %return.patt, runtime_param2 +// CHECK:STDOUT: %self.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @F.1.%.loc12_14.1 (%.1) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @F.1.%.loc12_14.1 (%.1) = value_param_pattern %x.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: @F.1.%.loc12_14.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.1.%.loc12_14.1 (%.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref.loc12_14, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc12_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_23.1: type = facet_type_access %Self.ref.loc12_23 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_23.2: type = converted %Self.ref.loc12_23, %.loc12_23.1 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc12_23.1: type = facet_access_type %Self.ref.loc12_23 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_23.2: type = converted %Self.ref.loc12_23, %.loc12_23.1 [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc12_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_32.1: type = facet_type_access %Self.ref.loc12_32 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %.loc12_32.2: type = converted %Self.ref.loc12_32, %.loc12_32.1 [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %self.param: @F.1.%Self (%Self.1) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.1.%Self (%Self.1) = bind_name self, %self.param -// CHECK:STDOUT: %x.param: @F.1.%Self (%Self.1) = value_param runtime_param1 -// CHECK:STDOUT: %x: @F.1.%Self (%Self.1) = bind_name x, %x.param -// CHECK:STDOUT: %return.param: ref @F.1.%Self (%Self.1) = out_param runtime_param2 -// CHECK:STDOUT: %return: ref @F.1.%Self (%Self.1) = return_slot %return.param +// CHECK:STDOUT: %.loc12_32.1: type = facet_access_type %Self.ref.loc12_32 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_32.2: type = converted %Self.ref.loc12_32, %.loc12_32.1 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.1.%.loc12_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %x.param: @F.1.%.loc12_14.1 (%.1) = value_param runtime_param1 +// CHECK:STDOUT: %x: @F.1.%.loc12_14.1 (%.1) = bind_name x, %x.param +// CHECK:STDOUT: %return.param: ref @F.1.%.loc12_14.1 (%.1) = out_param runtime_param2 +// CHECK:STDOUT: %return: ref @F.1.%.loc12_14.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -152,21 +158,21 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: @F.4.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc28_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.2: type = facet_type_access %Self.ref.loc28_12 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.3: type = converted %Self.ref.loc28_12, %.loc28_16.2 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.4: type = ptr_type %Self.2 [symbolic = %.loc28_16.1 (constants.%.8)] +// CHECK:STDOUT: %.loc28_16.3: type = facet_access_type %Self.ref.loc28_12 [symbolic = %.loc28_16.1 (constants.%.11)] +// CHECK:STDOUT: %.loc28_16.4: type = converted %Self.ref.loc28_12, %.loc28_16.3 [symbolic = %.loc28_16.1 (constants.%.11)] +// CHECK:STDOUT: %.loc28_16.5: type = ptr_type %.11 [symbolic = %.loc28_16.2 (constants.%.12)] // CHECK:STDOUT: %Self.ref.loc28_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_24.1: type = facet_type_access %Self.ref.loc28_24 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_24.2: type = converted %Self.ref.loc28_24, %.loc28_24.1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.loc28_24.1: type = facet_access_type %Self.ref.loc28_24 [symbolic = %.loc28_16.1 (constants.%.11)] +// CHECK:STDOUT: %.loc28_24.2: type = converted %Self.ref.loc28_24, %.loc28_24.1 [symbolic = %.loc28_16.1 (constants.%.11)] // CHECK:STDOUT: %.loc28_35.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc28_36.2: type = struct_type {.x: %Self.2, .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.9)] -// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%.loc28_16.4, %.loc28_36.2) +// CHECK:STDOUT: %.loc28_36.2: type = struct_type {.x: %.11, .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.13)] +// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%.loc28_16.5, %.loc28_36.2) // CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %x.param: @F.4.%tuple.type (%tuple.type.2) = value_param runtime_param0 // CHECK:STDOUT: %x: @F.4.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc28: %.10 = assoc_entity element0, %F.decl [template = constants.%.11] +// CHECK:STDOUT: %.loc28: %.14 = assoc_entity element0, %F.decl [template = constants.%.15] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -193,7 +199,7 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc19: = interface_witness (%F.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -219,7 +225,7 @@ impl D as SelfNested { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param2 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc23: = interface_witness (%F.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -232,17 +238,17 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.12] +// CHECK:STDOUT: %.loc32_13: type = ptr_type %C [template = constants.%.16] // CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc32_29.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%.13] +// CHECK:STDOUT: %.loc32_30: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%.17] // CHECK:STDOUT: %.loc32_31.1: %tuple.type.1 = tuple_literal (%.loc32_13, %.loc32_30) // CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.14] +// CHECK:STDOUT: %.loc31: = interface_witness (%F.decl) [template = constants.%.19] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -255,17 +261,17 @@ impl D as SelfNested { // CHECK:STDOUT: %x.param_patt: %tuple.type.4 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.15] +// CHECK:STDOUT: %.loc36_16: type = ptr_type %D [template = constants.%.20] // CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] // CHECK:STDOUT: %.loc36_35.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%.16] +// CHECK:STDOUT: %.loc36_36: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%.21] // CHECK:STDOUT: %.loc36_37.1: %tuple.type.1 = tuple_literal (%.loc36_16, %.loc36_36) // CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.param: %tuple.type.4 = value_param runtime_param0 // CHECK:STDOUT: %x: %tuple.type.4 = bind_name x, %x.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.17] +// CHECK:STDOUT: %.loc35: = interface_witness (%F.decl) [template = constants.%.23] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -273,14 +279,14 @@ impl D as SelfNested { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc15: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc15: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc17: = complete_type_witness %.3 [template = constants.%.4] +// CHECK:STDOUT: %.loc17: = complete_type_witness %.4 [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D @@ -288,13 +294,14 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@UseSelf.%Self: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.1.%Self (%Self.1)](%x.param_patt: @F.1.%Self (%Self.1)) -> @F.1.%Self (%Self.1); +// CHECK:STDOUT: fn[%self.param_patt: @F.1.%.loc12_14.1 (%.1)](%x.param_patt: @F.1.%.loc12_14.1 (%.1)) -> @F.1.%.loc12_14.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2[%self.param_patt: %C](%x.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc20_38.1: %.3 = struct_literal () +// CHECK:STDOUT: %.loc20_38.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc20_38.2: init %C = class_init (), %return [template = constants.%struct.1] // CHECK:STDOUT: %.loc20_39: init %C = converted %.loc20_38.1, %.loc20_38.2 [template = constants.%struct.1] // CHECK:STDOUT: return %.loc20_39 to %return @@ -302,7 +309,7 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.3[%self.param_patt: %D](%x.param_patt: %D) -> %return: %D { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc24_47.1: %.3 = struct_literal () +// CHECK:STDOUT: %.loc24_47.1: %.4 = struct_literal () // CHECK:STDOUT: %.loc24_47.2: init %D = class_init (), %return [template = constants.%struct.2] // CHECK:STDOUT: %.loc24_48: init %D = converted %.loc24_47.1, %.loc24_47.2 [template = constants.%struct.2] // CHECK:STDOUT: return %.loc24_48 to %return @@ -310,9 +317,10 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.4(@SelfNested.%Self: %SelfNested.type) { // CHECK:STDOUT: %Self: %SelfNested.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc28_16.1: type = ptr_type @F.4.%Self (%Self.2) [symbolic = %.loc28_16.1 (constants.%.8)] -// CHECK:STDOUT: %.loc28_36.1: type = struct_type {.x: @F.4.%Self (%Self.2), .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.9)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.4.%.loc28_16.1 (%.8), @F.4.%.loc28_36.1 (%.9)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %.loc28_16.1: type = facet_access_type %Self [symbolic = %.loc28_16.1 (constants.%.11)] +// CHECK:STDOUT: %.loc28_16.2: type = ptr_type @F.4.%.loc28_16.1 (%.11) [symbolic = %.loc28_16.2 (constants.%.12)] +// CHECK:STDOUT: %.loc28_36.1: type = struct_type {.x: @F.4.%.loc28_16.1 (%.11), .y: %empty_tuple.type} [symbolic = %.loc28_36.1 (constants.%.13)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.4.%.loc28_16.2 (%.12), @F.4.%.loc28_36.1 (%.13)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%x.param_patt: @F.4.%tuple.type (%tuple.type.2)); // CHECK:STDOUT: } @@ -323,34 +331,40 @@ impl D as SelfNested { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self.1) { // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) { -// CHECK:STDOUT: %Self => constants.%C +// CHECK:STDOUT: specific @F.1(constants.%.6) { +// CHECK:STDOUT: %Self => constants.%.6 +// CHECK:STDOUT: %.loc12_14.1 => constants.%C // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%D) { -// CHECK:STDOUT: %Self => constants.%D +// CHECK:STDOUT: specific @F.1(constants.%.9) { +// CHECK:STDOUT: %Self => constants.%.9 +// CHECK:STDOUT: %.loc12_14.1 => constants.%D // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F.4(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 -// CHECK:STDOUT: %.loc28_16.1 => constants.%.8 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.9 +// CHECK:STDOUT: %.loc28_16.1 => constants.%.11 +// CHECK:STDOUT: %.loc28_16.2 => constants.%.12 +// CHECK:STDOUT: %.loc28_36.1 => constants.%.13 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.4(constants.%C) { -// CHECK:STDOUT: %Self => constants.%C -// CHECK:STDOUT: %.loc28_16.1 => constants.%.12 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.13 +// CHECK:STDOUT: specific @F.4(constants.%.18) { +// CHECK:STDOUT: %Self => constants.%.18 +// CHECK:STDOUT: %.loc28_16.1 => constants.%C +// CHECK:STDOUT: %.loc28_16.2 => constants.%.16 +// CHECK:STDOUT: %.loc28_36.1 => constants.%.17 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.4(constants.%D) { -// CHECK:STDOUT: %Self => constants.%D -// CHECK:STDOUT: %.loc28_16.1 => constants.%.15 -// CHECK:STDOUT: %.loc28_36.1 => constants.%.16 +// CHECK:STDOUT: specific @F.4(constants.%.22) { +// CHECK:STDOUT: %Self => constants.%.22 +// CHECK:STDOUT: %.loc28_16.1 => constants.%D +// CHECK:STDOUT: %.loc28_16.2 => constants.%.20 +// CHECK:STDOUT: %.loc28_36.1 => constants.%.21 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index c0636b4626c2..ea3461ce8727 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -29,21 +29,21 @@ var d: i32 = a[b]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] // CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 24 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.30, %.34) [template] -// CHECK:STDOUT: %.35: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.38: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 24 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.38) [template] +// CHECK:STDOUT: %.39: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.42: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.44: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -97,40 +97,40 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 24 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_24) -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_20, %.loc11_26.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_20) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_20, %.loc11_26.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_20) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%.34] // CHECK:STDOUT: %.loc11_26.6: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc11_26.7: ref %i32 = array_index file.%a.var, %.loc11_26.6 -// CHECK:STDOUT: %.loc11_26.8: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_26.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.10: = bound_method %.loc11_24, %.loc11_26.9 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_26.11: = specific_function %.loc11_26.10, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.11(%.loc11_24) [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.12: init %i32 = converted %.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_26.13: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_26.8: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_26.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.10: = bound_method %.loc11_24, %.loc11_26.9 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_26.11: = specific_function %.loc11_26.10, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.11(%.loc11_24) [template = constants.%.38] +// CHECK:STDOUT: %.loc11_26.12: init %i32 = converted %.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc11_26.13: Core.IntLiteral = int_value 1 [template = constants.%.35] // CHECK:STDOUT: %.loc11_26.14: ref %i32 = array_index file.%a.var, %.loc11_26.13 -// CHECK:STDOUT: %.loc11_26.15: init %i32 = initialize_from %.loc11_26.12 to %.loc11_26.14 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_26.15: init %i32 = initialize_from %.loc11_26.12 to %.loc11_26.14 [template = constants.%.38] // CHECK:STDOUT: %.loc11_26.16: init %.3 = array_init (%.loc11_26.8, %.loc11_26.15) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.16 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_15.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_15.2: = bound_method %.loc12_14, %.loc12_15.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_15.3: = specific_function %.loc12_15.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_15.3(%.loc12_14) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_15.4: init %i32 = converted %.loc12_14, %int.convert_checked.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_15.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_15.2: = bound_method %.loc12_14, %.loc12_15.1 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_15.3: = specific_function %.loc12_15.2, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_15.3(%.loc12_14) [template = constants.%.41] +// CHECK:STDOUT: %.loc12_15.4: init %i32 = converted %.loc12_14, %int.convert_checked.loc12 [template = constants.%.41] // CHECK:STDOUT: assign file.%b.var, %.loc12_15.4 // CHECK:STDOUT: %a.ref.loc13: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc13_16.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc13_16.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_16.3: = bound_method %.loc13_16.1, %.loc13_16.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_16.4: = specific_function %.loc13_16.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_16.4(%.loc13_16.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc13_16.5: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_16.6: %i32 = converted %.loc13_16.1, %.loc13_16.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc13_16.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_16.3: = bound_method %.loc13_16.1, %.loc13_16.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_16.4: = specific_function %.loc13_16.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_16.4(%.loc13_16.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc13_16.5: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.44] +// CHECK:STDOUT: %.loc13_16.6: %i32 = converted %.loc13_16.1, %.loc13_16.5 [template = constants.%.44] // CHECK:STDOUT: %.loc13_17.1: ref %i32 = array_index %a.ref.loc13, %.loc13_16.6 // CHECK:STDOUT: %.loc13_17.2: %i32 = bind_value %.loc13_17.1 // CHECK:STDOUT: assign file.%c.var, %.loc13_17.2 diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index d3b3b3beaae4..07bc4c717cd5 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -48,25 +48,25 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 3 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.30, %.33, %.36) [template] -// CHECK:STDOUT: %.37: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.38: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.35: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.38: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.41: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.42: = bound_method %.41, %Convert.14 [template] +// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.34, %.37, %.40) [template] +// CHECK:STDOUT: %.41: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.42: = bound_method %.7, %Convert.14 [template] // CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.44: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.14 [template] +// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.48: %i32 = int_value 4 [template] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] // CHECK:STDOUT: %ValueBinding: %ValueBinding.type = struct_value () [template] // CHECK:STDOUT: } @@ -145,30 +145,30 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc14_25: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc14_28: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc14_29.1: %tuple.type = tuple_literal (%.loc14_22, %.loc14_25, %.loc14_28) -// CHECK:STDOUT: %.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_29.3: = bound_method %.loc14_22, %.loc14_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_29.4: = specific_function %.loc14_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_29.1: init %i32 = call %.loc14_29.4(%.loc14_22) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_29.5: init %i32 = converted %.loc14_22, %int.convert_checked.loc14_29.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_29.3: = bound_method %.loc14_22, %.loc14_29.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_29.4: = specific_function %.loc14_29.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc14_29.1: init %i32 = call %.loc14_29.4(%.loc14_22) [template = constants.%.34] +// CHECK:STDOUT: %.loc14_29.5: init %i32 = converted %.loc14_22, %int.convert_checked.loc14_29.1 [template = constants.%.34] // CHECK:STDOUT: %.loc14_29.6: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc14_29.7: ref %i32 = array_index %a.var, %.loc14_29.6 -// CHECK:STDOUT: %.loc14_29.8: init %i32 = initialize_from %.loc14_29.5 to %.loc14_29.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_29.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_29.10: = bound_method %.loc14_25, %.loc14_29.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_29.11: = specific_function %.loc14_29.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc14_29.2: init %i32 = call %.loc14_29.11(%.loc14_25) [template = constants.%.33] -// CHECK:STDOUT: %.loc14_29.12: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_29.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_29.8: init %i32 = initialize_from %.loc14_29.5 to %.loc14_29.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_29.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_29.10: = bound_method %.loc14_25, %.loc14_29.9 [template = constants.%.35] +// CHECK:STDOUT: %.loc14_29.11: = specific_function %.loc14_29.10, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc14_29.2: init %i32 = call %.loc14_29.11(%.loc14_25) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_29.12: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_29.2 [template = constants.%.37] // CHECK:STDOUT: %.loc14_29.13: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc14_29.14: ref %i32 = array_index %a.var, %.loc14_29.13 -// CHECK:STDOUT: %.loc14_29.15: init %i32 = initialize_from %.loc14_29.12 to %.loc14_29.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc14_29.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_29.17: = bound_method %.loc14_28, %.loc14_29.16 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_29.18: = specific_function %.loc14_29.17, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc14_29.3: init %i32 = call %.loc14_29.18(%.loc14_28) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_29.19: init %i32 = converted %.loc14_28, %int.convert_checked.loc14_29.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_29.15: init %i32 = initialize_from %.loc14_29.12 to %.loc14_29.14 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_29.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_29.17: = bound_method %.loc14_28, %.loc14_29.16 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_29.18: = specific_function %.loc14_29.17, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc14_29.3: init %i32 = call %.loc14_29.18(%.loc14_28) [template = constants.%.40] +// CHECK:STDOUT: %.loc14_29.19: init %i32 = converted %.loc14_28, %int.convert_checked.loc14_29.3 [template = constants.%.40] // CHECK:STDOUT: %.loc14_29.20: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc14_29.21: ref %i32 = array_index %a.var, %.loc14_29.20 -// CHECK:STDOUT: %.loc14_29.22: init %i32 = initialize_from %.loc14_29.19 to %.loc14_29.21 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_29.22: init %i32 = initialize_from %.loc14_29.19 to %.loc14_29.21 [template = constants.%.40] // CHECK:STDOUT: %.loc14_29.23: init %.3 = array_init (%.loc14_29.8, %.loc14_29.15, %.loc14_29.22) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc14_30: init %.3 = converted %.loc14_29.1, %.loc14_29.23 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc14_30 @@ -176,35 +176,35 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int.make_type_signed.loc17: init type = call constants.%Int(%.loc17_11) [template = constants.%i32] // CHECK:STDOUT: %.loc17_14.1: type = value_of_initializer %int.make_type_signed.loc17 [template = constants.%i32] // CHECK:STDOUT: %.loc17_14.2: type = converted %int.make_type_signed.loc17, %.loc17_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc17_14.3: type = ptr_type %i32 [template = constants.%.37] -// CHECK:STDOUT: %pa.var: ref %.37 = var pa -// CHECK:STDOUT: %pa: ref %.37 = bind_name pa, %pa.var +// CHECK:STDOUT: %.loc17_14.3: type = ptr_type %i32 [template = constants.%.41] +// CHECK:STDOUT: %pa.var: ref %.41 = var pa +// CHECK:STDOUT: %pa: ref %.41 = bind_name pa, %pa.var // CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, %a // CHECK:STDOUT: %.loc17_21.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%.40] -// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc17_21.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_21.3: = bound_method %.loc17_21.1, %.loc17_21.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc17_21.4: = specific_function %.loc17_21.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_21.4(%.loc17_21.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc17_21.5: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%.44] +// CHECK:STDOUT: %.loc17_21.6: %i32 = converted %.loc17_21.1, %.loc17_21.5 [template = constants.%.44] // CHECK:STDOUT: %.loc17_22: ref %i32 = array_index %a.ref.loc17, %.loc17_21.6 -// CHECK:STDOUT: %.loc17_18: %.37 = addr_of %.loc17_22 +// CHECK:STDOUT: %.loc17_18: %.41 = addr_of %.loc17_22 // CHECK:STDOUT: assign %pa.var, %.loc17_18 // CHECK:STDOUT: %a.ref.loc18: ref %.3 = name_ref a, %a // CHECK:STDOUT: %.loc18_5.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc18_5.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_5.3: = bound_method %.loc18_5.1, %.loc18_5.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc18_5.4: = specific_function %.loc18_5.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc18_5: init %i32 = call %.loc18_5.4(%.loc18_5.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc18_5.5: %i32 = value_of_initializer %int.convert_checked.loc18_5 [template = constants.%.40] -// CHECK:STDOUT: %.loc18_5.6: %i32 = converted %.loc18_5.1, %.loc18_5.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc18_5.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_5.3: = bound_method %.loc18_5.1, %.loc18_5.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc18_5.4: = specific_function %.loc18_5.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc18_5: init %i32 = call %.loc18_5.4(%.loc18_5.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc18_5.5: %i32 = value_of_initializer %int.convert_checked.loc18_5 [template = constants.%.44] +// CHECK:STDOUT: %.loc18_5.6: %i32 = converted %.loc18_5.1, %.loc18_5.5 [template = constants.%.44] // CHECK:STDOUT: %.loc18_6: ref %i32 = array_index %a.ref.loc18, %.loc18_5.6 -// CHECK:STDOUT: %.loc18_10: Core.IntLiteral = int_value 4 [template = constants.%.41] -// CHECK:STDOUT: %.loc18_8.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_8.2: = bound_method %.loc18_10, %.loc18_8.1 [template = constants.%.42] -// CHECK:STDOUT: %.loc18_8.3: = specific_function %.loc18_8.2, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc18_8: init %i32 = call %.loc18_8.3(%.loc18_10) [template = constants.%.44] -// CHECK:STDOUT: %.loc18_8.4: init %i32 = converted %.loc18_10, %int.convert_checked.loc18_8 [template = constants.%.44] +// CHECK:STDOUT: %.loc18_10: Core.IntLiteral = int_value 4 [template = constants.%.45] +// CHECK:STDOUT: %.loc18_8.1: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_8.2: = bound_method %.loc18_10, %.loc18_8.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc18_8.3: = specific_function %.loc18_8.2, @Convert.2(constants.%.1) [template = constants.%.47] +// CHECK:STDOUT: %int.convert_checked.loc18_8: init %i32 = call %.loc18_8.3(%.loc18_10) [template = constants.%.48] +// CHECK:STDOUT: %.loc18_8.4: init %i32 = converted %.loc18_10, %int.convert_checked.loc18_8 [template = constants.%.48] // CHECK:STDOUT: assign %.loc18_6, %.loc18_8.4 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -223,50 +223,50 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc22_25: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc22_28: Core.IntLiteral = int_value 3 [template = constants.%.2] // CHECK:STDOUT: %.loc22_29.1: %tuple.type = tuple_literal (%.loc22_22, %.loc22_25, %.loc22_28) -// CHECK:STDOUT: %.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_29.3: = bound_method %.loc22_22, %.loc22_29.2 [template = constants.%.28] -// CHECK:STDOUT: %.loc22_29.4: = specific_function %.loc22_29.3, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc22_29.1: init %i32 = call %.loc22_29.4(%.loc22_22) [template = constants.%.30] -// CHECK:STDOUT: %.loc22_29.5: init %i32 = converted %.loc22_22, %int.convert_checked.loc22_29.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_29.3: = bound_method %.loc22_22, %.loc22_29.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc22_29.4: = specific_function %.loc22_29.3, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc22_29.1: init %i32 = call %.loc22_29.4(%.loc22_22) [template = constants.%.34] +// CHECK:STDOUT: %.loc22_29.5: init %i32 = converted %.loc22_22, %int.convert_checked.loc22_29.1 [template = constants.%.34] // CHECK:STDOUT: %.loc22_29.6: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc22_29.7: ref %i32 = array_index %a.var, %.loc22_29.6 -// CHECK:STDOUT: %.loc22_29.8: init %i32 = initialize_from %.loc22_29.5 to %.loc22_29.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc22_29.9: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_29.10: = bound_method %.loc22_25, %.loc22_29.9 [template = constants.%.31] -// CHECK:STDOUT: %.loc22_29.11: = specific_function %.loc22_29.10, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc22_29.2: init %i32 = call %.loc22_29.11(%.loc22_25) [template = constants.%.33] -// CHECK:STDOUT: %.loc22_29.12: init %i32 = converted %.loc22_25, %int.convert_checked.loc22_29.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc22_29.8: init %i32 = initialize_from %.loc22_29.5 to %.loc22_29.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc22_29.9: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_29.10: = bound_method %.loc22_25, %.loc22_29.9 [template = constants.%.35] +// CHECK:STDOUT: %.loc22_29.11: = specific_function %.loc22_29.10, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc22_29.2: init %i32 = call %.loc22_29.11(%.loc22_25) [template = constants.%.37] +// CHECK:STDOUT: %.loc22_29.12: init %i32 = converted %.loc22_25, %int.convert_checked.loc22_29.2 [template = constants.%.37] // CHECK:STDOUT: %.loc22_29.13: Core.IntLiteral = int_value 1 [template = constants.%.5] // CHECK:STDOUT: %.loc22_29.14: ref %i32 = array_index %a.var, %.loc22_29.13 -// CHECK:STDOUT: %.loc22_29.15: init %i32 = initialize_from %.loc22_29.12 to %.loc22_29.14 [template = constants.%.33] -// CHECK:STDOUT: %.loc22_29.16: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_29.17: = bound_method %.loc22_28, %.loc22_29.16 [template = constants.%.34] -// CHECK:STDOUT: %.loc22_29.18: = specific_function %.loc22_29.17, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc22_29.3: init %i32 = call %.loc22_29.18(%.loc22_28) [template = constants.%.36] -// CHECK:STDOUT: %.loc22_29.19: init %i32 = converted %.loc22_28, %int.convert_checked.loc22_29.3 [template = constants.%.36] +// CHECK:STDOUT: %.loc22_29.15: init %i32 = initialize_from %.loc22_29.12 to %.loc22_29.14 [template = constants.%.37] +// CHECK:STDOUT: %.loc22_29.16: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_29.17: = bound_method %.loc22_28, %.loc22_29.16 [template = constants.%.38] +// CHECK:STDOUT: %.loc22_29.18: = specific_function %.loc22_29.17, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc22_29.3: init %i32 = call %.loc22_29.18(%.loc22_28) [template = constants.%.40] +// CHECK:STDOUT: %.loc22_29.19: init %i32 = converted %.loc22_28, %int.convert_checked.loc22_29.3 [template = constants.%.40] // CHECK:STDOUT: %.loc22_29.20: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc22_29.21: ref %i32 = array_index %a.var, %.loc22_29.20 -// CHECK:STDOUT: %.loc22_29.22: init %i32 = initialize_from %.loc22_29.19 to %.loc22_29.21 [template = constants.%.36] +// CHECK:STDOUT: %.loc22_29.22: init %i32 = initialize_from %.loc22_29.19 to %.loc22_29.21 [template = constants.%.40] // CHECK:STDOUT: %.loc22_29.23: init %.3 = array_init (%.loc22_29.8, %.loc22_29.15, %.loc22_29.22) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc22_30: init %.3 = converted %.loc22_29.1, %.loc22_29.23 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc22_30 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, %a // CHECK:STDOUT: %.loc26_5.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc26_5.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_5.3: = bound_method %.loc26_5.1, %.loc26_5.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc26_5.4: = specific_function %.loc26_5.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_5.4(%.loc26_5.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc26_5.5: %i32 = value_of_initializer %int.convert_checked.loc26 [template = constants.%.40] -// CHECK:STDOUT: %.loc26_5.6: %i32 = converted %.loc26_5.1, %.loc26_5.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc26_5.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_5.3: = bound_method %.loc26_5.1, %.loc26_5.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc26_5.4: = specific_function %.loc26_5.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_5.4(%.loc26_5.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc26_5.5: %i32 = value_of_initializer %int.convert_checked.loc26 [template = constants.%.44] +// CHECK:STDOUT: %.loc26_5.6: %i32 = converted %.loc26_5.1, %.loc26_5.5 [template = constants.%.44] // CHECK:STDOUT: %.loc26_6: ref %i32 = array_index %a.ref, %.loc26_5.6 // CHECK:STDOUT: %b.ref: %.3 = name_ref b, %b // CHECK:STDOUT: %.loc27_5.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc27_5.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_5.3: = bound_method %.loc27_5.1, %.loc27_5.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc27_5.4: = specific_function %.loc27_5.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_5.4(%.loc27_5.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc27_5.5: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.40] -// CHECK:STDOUT: %.loc27_5.6: %i32 = converted %.loc27_5.1, %.loc27_5.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc27_5.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc27_5.3: = bound_method %.loc27_5.1, %.loc27_5.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc27_5.4: = specific_function %.loc27_5.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_5.4(%.loc27_5.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc27_5.5: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.44] +// CHECK:STDOUT: %.loc27_5.6: %i32 = converted %.loc27_5.1, %.loc27_5.5 [template = constants.%.44] // CHECK:STDOUT: %.loc27_6.1: ref %.3 = value_as_ref %b.ref // CHECK:STDOUT: %.loc27_6.2: ref %i32 = array_index %.loc27_6.1, %.loc27_5.6 // CHECK:STDOUT: %.loc27_6.3: %i32 = bind_value %.loc27_6.2 @@ -275,12 +275,12 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc28_4.1 // CHECK:STDOUT: %.loc28_7.1: Core.IntLiteral = int_value 0 [template = constants.%.7] // CHECK:STDOUT: %.loc28_4.2: ref %.3 = temporary %.loc28_4.1, %F.call -// CHECK:STDOUT: %.loc28_7.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc28_7.3: = bound_method %.loc28_7.1, %.loc28_7.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc28_7.4: = specific_function %.loc28_7.3, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_7.4(%.loc28_7.1) [template = constants.%.40] -// CHECK:STDOUT: %.loc28_7.5: %i32 = value_of_initializer %int.convert_checked.loc28 [template = constants.%.40] -// CHECK:STDOUT: %.loc28_7.6: %i32 = converted %.loc28_7.1, %.loc28_7.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc28_7.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc28_7.3: = bound_method %.loc28_7.1, %.loc28_7.2 [template = constants.%.42] +// CHECK:STDOUT: %.loc28_7.4: = specific_function %.loc28_7.3, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_7.4(%.loc28_7.1) [template = constants.%.44] +// CHECK:STDOUT: %.loc28_7.5: %i32 = value_of_initializer %int.convert_checked.loc28 [template = constants.%.44] +// CHECK:STDOUT: %.loc28_7.6: %i32 = converted %.loc28_7.1, %.loc28_7.5 [template = constants.%.44] // CHECK:STDOUT: %.loc28_8.1: ref %i32 = array_index %.loc28_4.2, %.loc28_7.6 // CHECK:STDOUT: %.loc28_8.2: %i32 = bind_value %.loc28_8.1 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index c74fb94c56f0..fe7a0c421a7a 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -36,18 +36,18 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.29) [template] -// CHECK:STDOUT: %.30: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.14 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.33) [template] +// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2147483647 [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %.38: = bound_method %.37, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -93,36 +93,36 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11 [template = constants.%.33] // CHECK:STDOUT: %.loc11_23.6: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc11_23.7: ref %i32 = array_index file.%a.var, %.loc11_23.6 -// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.33] // CHECK:STDOUT: %.loc11_23.9: init %.3 = array_init (%.loc11_23.8) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.9 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 // CHECK:STDOUT: %a.ref.loc17: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc17_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc17_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_16.3: = bound_method %.loc17_16.1, %.loc17_16.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc17_16.4: = specific_function %.loc17_16.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_16.4(%.loc17_16.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc17_16.5: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%.32] -// CHECK:STDOUT: %.loc17_16.6: %i32 = converted %.loc17_16.1, %.loc17_16.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc17_16.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_16.3: = bound_method %.loc17_16.1, %.loc17_16.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_16.4: = specific_function %.loc17_16.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_16.4(%.loc17_16.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc17_16.5: %i32 = value_of_initializer %int.convert_checked.loc17 [template = constants.%.36] +// CHECK:STDOUT: %.loc17_16.6: %i32 = converted %.loc17_16.1, %.loc17_16.5 [template = constants.%.36] // CHECK:STDOUT: %.loc17_17.1: ref %i32 = array_index %a.ref.loc17, %.loc17_16.6 [template = ] // CHECK:STDOUT: %.loc17_17.2: %i32 = bind_value %.loc17_17.1 // CHECK:STDOUT: assign file.%b.var, %.loc17_17.2 // CHECK:STDOUT: %a.ref.loc22: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] -// CHECK:STDOUT: %.loc22_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_16.3: = bound_method %.loc22_16.1, %.loc22_16.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc22_16.4: = specific_function %.loc22_16.3, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %.loc22_16.4(%.loc22_16.1) [template = constants.%.36] -// CHECK:STDOUT: %.loc22_16.5: %i32 = value_of_initializer %int.convert_checked.loc22 [template = constants.%.36] -// CHECK:STDOUT: %.loc22_16.6: %i32 = converted %.loc22_16.1, %.loc22_16.5 [template = constants.%.36] +// CHECK:STDOUT: %.loc22_16.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.37] +// CHECK:STDOUT: %.loc22_16.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_16.3: = bound_method %.loc22_16.1, %.loc22_16.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc22_16.4: = specific_function %.loc22_16.3, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %.loc22_16.4(%.loc22_16.1) [template = constants.%.40] +// CHECK:STDOUT: %.loc22_16.5: %i32 = value_of_initializer %int.convert_checked.loc22 [template = constants.%.40] +// CHECK:STDOUT: %.loc22_16.6: %i32 = converted %.loc22_16.1, %.loc22_16.5 [template = constants.%.40] // CHECK:STDOUT: %.loc22_27.1: ref %i32 = array_index %a.ref.loc22, %.loc22_16.6 [template = ] // CHECK:STDOUT: %.loc22_27.2: %i32 = bind_value %.loc22_27.1 // CHECK:STDOUT: assign file.%c.var, %.loc22_27.2 diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 2cd16060a7da..928aaece47cd 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -32,12 +32,12 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.29) [template] -// CHECK:STDOUT: %.30: f64 = float_literal 2.6000000000000001 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.33) [template] +// CHECK:STDOUT: %.34: f64 = float_literal 2.6000000000000001 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,19 +76,19 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked [template = constants.%.33] // CHECK:STDOUT: %.loc11_23.6: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc11_23.7: ref %i32 = array_index file.%a.var, %.loc11_23.6 -// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.33] // CHECK:STDOUT: %.loc11_23.9: init %.3 = array_init (%.loc11_23.8) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.9 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a -// CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.30] +// CHECK:STDOUT: %.loc18_16.1: f64 = float_literal 2.6000000000000001 [template = constants.%.34] // CHECK:STDOUT: %.loc18_16.2: %i32 = converted %.loc18_16.1, [template = ] // CHECK:STDOUT: %.loc18_19.1: ref %i32 = array_index %a.ref, [template = ] // CHECK:STDOUT: %.loc18_19.2: %i32 = bind_value %.loc18_19.1 diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index d6b76e601b6e..0099afe5192e 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -29,14 +29,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.29) [template] -// CHECK:STDOUT: %.30: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.33) [template] +// CHECK:STDOUT: %.34: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,25 +75,25 @@ var b: i32 = a[1]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 12 [template = constants.%.5] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%.loc11_20) -// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_23.3: = bound_method %.loc11_20, %.loc11_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_23.4: = specific_function %.loc11_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_23.4(%.loc11_20) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_23.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11 [template = constants.%.33] // CHECK:STDOUT: %.loc11_23.6: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc11_23.7: ref %i32 = array_index file.%a.var, %.loc11_23.6 -// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_23.8: init %i32 = initialize_from %.loc11_23.5 to %.loc11_23.7 [template = constants.%.33] // CHECK:STDOUT: %.loc11_23.9: init %.3 = array_init (%.loc11_23.8) to file.%a.var [template = constants.%array] // CHECK:STDOUT: %.loc11_24: init %.3 = converted %.loc11_23.1, %.loc11_23.9 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_24 // CHECK:STDOUT: %a.ref: ref %.3 = name_ref a, file.%a // CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_16.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_16.3: = bound_method %.loc15_16.1, %.loc15_16.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_16.4: = specific_function %.loc15_16.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_16.4(%.loc15_16.1) [template = constants.%.32] -// CHECK:STDOUT: %.loc15_16.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.32] -// CHECK:STDOUT: %.loc15_16.6: %i32 = converted %.loc15_16.1, %.loc15_16.5 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_16.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_16.3: = bound_method %.loc15_16.1, %.loc15_16.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc15_16.4: = specific_function %.loc15_16.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_16.4(%.loc15_16.1) [template = constants.%.36] +// CHECK:STDOUT: %.loc15_16.5: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_16.6: %i32 = converted %.loc15_16.1, %.loc15_16.5 [template = constants.%.36] // CHECK:STDOUT: %.loc15_17.1: ref %i32 = array_index %a.ref, %.loc15_16.6 [template = ] // CHECK:STDOUT: %.loc15_17.2: %i32 = bind_value %.loc15_17.1 // CHECK:STDOUT: assign file.%b.var, %.loc15_17.2 diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 860fe4e9c5ad..2c51a5e6b73e 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -54,14 +54,14 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.6, %Convert.14 [template] // CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.37: %i32 = int_value 4 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -121,12 +121,12 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %pb: ref %.5 = bind_name pb, %pb.var // CHECK:STDOUT: %b.ref.loc19: %.3 = name_ref b, %b // CHECK:STDOUT: %.loc19_21.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc19_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_21.3: = bound_method %.loc19_21.1, %.loc19_21.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc19_21.4: = specific_function %.loc19_21.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_21.4(%.loc19_21.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc19_21.5: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%.29] -// CHECK:STDOUT: %.loc19_21.6: %i32 = converted %.loc19_21.1, %.loc19_21.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc19_21.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_21.3: = bound_method %.loc19_21.1, %.loc19_21.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc19_21.4: = specific_function %.loc19_21.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_21.4(%.loc19_21.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc19_21.5: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%.33] +// CHECK:STDOUT: %.loc19_21.6: %i32 = converted %.loc19_21.1, %.loc19_21.5 [template = constants.%.33] // CHECK:STDOUT: %.loc19_22.1: ref %.3 = value_as_ref %b.ref.loc19 // CHECK:STDOUT: %.loc19_22.2: ref %i32 = array_index %.loc19_22.1, %.loc19_21.6 // CHECK:STDOUT: %.loc19_22.3: %i32 = bind_value %.loc19_22.2 @@ -134,21 +134,21 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: assign %pb.var, %.loc19_18 // CHECK:STDOUT: %b.ref.loc24: %.3 = name_ref b, %b // CHECK:STDOUT: %.loc24_5.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc24_5.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_5.3: = bound_method %.loc24_5.1, %.loc24_5.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc24_5.4: = specific_function %.loc24_5.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc24_5: init %i32 = call %.loc24_5.4(%.loc24_5.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc24_5.5: %i32 = value_of_initializer %int.convert_checked.loc24_5 [template = constants.%.29] -// CHECK:STDOUT: %.loc24_5.6: %i32 = converted %.loc24_5.1, %.loc24_5.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc24_5.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_5.3: = bound_method %.loc24_5.1, %.loc24_5.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc24_5.4: = specific_function %.loc24_5.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc24_5: init %i32 = call %.loc24_5.4(%.loc24_5.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc24_5.5: %i32 = value_of_initializer %int.convert_checked.loc24_5 [template = constants.%.33] +// CHECK:STDOUT: %.loc24_5.6: %i32 = converted %.loc24_5.1, %.loc24_5.5 [template = constants.%.33] // CHECK:STDOUT: %.loc24_6.1: ref %.3 = value_as_ref %b.ref.loc24 // CHECK:STDOUT: %.loc24_6.2: ref %i32 = array_index %.loc24_6.1, %.loc24_5.6 // CHECK:STDOUT: %.loc24_6.3: %i32 = bind_value %.loc24_6.2 -// CHECK:STDOUT: %.loc24_10: Core.IntLiteral = int_value 4 [template = constants.%.30] -// CHECK:STDOUT: %.loc24_8.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_8.2: = bound_method %.loc24_10, %.loc24_8.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc24_8.3: = specific_function %.loc24_8.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %.loc24_8.3(%.loc24_10) [template = constants.%.33] -// CHECK:STDOUT: %.loc24_8.4: init %i32 = converted %.loc24_10, %int.convert_checked.loc24_8 [template = constants.%.33] +// CHECK:STDOUT: %.loc24_10: Core.IntLiteral = int_value 4 [template = constants.%.34] +// CHECK:STDOUT: %.loc24_8.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_8.2: = bound_method %.loc24_10, %.loc24_8.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc24_8.3: = specific_function %.loc24_8.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %.loc24_8.3(%.loc24_10) [template = constants.%.37] +// CHECK:STDOUT: %.loc24_8.4: init %i32 = converted %.loc24_10, %int.convert_checked.loc24_8 [template = constants.%.37] // CHECK:STDOUT: assign %.loc24_6.3, %.loc24_8.4 // CHECK:STDOUT: %.loc32_11: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc32: init type = call constants.%Int(%.loc32_11) [template = constants.%i32] @@ -162,12 +162,12 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %F.call.loc32: init %.3 = call %F.ref.loc32() to %.loc32_20.1 // CHECK:STDOUT: %.loc32_23.1: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc32_20.2: ref %.3 = temporary %.loc32_20.1, %F.call.loc32 -// CHECK:STDOUT: %.loc32_23.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc32_23.3: = bound_method %.loc32_23.1, %.loc32_23.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc32_23.4: = specific_function %.loc32_23.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_23.4(%.loc32_23.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc32_23.5: %i32 = value_of_initializer %int.convert_checked.loc32 [template = constants.%.29] -// CHECK:STDOUT: %.loc32_23.6: %i32 = converted %.loc32_23.1, %.loc32_23.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc32_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc32_23.3: = bound_method %.loc32_23.1, %.loc32_23.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc32_23.4: = specific_function %.loc32_23.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_23.4(%.loc32_23.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc32_23.5: %i32 = value_of_initializer %int.convert_checked.loc32 [template = constants.%.33] +// CHECK:STDOUT: %.loc32_23.6: %i32 = converted %.loc32_23.1, %.loc32_23.5 [template = constants.%.33] // CHECK:STDOUT: %.loc32_24.1: ref %i32 = array_index %.loc32_20.2, %.loc32_23.6 // CHECK:STDOUT: %.loc32_24.2: %i32 = bind_value %.loc32_24.1 // CHECK:STDOUT: %.loc32_18: %.5 = addr_of [template = ] @@ -177,20 +177,20 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %F.call.loc36: init %.3 = call %F.ref.loc36() to %.loc36_4.1 // CHECK:STDOUT: %.loc36_7.1: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc36_4.2: ref %.3 = temporary %.loc36_4.1, %F.call.loc36 -// CHECK:STDOUT: %.loc36_7.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc36_7.3: = bound_method %.loc36_7.1, %.loc36_7.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc36_7.4: = specific_function %.loc36_7.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %.loc36_7.4(%.loc36_7.1) [template = constants.%.29] -// CHECK:STDOUT: %.loc36_7.5: %i32 = value_of_initializer %int.convert_checked.loc36_7 [template = constants.%.29] -// CHECK:STDOUT: %.loc36_7.6: %i32 = converted %.loc36_7.1, %.loc36_7.5 [template = constants.%.29] +// CHECK:STDOUT: %.loc36_7.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc36_7.3: = bound_method %.loc36_7.1, %.loc36_7.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc36_7.4: = specific_function %.loc36_7.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %.loc36_7.4(%.loc36_7.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc36_7.5: %i32 = value_of_initializer %int.convert_checked.loc36_7 [template = constants.%.33] +// CHECK:STDOUT: %.loc36_7.6: %i32 = converted %.loc36_7.1, %.loc36_7.5 [template = constants.%.33] // CHECK:STDOUT: %.loc36_8.1: ref %i32 = array_index %.loc36_4.2, %.loc36_7.6 // CHECK:STDOUT: %.loc36_8.2: %i32 = bind_value %.loc36_8.1 -// CHECK:STDOUT: %.loc36_12: Core.IntLiteral = int_value 4 [template = constants.%.30] -// CHECK:STDOUT: %.loc36_10.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc36_10.2: = bound_method %.loc36_12, %.loc36_10.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc36_10.3: = specific_function %.loc36_10.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc36_10: init %i32 = call %.loc36_10.3(%.loc36_12) [template = constants.%.33] -// CHECK:STDOUT: %.loc36_10.4: init %i32 = converted %.loc36_12, %int.convert_checked.loc36_10 [template = constants.%.33] +// CHECK:STDOUT: %.loc36_12: Core.IntLiteral = int_value 4 [template = constants.%.34] +// CHECK:STDOUT: %.loc36_10.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc36_10.2: = bound_method %.loc36_12, %.loc36_10.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc36_10.3: = specific_function %.loc36_10.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc36_10: init %i32 = call %.loc36_10.3(%.loc36_12) [template = constants.%.37] +// CHECK:STDOUT: %.loc36_10.4: init %i32 = converted %.loc36_12, %int.convert_checked.loc36_10 [template = constants.%.37] // CHECK:STDOUT: assign %.loc36_8.2, %.loc36_10.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index 7391d276240f..2275866abe79 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -47,7 +47,7 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %.4: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %.5: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %struct: %.5 = struct_value (%.3, %.4) [template] -// CHECK:STDOUT: %.9: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %.11: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -123,7 +123,7 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: %int.make_type_signed.loc34_28: init type = call constants.%Int(%.loc34_28.1) [template = constants.%i32] // CHECK:STDOUT: %.loc34_28.2: type = value_of_initializer %int.make_type_signed.loc34_28 [template = constants.%i32] // CHECK:STDOUT: %.loc34_28.3: type = converted %int.make_type_signed.loc34_28, %.loc34_28.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc34_31: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.9] +// CHECK:STDOUT: %.loc34_31: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.11] // CHECK:STDOUT: %.loc34_33: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index b7b2f2a65f74..9d2a288b75fb 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -30,13 +30,13 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 42 [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %array: %.3 = tuple_value (%.29, %.29) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 42 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %array: %.3 = tuple_value (%.33, %.33) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,27 +77,27 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 42 [template = constants.%.5] // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 42 [template = constants.%.5] // CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%.loc11_20, %.loc11_24) -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_20, %.loc11_26.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_20) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_20, %.loc11_26.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_20) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_20, %int.convert_checked.loc11_26.1 [template = constants.%.33] // CHECK:STDOUT: %.loc11_26.6: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc11_26.7: ref %i32 = array_index file.%c.var, %.loc11_26.6 -// CHECK:STDOUT: %.loc11_26.8: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.7 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.9: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.10: = bound_method %.loc11_24, %.loc11_26.9 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_26.11: = specific_function %.loc11_26.10, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.11(%.loc11_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.12: init %i32 = converted %.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_26.13: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_26.8: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.7 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_26.9: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.10: = bound_method %.loc11_24, %.loc11_26.9 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_26.11: = specific_function %.loc11_26.10, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.11(%.loc11_24) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_26.12: init %i32 = converted %.loc11_24, %int.convert_checked.loc11_26.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_26.13: Core.IntLiteral = int_value 1 [template = constants.%.34] // CHECK:STDOUT: %.loc11_26.14: ref %i32 = array_index file.%c.var, %.loc11_26.13 -// CHECK:STDOUT: %.loc11_26.15: init %i32 = initialize_from %.loc11_26.12 to %.loc11_26.14 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_26.15: init %i32 = initialize_from %.loc11_26.12 to %.loc11_26.14 [template = constants.%.33] // CHECK:STDOUT: %.loc11_26.16: init %.3 = array_init (%.loc11_26.8, %.loc11_26.15) to file.%c.var [template = constants.%array] // CHECK:STDOUT: %.loc11_27: init %.3 = converted %.loc11_26.1, %.loc11_26.16 [template = constants.%array] // CHECK:STDOUT: assign file.%c.var, %.loc11_27 // CHECK:STDOUT: %c.ref: ref %.3 = name_ref c, file.%c -// CHECK:STDOUT: %.loc15_17: Core.IntLiteral = int_value 10 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_17: Core.IntLiteral = int_value 10 [template = constants.%.35] // CHECK:STDOUT: %.loc15_19.1: ref %i32 = array_index %c.ref, [template = ] // CHECK:STDOUT: %.loc15_19.2: %i32 = bind_value %.loc15_19.1 // CHECK:STDOUT: assign file.%d.var, %.loc15_19.2 diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index 7d7955c1ce15..1e414705f9fa 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -24,8 +24,8 @@ interface I { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self.1: %I.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 42 [template] -// CHECK:STDOUT: %.21: type = assoc_entity_type %I.type, type [template] -// CHECK:STDOUT: %.22: %.21 = assoc_entity element0, @I.%T [template] +// CHECK:STDOUT: %.25: type = assoc_entity_type %I.type, type [template] +// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -50,7 +50,7 @@ interface I { // CHECK:STDOUT: %.loc18_18: Core.IntLiteral = int_value 42 [template = constants.%.1] // CHECK:STDOUT: %.loc18_20.1: type = converted %.loc18_18, [template = ] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] -// CHECK:STDOUT: %.loc18_20.2: %.21 = assoc_entity element0, %T [template = constants.%.22] +// CHECK:STDOUT: %.loc18_20.2: %.25 = assoc_entity element0, %T [template = constants.%.26] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index 573041fc397b..c6282f522400 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -37,12 +37,12 @@ interface I { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 42 [template] -// CHECK:STDOUT: %.28: type = assoc_entity_type %I.type, %i32 [template] -// CHECK:STDOUT: %.29: %.28 = assoc_entity element1, @I.%N [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 42 [template] +// CHECK:STDOUT: %.32: type = assoc_entity_type %I.type, %i32 [template] +// CHECK:STDOUT: %.33: %.32 = assoc_entity element1, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,14 +82,14 @@ interface I { // CHECK:STDOUT: %.loc20_19.2: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] // CHECK:STDOUT: %.loc20_19.3: type = converted %int.make_type_signed.loc20, %.loc20_19.2 [template = constants.%i32] // CHECK:STDOUT: %.loc20_25: Core.IntLiteral = int_value 42 [template = constants.%.4] -// CHECK:STDOUT: %.loc20_27.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_27.2: = bound_method %.loc20_25, %.loc20_27.1 [template = constants.%.25] -// CHECK:STDOUT: %.loc20_27.3: = specific_function %.loc20_27.2, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc20_27.3(%.loc20_25) [template = constants.%.27] -// CHECK:STDOUT: %.loc20_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc20_27.5: %i32 = converted %.loc20_25, %.loc20_27.4 [template = constants.%.27] +// CHECK:STDOUT: %.loc20_27.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc20_27.2: = bound_method %.loc20_25, %.loc20_27.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc20_27.3: = specific_function %.loc20_27.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc20_27.3(%.loc20_25) [template = constants.%.31] +// CHECK:STDOUT: %.loc20_27.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc20_27.5: %i32 = converted %.loc20_25, %.loc20_27.4 [template = constants.%.31] // CHECK:STDOUT: %N: %i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc20_27.6: %.28 = assoc_entity element1, %N [template = constants.%.29] +// CHECK:STDOUT: %.loc20_27.6: %.32 = assoc_entity element1, %N [template = constants.%.33] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index e62e96436dfb..53f9b43a4b0c 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon @@ -23,6 +23,7 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T.patt: %Empty.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] +// CHECK:STDOUT: %.1: type = facet_access_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -54,14 +55,15 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T.patt.loc13_6.2: %Empty.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.loc14_10.3: type = facet_access_type %T.loc13_6.2 [symbolic = %.loc14_10.3 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Empty.type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc14_10.1: type = facet_type_access %T.ref [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc14_10.2: type = converted %T.ref, %.loc14_10.1 [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %x.var: ref @F.%T.loc13_6.2 (%T) = var x -// CHECK:STDOUT: %x: ref @F.%T.loc13_6.2 (%T) = bind_name x, %x.var +// CHECK:STDOUT: %.loc14_10.1: type = facet_access_type %T.ref [symbolic = %.loc14_10.3 (constants.%.1)] +// CHECK:STDOUT: %.loc14_10.2: type = converted %T.ref, %.loc14_10.1 [symbolic = %.loc14_10.3 (constants.%.1)] +// CHECK:STDOUT: %x.var: ref @F.%.loc14_10.3 (%.1) = var x +// CHECK:STDOUT: %x: ref @F.%.loc14_10.3 (%.1) = bind_name x, %x.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index cf9fb73f03c1..ef846ade5b0b 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -36,9 +36,10 @@ class C { // CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template] // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] -// CHECK:STDOUT: %.3: = interface_witness (%F.2) [template] -// CHECK:STDOUT: %.4: type = struct_type {} [template] -// CHECK:STDOUT: %.5: = complete_type_witness %.4 [template] +// CHECK:STDOUT: %.3: %I.type = facet_value %C, %C [template] +// CHECK:STDOUT: %.4: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.5: type = struct_type {} [template] +// CHECK:STDOUT: %.6: = complete_type_witness %.5 [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -62,7 +63,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %I.ref { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc21: = interface_witness (%F.decl) [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -75,7 +76,7 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc24: = complete_type_witness %.4 [template = constants.%.5] +// CHECK:STDOUT: %.loc24: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -90,14 +91,14 @@ class C { // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %.loc16_19.1: %.4 = struct_literal () +// CHECK:STDOUT: %.loc16_19.1: %.5 = struct_literal () // CHECK:STDOUT: %.loc16_19.2: init %C = class_init (), %c.var [template = constants.%struct] // CHECK:STDOUT: %.loc16_20: init %C = converted %.loc16_19.1, %.loc16_19.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc16_20 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c // CHECK:STDOUT: %I.ref: type = name_ref I, @C.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %F.ref: %.1 = name_ref F, @I.%.loc14 [template = constants.%.2] -// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.3, element0 [template = constants.%F.2] +// CHECK:STDOUT: %.loc17: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc17() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -110,5 +111,5 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) {} // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%.3) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index bd38678acc91..683fdaf39be3 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -123,10 +123,11 @@ interface Class { } // CHECK:STDOUT: %Self.1: %Interface.type = bind_symbolic_name Self, 0 [symbolic] // CHECK:STDOUT: %.type: type = facet_type <@.1> [template] // CHECK:STDOUT: %Self.2: %.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @.1.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @.1.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -148,16 +149,16 @@ interface Class { } // CHECK:STDOUT: interface @.1 { // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%Self (%Self.2) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%Self (%Self.2) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%.loc14_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%.loc14_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %.type = name_ref Self, @.1.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc14_14.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %.loc14_14.2: type = converted %Self.ref, %.loc14_14.1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %self.param: @F.%Self (%Self.2) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%Self (%Self.2) = bind_name self, %self.param +// CHECK:STDOUT: %.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %.loc14_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc14_14.3: type = converted %Self.ref, %.loc14_14.2 [symbolic = %.loc14_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.%.loc14_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%.loc14_14.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc14: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -167,12 +168,14 @@ interface Class { } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@.1.%Self: %.type) { // CHECK:STDOUT: %Self: %.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.loc14_14.1: type = facet_access_type %Self [symbolic = %.loc14_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%Self (%Self.2)](); +// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc14_14.1 (%.1)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self.2) { // CHECK:STDOUT: %Self => constants.%Self.2 +// CHECK:STDOUT: %.loc14_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_name_conflict_with_fn.carbon diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index 89c45cb60003..bddf7c3ae993 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -29,7 +29,7 @@ interface Generic(T:! type); interface Generic {} interface DifferentParams(T:! type); -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error: redeclaration differs at parameter 1 [RedeclParamDiffers] +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error: type `()` of parameter 1 in redeclaration differs from previous parameter type `type` [RedeclParamDiffersType] // CHECK:STDERR: interface DifferentParams(T:! ()) {} // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note: previous declaration's corresponding parameter here [RedeclParamPrevious] diff --git a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon index 3ae258ce4a1c..e2ab1adc7dad 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon @@ -152,10 +152,11 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -168,16 +169,16 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%.loc9_22.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%.loc9_22.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_22.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_22.2: type = converted %Self.ref, %.loc9_22.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @F.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %.loc9_22.2: type = facet_access_type %Self.ref [symbolic = %.loc9_22.1 (constants.%.1)] +// CHECK:STDOUT: %.loc9_22.3: type = converted %Self.ref, %.loc9_22.2 [symbolic = %.loc9_22.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.%.loc9_22.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%.loc9_22.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc9: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -187,12 +188,14 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc9_22.1: type = facet_access_type %Self [symbolic = %.loc9_22.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%Self (%Self)](); +// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc9_22.1 (%.1)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc9_22.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_protected_member.carbon @@ -200,10 +203,11 @@ interface I { // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -216,16 +220,16 @@ interface I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @F.%.loc8_24.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%.loc8_24.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc8_24.1: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc8_24.2: type = converted %Self.ref, %.loc8_24.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @F.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %.loc8_24.2: type = facet_access_type %Self.ref [symbolic = %.loc8_24.1 (constants.%.1)] +// CHECK:STDOUT: %.loc8_24.3: type = converted %Self.ref, %.loc8_24.2 [symbolic = %.loc8_24.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.%.loc8_24.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%.loc8_24.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc8: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -235,11 +239,13 @@ interface I { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc8_24.1: type = facet_access_type %Self [symbolic = %.loc8_24.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%Self (%Self)](); +// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc8_24.1 (%.1)](); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc8_24.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index efc26cfbdd6f..78d7a7444d34 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -38,6 +38,7 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %T.patt: %Interface.type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %CallStatic.type: type = fn_type @CallStatic [template] // CHECK:STDOUT: %CallStatic: %CallStatic.type = struct_value () [template] +// CHECK:STDOUT: %.3: type = facet_access_type %T [symbolic] // CHECK:STDOUT: %CallFacet.type: type = fn_type @CallFacet [template] // CHECK:STDOUT: %CallFacet: %CallFacet.type = struct_value () [template] // CHECK:STDOUT: } @@ -60,17 +61,17 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %CallFacet.decl: %CallFacet.type = fn_decl @CallFacet [template = constants.%CallFacet] { // CHECK:STDOUT: %T.patt.loc21_14.1: %Interface.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %Interface.type = value_param_pattern %T.patt.loc21_14.1, runtime_param [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %x.patt: @CallFacet.%T.loc21_14.2 (%T) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @CallFacet.%T.loc21_14.2 (%T) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @CallFacet.%.loc21_32.3 (%.3) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @CallFacet.%.loc21_32.3 (%.3) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc21_32.1: type = facet_type_access %T.ref [symbolic = %T.loc21_14.2 (constants.%T)] -// CHECK:STDOUT: %.loc21_32.2: type = converted %T.ref, %.loc21_32.1 [symbolic = %T.loc21_14.2 (constants.%T)] +// CHECK:STDOUT: %.loc21_32.1: type = facet_access_type %T.ref [symbolic = %.loc21_32.3 (constants.%.3)] +// CHECK:STDOUT: %.loc21_32.2: type = converted %T.ref, %.loc21_32.1 [symbolic = %.loc21_32.3 (constants.%.3)] // CHECK:STDOUT: %T.param: %Interface.type = value_param runtime_param // CHECK:STDOUT: %T.loc21_14.1: %Interface.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_14.2 (constants.%T)] -// CHECK:STDOUT: %x.param: @CallFacet.%T.loc21_14.2 (%T) = value_param runtime_param0 -// CHECK:STDOUT: %x: @CallFacet.%T.loc21_14.2 (%T) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @CallFacet.%.loc21_32.3 (%.3) = value_param runtime_param0 +// CHECK:STDOUT: %x: @CallFacet.%.loc21_32.3 (%.3) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -107,12 +108,13 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: generic fn @CallFacet(%T.loc21_14.1: %Interface.type) { // CHECK:STDOUT: %T.loc21_14.2: %Interface.type = bind_symbolic_name T, 0 [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc21_14.2: %Interface.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt)] +// CHECK:STDOUT: %.loc21_32.3: type = facet_access_type %T.loc21_14.2 [symbolic = %.loc21_32.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: %Interface.type, %x.param_patt: @CallFacet.%T.loc21_14.2 (%T)) { +// CHECK:STDOUT: fn(%T.param_patt: %Interface.type, %x.param_patt: @CallFacet.%.loc21_32.3 (%.3)) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref: @CallFacet.%T.loc21_14.2 (%T) = name_ref x, %x +// CHECK:STDOUT: %x.ref: @CallFacet.%.loc21_32.3 (%.3) = name_ref x, %x // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -127,5 +129,6 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: specific @CallFacet(constants.%T) { // CHECK:STDOUT: %T.loc21_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc21_14.2 => constants.%T +// CHECK:STDOUT: %.loc21_32.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index 5c1881711986..18165de0f4db 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -30,12 +30,13 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %I: %I.type.1 = struct_value () [template] // CHECK:STDOUT: %I.type.2: type = facet_type <@I, @I(%T)> [symbolic] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T) [symbolic] // CHECK:STDOUT: %F: %F.type = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %I.type.2, %F.type [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @I.%F.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %I.type.2, %F.type [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%F.decl [symbolic] // CHECK:STDOUT: %.type: type = fn_type @.1, @I(%T) [symbolic] -// CHECK:STDOUT: %.3: %.type = struct_value () [symbolic] +// CHECK:STDOUT: %.4: %.type = struct_value () [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -49,26 +50,26 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.3] { -// CHECK:STDOUT: %self.patt: @.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @.1.%Self (%Self) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @.1.%Self (%Self) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [symbolic = constants.%.4] { +// CHECK:STDOUT: %self.patt: @.1.%.loc22_24.4 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @.1.%.loc22_24.4 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @.1.%.loc22_24.4 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @.1.%.loc22_24.4 (%.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc22_6.2 (constants.%T)] // CHECK:STDOUT: %.loc22_24.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_24: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_24.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_24.2: type = facet_type_access %Self.ref.loc22_24 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_24.3: type = converted %Self.ref.loc22_24, %.loc22_24.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc22_24.2: type = facet_access_type %Self.ref.loc22_24 [symbolic = %.loc22_24.4 (constants.%.1)] +// CHECK:STDOUT: %.loc22_24.3: type = converted %Self.ref.loc22_24, %.loc22_24.2 [symbolic = %.loc22_24.4 (constants.%.1)] // CHECK:STDOUT: %.loc22_35.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_35: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_35.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_35.2: type = facet_type_access %Self.ref.loc22_35 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc22_35.3: type = converted %Self.ref.loc22_35, %.loc22_35.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @.1.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @.1.%Self (%Self) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @.1.%Self (%Self) = return_slot %return.param +// CHECK:STDOUT: %.loc22_35.2: type = facet_access_type %Self.ref.loc22_35 [symbolic = %.loc22_24.4 (constants.%.1)] +// CHECK:STDOUT: %.loc22_35.3: type = converted %Self.ref.loc22_35, %.loc22_35.2 [symbolic = %.loc22_24.4 (constants.%.1)] +// CHECK:STDOUT: %self.param: @.1.%.loc22_24.4 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @.1.%.loc22_24.4 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @.1.%.loc22_24.4 (%.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @.1.%.loc22_24.4 (%.1) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -81,31 +82,31 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.2: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc11_13.2) [symbolic = %F.type (constants.%F.type)] // CHECK:STDOUT: %F: @I.%F.type (%F.type) = struct_value () [symbolic = %F (constants.%F)] -// CHECK:STDOUT: %.loc13_29.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.loc13_29.2 (constants.%.1)] -// CHECK:STDOUT: %.loc13_29.3: @I.%.loc13_29.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.2)] +// CHECK:STDOUT: %.loc13_29.2: type = assoc_entity_type @I.%I.type (%I.type.2), @I.%F.type (%F.type) [symbolic = %.loc13_29.2 (constants.%.2)] +// CHECK:STDOUT: %.loc13_29.3: @I.%.loc13_29.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @I.%I.type (%I.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %F.decl: @I.%F.type (%F.type) = fn_decl @F [symbolic = @I.%F (constants.%F)] { -// CHECK:STDOUT: %self.patt: @F.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%Self (%Self) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%Self (%Self) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %self.patt: @F.%.loc13_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%.loc13_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%.loc13_14.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%.loc13_14.1 (%.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_14.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.2: type = facet_type_access %Self.ref.loc13_14 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_14.3: type = converted %Self.ref.loc13_14, %.loc13_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc13_14.2: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc13_14.3: type = facet_access_type %Self.ref.loc13_14 [symbolic = %.loc13_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc13_14.4: type = converted %Self.ref.loc13_14, %.loc13_14.3 [symbolic = %.loc13_14.1 (constants.%.1)] // CHECK:STDOUT: %.loc13_25.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc13_25: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_25.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_25.2: type = facet_type_access %Self.ref.loc13_25 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc13_25.3: type = converted %Self.ref.loc13_25, %.loc13_25.2 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @F.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.%Self (%Self) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%Self (%Self) = return_slot %return.param +// CHECK:STDOUT: %.loc13_25.2: type = facet_access_type %Self.ref.loc13_25 [symbolic = %.loc13_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc13_25.3: type = converted %Self.ref.loc13_25, %.loc13_25.2 [symbolic = %.loc13_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.%.loc13_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%.loc13_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.%.loc13_14.1 (%.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%.loc13_14.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_29.1: @I.%.loc13_29.2 (%.1) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.2)] +// CHECK:STDOUT: %.loc13_29.1: @I.%.loc13_29.2 (%.2) = assoc_entity element0, %F.decl [symbolic = %.loc13_29.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -118,8 +119,9 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc13_14.1: type = facet_access_type %Self [symbolic = %.loc13_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%Self (%Self)]() -> @F.%Self (%Self); +// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc13_14.1 (%.1)]() -> @F.%.loc13_14.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @.1(%T.loc22_6.1: type, @I.%Self.1: @I.%I.type (%I.type.2)) { @@ -127,12 +129,13 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt (constants.%T.patt)] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(%T.loc22_6.2)> [symbolic = %I.type (constants.%I.type.2)] // CHECK:STDOUT: %Self: %I.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc22_24.4: type = facet_access_type %Self [symbolic = %.loc22_24.4 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @.1.%Self (%Self)]() -> @.1.%Self (%Self) { +// CHECK:STDOUT: fn[%self.param_patt: @.1.%.loc22_24.4 (%.1)]() -> @.1.%.loc22_24.4 (%.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %self.ref: @.1.%Self (%Self) = name_ref self, %self +// CHECK:STDOUT: %self.ref: @.1.%.loc22_24.4 (%.1) = name_ref self, %self // CHECK:STDOUT: return %self.ref // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -146,8 +149,8 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %F.type => constants.%F.type // CHECK:STDOUT: %F => constants.%F -// CHECK:STDOUT: %.loc13_29.2 => constants.%.1 -// CHECK:STDOUT: %.loc13_29.3 => constants.%.2 +// CHECK:STDOUT: %.loc13_29.2 => constants.%.2 +// CHECK:STDOUT: %.loc13_29.3 => constants.%.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@F.%T) { @@ -159,6 +162,7 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc13_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(%T.loc11_13.2) { @@ -176,5 +180,6 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %T.patt => constants.%T // CHECK:STDOUT: %I.type => constants.%I.type.2 // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc22_24.4 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 2f609492f2aa..c5ef4e26248f 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -89,7 +89,8 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.6: type = assoc_entity_type %WithAssocFn.type.3, %F.type.3 [template] // CHECK:STDOUT: %.7: %.6 = assoc_entity element0, @WithAssocFn.%F.decl [template] -// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.8: %WithAssocFn.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %.9: = interface_witness (%F.2) [template] // CHECK:STDOUT: %struct: %X = struct_value () [template] // CHECK:STDOUT: %N: %T.1 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt: %T.1 = symbolic_binding_pattern N, 1 [symbolic] @@ -101,7 +102,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %Receive: %Receive.type = struct_value () [template] // CHECK:STDOUT: %Pass.type: type = fn_type @Pass [template] // CHECK:STDOUT: %Pass: %Pass.type = struct_value () [template] -// CHECK:STDOUT: %.10: = specific_function %Receive, @Receive(%T.2) [symbolic] +// CHECK:STDOUT: %.11: = specific_function %Receive, @Receive(%T.2) [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -237,7 +238,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param0 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.8] +// CHECK:STDOUT: %.loc15: = interface_witness (%F.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -300,13 +301,13 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc25_9.2: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_9.2) [symbolic = %.loc26_3.2 (constants.%.10)] +// CHECK:STDOUT: %.loc26_3.2: = specific_function constants.%Receive, @Receive(%T.loc25_9.2) [symbolic = %.loc26_3.2 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Simple.type.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Receive.ref: %Receive.type = name_ref Receive, file.%Receive.decl [template = constants.%Receive] // CHECK:STDOUT: %T.ref: %Simple.type.3 = name_ref T, %T.loc25_9.1 [symbolic = %T.loc25_9.2 (constants.%T.2)] -// CHECK:STDOUT: %.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.2) [symbolic = %.loc26_3.2 (constants.%.10)] +// CHECK:STDOUT: %.loc26_3.1: = specific_function %Receive.ref, @Receive(constants.%T.2) [symbolic = %.loc26_3.2 (constants.%.11)] // CHECK:STDOUT: %Receive.call: init %empty_tuple.type = call %.loc26_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -356,7 +357,7 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %.loc10_14.3 => constants.%.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C, constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%C, constants.%.8) {} // CHECK:STDOUT: // CHECK:STDOUT: specific @WithImplicitArgs(constants.%T.1, constants.%N) { // CHECK:STDOUT: %T.loc22_28.2 => constants.%T.1 diff --git a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon index 4393d100b4e7..fc8aad9cdb98 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_import.carbon @@ -120,7 +120,8 @@ impl C as AddWith(C) { // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %.5: type = assoc_entity_type %AddWith.type.3, %F.type.3 [template] // CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.5 [template] -// CHECK:STDOUT: %.7: = interface_witness (%F.2) [template] +// CHECK:STDOUT: %.7: %AddWith.type.2 = facet_value %C, %C [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%F.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -168,7 +169,7 @@ impl C as AddWith(C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref.loc7_6 as %AddWith.type { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] {} {} -// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc7: = interface_witness (%F.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .F = %F.decl @@ -217,5 +218,5 @@ impl C as AddWith(C) { // CHECK:STDOUT: %.2 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @F.1(constants.%C, constants.%C) {} +// CHECK:STDOUT: specific @F.1(constants.%C, constants.%.7) {} // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 2117810ea12e..0c6c923bcbb7 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -17,10 +17,11 @@ interface UseSelf { // CHECK:STDOUT: constants { // CHECK:STDOUT: %UseSelf.type: type = facet_type <@UseSelf> [template] // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.1: type = assoc_entity_type %UseSelf.type, %F.type [template] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @UseSelf.%F.decl [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %UseSelf.type, %F.type [template] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @UseSelf.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -33,23 +34,23 @@ interface UseSelf { // CHECK:STDOUT: interface @UseSelf { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %self.patt: @F.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @F.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: @F.%Self (%Self) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @F.%Self (%Self) = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %self.patt: @F.%.loc12_14.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @F.%.loc12_14.1 (%.1) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @F.%.loc12_14.1 (%.1) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @F.%.loc12_14.1 (%.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.1: type = facet_type_access %Self.ref.loc12_14 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_14.2: type = converted %Self.ref.loc12_14, %.loc12_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_14.3: type = converted %Self.ref.loc12_14, %.loc12_14.2 [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: %Self.ref.loc12_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_25.1: type = facet_type_access %Self.ref.loc12_25 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc12_25.2: type = converted %Self.ref.loc12_25, %.loc12_25.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %self.param: @F.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @F.%Self (%Self) = bind_name self, %self.param -// CHECK:STDOUT: %return.param: ref @F.%Self (%Self) = out_param runtime_param1 -// CHECK:STDOUT: %return: ref @F.%Self (%Self) = return_slot %return.param +// CHECK:STDOUT: %.loc12_25.1: type = facet_access_type %Self.ref.loc12_25 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %.loc12_25.2: type = converted %Self.ref.loc12_25, %.loc12_25.1 [symbolic = %.loc12_14.1 (constants.%.1)] +// CHECK:STDOUT: %self.param: @F.%.loc12_14.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @F.%.loc12_14.1 (%.1) = bind_name self, %self.param +// CHECK:STDOUT: %return.param: ref @F.%.loc12_14.1 (%.1) = out_param runtime_param1 +// CHECK:STDOUT: %return: ref @F.%.loc12_14.1 (%.1) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12: %.1 = assoc_entity element0, %F.decl [template = constants.%.2] +// CHECK:STDOUT: %.loc12: %.2 = assoc_entity element0, %F.decl [template = constants.%.3] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -59,11 +60,13 @@ interface UseSelf { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F(@UseSelf.%Self: %UseSelf.type) { // CHECK:STDOUT: %Self: %UseSelf.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc12_14.1: type = facet_access_type %Self [symbolic = %.loc12_14.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @F.%Self (%Self)]() -> @F.%Self (%Self); +// CHECK:STDOUT: fn[%self.param_patt: @F.%.loc12_14.1 (%.1)]() -> @F.%.loc12_14.1 (%.1); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc12_14.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 21cc2e6c76ca..4a1e3d1ebb29 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -44,12 +44,12 @@ interface I { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.3) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.3) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 42 [template] -// CHECK:STDOUT: %.32: type = assoc_entity_type %I.type, %i32 [template] -// CHECK:STDOUT: %.33: %.32 = assoc_entity element3, @I.%N [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.8, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.3) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 42 [template] +// CHECK:STDOUT: %.36: type = assoc_entity_type %I.type, %i32 [template] +// CHECK:STDOUT: %.37: %.36 = assoc_entity element3, @I.%N [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -119,14 +119,14 @@ interface I { // CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] // CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed.loc19, %.loc19_11.2 [template = constants.%i32] // CHECK:STDOUT: %.loc19_17: Core.IntLiteral = int_value 42 [template = constants.%.8] -// CHECK:STDOUT: %.loc19_19.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_19.2: = bound_method %.loc19_17, %.loc19_19.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc19_19.3: = specific_function %.loc19_19.2, @Convert.2(constants.%.3) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc19_19.3(%.loc19_17) [template = constants.%.31] -// CHECK:STDOUT: %.loc19_19.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc19_19.5: %i32 = converted %.loc19_17, %.loc19_19.4 [template = constants.%.31] +// CHECK:STDOUT: %.loc19_19.1: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_19.2: = bound_method %.loc19_17, %.loc19_19.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc19_19.3: = specific_function %.loc19_19.2, @Convert.2(constants.%.3) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc19_19.3(%.loc19_17) [template = constants.%.35] +// CHECK:STDOUT: %.loc19_19.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.35] +// CHECK:STDOUT: %.loc19_19.5: %i32 = converted %.loc19_17, %.loc19_19.4 [template = constants.%.35] // CHECK:STDOUT: %N: %i32 = assoc_const_decl N [template] -// CHECK:STDOUT: %.loc19_19.6: %.32 = assoc_entity element3, %N [template = constants.%.33] +// CHECK:STDOUT: %.loc19_19.6: %.36 = assoc_entity element3, %N [template = constants.%.37] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index 9e935bbd1355..e0c0398b4087 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -24,14 +24,14 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,11 +65,11 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %n.var.loc11_26: ref %i32 = var n // CHECK:STDOUT: %n.loc11_26: ref %i32 = bind_name n, %n.var.loc11_26 // CHECK:STDOUT: %.loc11_35: Core.IntLiteral = int_value 1 [template = constants.%.3] -// CHECK:STDOUT: %.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_36.2: = bound_method %.loc11_35, %.loc11_36.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc11_36.3: = specific_function %.loc11_36.2, @Convert.2(constants.%.2) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc11_36: init %i32 = call %.loc11_36.3(%.loc11_35) [template = constants.%.26] -// CHECK:STDOUT: %.loc11_36.4: init %i32 = converted %.loc11_35, %int.convert_checked.loc11_36 [template = constants.%.26] +// CHECK:STDOUT: %.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_36.2: = bound_method %.loc11_35, %.loc11_36.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc11_36.3: = specific_function %.loc11_36.2, @Convert.2(constants.%.2) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc11_36: init %i32 = call %.loc11_36.3(%.loc11_35) [template = constants.%.30] +// CHECK:STDOUT: %.loc11_36.4: init %i32 = converted %.loc11_35, %int.convert_checked.loc11_36 [template = constants.%.30] // CHECK:STDOUT: assign %n.var.loc11_26, %.loc11_36.4 // CHECK:STDOUT: br !if.else.loc11_18 // CHECK:STDOUT: @@ -84,12 +84,12 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %.loc11_59.3: type = converted %int.make_type_signed.loc11_59, %.loc11_59.2 [template = constants.%i32] // CHECK:STDOUT: %n.var.loc11_56: ref %i32 = var n // CHECK:STDOUT: %n.loc11_56: ref %i32 = bind_name n, %n.var.loc11_56 -// CHECK:STDOUT: %.loc11_65: Core.IntLiteral = int_value 2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_66.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_66.2: = bound_method %.loc11_65, %.loc11_66.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_66.3: = specific_function %.loc11_66.2, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_66: init %i32 = call %.loc11_66.3(%.loc11_65) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_66.4: init %i32 = converted %.loc11_65, %int.convert_checked.loc11_66 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_65: Core.IntLiteral = int_value 2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_66.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_66.2: = bound_method %.loc11_65, %.loc11_66.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_66.3: = specific_function %.loc11_66.2, @Convert.2(constants.%.2) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_66: init %i32 = call %.loc11_66.3(%.loc11_65) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_66.4: init %i32 = converted %.loc11_65, %int.convert_checked.loc11_66 [template = constants.%.34] // CHECK:STDOUT: assign %n.var.loc11_56, %.loc11_66.4 // CHECK:STDOUT: br !if.else.loc11_48 // CHECK:STDOUT: diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index bc802c798fee..3cd9e3f45a5b 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -535,10 +535,10 @@ impl i32 as Empty { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -577,12 +577,12 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc5_14.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_14.3: type = converted %int.make_type_signed.loc5, %.loc5_14.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_20: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc5_21.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_21.2: = bound_method %.loc5_20, %.loc5_21.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_21.3: = specific_function %.loc5_21.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_21.3(%.loc5_20) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_21.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc5_21.5: %i32 = converted %.loc5_20, %.loc5_21.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_21.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_21.2: = bound_method %.loc5_20, %.loc5_21.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_21.3: = specific_function %.loc5_21.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc5_21.3(%.loc5_20) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_21.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc5_21.5: %i32 = converted %.loc5_20, %.loc5_21.4 [template = constants.%.29] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0, %.loc5_21.5 [symbolic = constants.%Zero] // CHECK:STDOUT: %Zero.ref: %i32 = name_ref Zero, %Zero [symbolic = constants.%Zero] // CHECK:STDOUT: return %Zero.ref @@ -602,15 +602,15 @@ impl i32 as Empty { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -652,24 +652,24 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc6_16.2: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] // CHECK:STDOUT: %.loc6_16.3: type = converted %int.make_type_signed.loc6, %.loc6_16.2 [template = constants.%i32] // CHECK:STDOUT: %.loc6_22: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_23.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_23.2: = bound_method %.loc6_22, %.loc6_23.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc6_23.3: = specific_function %.loc6_23.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_23.3(%.loc6_22) [template = constants.%.26] -// CHECK:STDOUT: %.loc6_23.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.26] -// CHECK:STDOUT: %.loc6_23.5: %i32 = converted %.loc6_22, %.loc6_23.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc6_23.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_23.2: = bound_method %.loc6_22, %.loc6_23.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc6_23.3: = specific_function %.loc6_23.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_23.3(%.loc6_22) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_23.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_23.5: %i32 = converted %.loc6_22, %.loc6_23.4 [template = constants.%.30] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0, %.loc6_23.5 [symbolic = constants.%Zero] // CHECK:STDOUT: %Zero.ref: %i32 = name_ref Zero, %Zero [symbolic = constants.%Zero] // CHECK:STDOUT: return %Zero.ref // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// CHECK:STDOUT: %.loc9_10: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc9_11.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_11.2: = bound_method %.loc9_10, %.loc9_11.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_11.3: = specific_function %.loc9_11.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_11.3(%.loc9_10) [template = constants.%.30] -// CHECK:STDOUT: %.loc9_11.4: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_11.5: %i32 = converted %.loc9_10, %.loc9_11.4 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_10: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_11.2: = bound_method %.loc9_10, %.loc9_11.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_11.3: = specific_function %.loc9_11.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_11.3(%.loc9_10) [template = constants.%.34] +// CHECK:STDOUT: %.loc9_11.4: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.34] +// CHECK:STDOUT: %.loc9_11.5: %i32 = converted %.loc9_10, %.loc9_11.4 [template = constants.%.34] // CHECK:STDOUT: return %.loc9_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -686,8 +686,8 @@ impl i32 as Empty { // CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.23: type = assoc_entity_type %I.type, %F.type [template] -// CHECK:STDOUT: %.24: %.23 = assoc_entity element1, @I.%F.decl [template] +// CHECK:STDOUT: %.27: type = assoc_entity_type %I.type, %F.type [template] +// CHECK:STDOUT: %.28: %.27 = assoc_entity element1, @I.%F.decl [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -725,7 +725,7 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13: %.23 = assoc_entity element1, %F.decl [template = constants.%.24] +// CHECK:STDOUT: %.loc13: %.27 = assoc_entity element1, %F.decl [template = constants.%.28] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self @@ -857,11 +857,11 @@ impl i32 as Empty { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: = interface_witness () [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -903,14 +903,14 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc10_14.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] // CHECK:STDOUT: %.loc10_14.3: type = converted %int.make_type_signed.loc10, %.loc10_14.2 [template = constants.%i32] // CHECK:STDOUT: %.loc10_20: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_21.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_21.2: = bound_method %.loc10_20, %.loc10_21.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_21.3: = specific_function %.loc10_21.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_21.3(%.loc10_20) [template = constants.%.25] -// CHECK:STDOUT: %.loc10_21.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc10_21.5: %i32 = converted %.loc10_20, %.loc10_21.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc10_21.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_21.2: = bound_method %.loc10_20, %.loc10_21.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc10_21.3: = specific_function %.loc10_21.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_21.3(%.loc10_20) [template = constants.%.29] +// CHECK:STDOUT: %.loc10_21.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc10_21.5: %i32 = converted %.loc10_20, %.loc10_21.4 [template = constants.%.29] // CHECK:STDOUT: %Zero: %i32 = bind_name Zero, %.loc10_21.5 -// CHECK:STDOUT: %.loc6_19: = interface_witness () [template = constants.%.26] +// CHECK:STDOUT: %.loc6_19: = interface_witness () [template = constants.%.30] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Zero = %Zero diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index 89255380254a..bed13aa7b061 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -33,17 +33,17 @@ fn F() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.26: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.27: = specific_function %.26, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.28: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.29: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.32: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.28, %.31, %.34) [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.30: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.32: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.33: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.36: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.32, %.35, %.38) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -96,27 +96,27 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_32: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %.loc12_35: Core.IntLiteral = int_value 3 [template = constants.%.5] // CHECK:STDOUT: %.loc12_36.1: %tuple.type.3 = tuple_literal (%.loc12_29, %.loc12_32, %.loc12_35) -// CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_29, %.loc12_36.2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked.loc12_36.1: init %i32 = call %.loc12_36.4(%.loc12_29) [template = constants.%.28] -// CHECK:STDOUT: %.loc12_36.5: init %i32 = converted %.loc12_29, %int.convert_checked.loc12_36.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_29, %.loc12_36.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc12_36.1: init %i32 = call %.loc12_36.4(%.loc12_29) [template = constants.%.32] +// CHECK:STDOUT: %.loc12_36.5: init %i32 = converted %.loc12_29, %int.convert_checked.loc12_36.1 [template = constants.%.32] // CHECK:STDOUT: %.loc12_36.6: ref %i32 = tuple_access %v.var, element0 -// CHECK:STDOUT: %.loc12_36.7: init %i32 = initialize_from %.loc12_36.5 to %.loc12_36.6 [template = constants.%.28] -// CHECK:STDOUT: %.loc12_36.8: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.9: = bound_method %.loc12_32, %.loc12_36.8 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_36.10: = specific_function %.loc12_36.9, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_36.2: init %i32 = call %.loc12_36.10(%.loc12_32) [template = constants.%.31] -// CHECK:STDOUT: %.loc12_36.11: init %i32 = converted %.loc12_32, %int.convert_checked.loc12_36.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_36.7: init %i32 = initialize_from %.loc12_36.5 to %.loc12_36.6 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_36.8: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_36.9: = bound_method %.loc12_32, %.loc12_36.8 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_36.10: = specific_function %.loc12_36.9, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc12_36.2: init %i32 = call %.loc12_36.10(%.loc12_32) [template = constants.%.35] +// CHECK:STDOUT: %.loc12_36.11: init %i32 = converted %.loc12_32, %int.convert_checked.loc12_36.2 [template = constants.%.35] // CHECK:STDOUT: %.loc12_36.12: ref %i32 = tuple_access %v.var, element1 -// CHECK:STDOUT: %.loc12_36.13: init %i32 = initialize_from %.loc12_36.11 to %.loc12_36.12 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_36.14: %Convert.type.2 = interface_witness_access constants.%.25, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_36.15: = bound_method %.loc12_35, %.loc12_36.14 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_36.16: = specific_function %.loc12_36.15, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12_36.3: init %i32 = call %.loc12_36.16(%.loc12_35) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_36.17: init %i32 = converted %.loc12_35, %int.convert_checked.loc12_36.3 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_36.13: init %i32 = initialize_from %.loc12_36.11 to %.loc12_36.12 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_36.14: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_36.15: = bound_method %.loc12_35, %.loc12_36.14 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_36.16: = specific_function %.loc12_36.15, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc12_36.3: init %i32 = call %.loc12_36.16(%.loc12_35) [template = constants.%.38] +// CHECK:STDOUT: %.loc12_36.17: init %i32 = converted %.loc12_35, %int.convert_checked.loc12_36.3 [template = constants.%.38] // CHECK:STDOUT: %.loc12_36.18: ref %i32 = tuple_access %v.var, element2 -// CHECK:STDOUT: %.loc12_36.19: init %i32 = initialize_from %.loc12_36.17 to %.loc12_36.18 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_36.19: init %i32 = initialize_from %.loc12_36.17 to %.loc12_36.18 [template = constants.%.38] // CHECK:STDOUT: %.loc12_36.20: init %tuple.type.2 = tuple_init (%.loc12_36.7, %.loc12_36.13, %.loc12_36.19) to %v.var [template = constants.%tuple] // CHECK:STDOUT: %.loc12_37: init %tuple.type.2 = converted %.loc12_36.1, %.loc12_36.20 [template = constants.%tuple] // CHECK:STDOUT: assign %v.var, %.loc12_37 diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 8168bf88662b..35fb9312626f 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -32,14 +32,14 @@ fn F() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,24 +67,24 @@ fn F() { // CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.4: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.5: %i32 = converted %.loc12_16, %.loc12_17.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.4: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.5: %i32 = converted %.loc12_16, %.loc12_17.4 [template = constants.%.29] // CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.5 // CHECK:STDOUT: %.loc19_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_10.1) [template = constants.%i32] // CHECK:STDOUT: %.loc19_10.2: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] // CHECK:STDOUT: %.loc19_10.3: type = converted %int.make_type_signed.loc19, %.loc19_10.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_16: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc19_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc19_17.3: = specific_function %.loc19_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_17.3(%.loc19_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc19_17.4: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%.29] -// CHECK:STDOUT: %.loc19_17.5: %i32 = converted %.loc19_16, %.loc19_17.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc19_16: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc19_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_17.2: = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc19_17.3: = specific_function %.loc19_17.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %.loc19_17.3(%.loc19_16) [template = constants.%.33] +// CHECK:STDOUT: %.loc19_17.4: %i32 = value_of_initializer %int.convert_checked.loc19 [template = constants.%.33] +// CHECK:STDOUT: %.loc19_17.5: %i32 = converted %.loc19_16, %.loc19_17.4 [template = constants.%.33] // CHECK:STDOUT: %a.loc19: %i32 = bind_name a, %.loc19_17.5 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 0fce63bb9d61..237cf2048015 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -94,10 +94,10 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -159,68 +159,68 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_25.2: = bound_method %.loc15_24, %.loc15_25.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc15_25.3: = specific_function %.loc15_25.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_25.3(%.loc15_24) [template = constants.%.25] -// CHECK:STDOUT: %.loc15_25.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.25] -// CHECK:STDOUT: %.loc15_25.5: %i32 = converted %.loc15_24, %.loc15_25.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc15_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_25.2: = bound_method %.loc15_24, %.loc15_25.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc15_25.3: = specific_function %.loc15_25.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_25.3(%.loc15_24) [template = constants.%.29] +// CHECK:STDOUT: %.loc15_25.4: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.29] +// CHECK:STDOUT: %.loc15_25.5: %i32 = converted %.loc15_24, %.loc15_25.4 [template = constants.%.29] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_25.5 // CHECK:STDOUT: %.loc21_22: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc21_23.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_23.2: = bound_method %.loc21_22, %.loc21_23.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc21_23.3: = specific_function %.loc21_23.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_23.3(%.loc21_22) [template = constants.%.25] -// CHECK:STDOUT: %.loc21_23.4: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%.25] -// CHECK:STDOUT: %.loc21_23.5: %i32 = converted %.loc21_22, %.loc21_23.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc21_23.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_23.2: = bound_method %.loc21_22, %.loc21_23.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc21_23.3: = specific_function %.loc21_23.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_23.3(%.loc21_22) [template = constants.%.29] +// CHECK:STDOUT: %.loc21_23.4: %i32 = value_of_initializer %int.convert_checked.loc21 [template = constants.%.29] +// CHECK:STDOUT: %.loc21_23.5: %i32 = converted %.loc21_22, %.loc21_23.4 [template = constants.%.29] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc21_23.5 // CHECK:STDOUT: %.loc27_20: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc27_21.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_21.2: = bound_method %.loc27_20, %.loc27_21.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc27_21.3: = specific_function %.loc27_21.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_21.3(%.loc27_20) [template = constants.%.25] -// CHECK:STDOUT: %.loc27_21.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.25] -// CHECK:STDOUT: %.loc27_21.5: %i32 = converted %.loc27_20, %.loc27_21.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc27_21.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc27_21.2: = bound_method %.loc27_20, %.loc27_21.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc27_21.3: = specific_function %.loc27_21.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_21.3(%.loc27_20) [template = constants.%.29] +// CHECK:STDOUT: %.loc27_21.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.29] +// CHECK:STDOUT: %.loc27_21.5: %i32 = converted %.loc27_20, %.loc27_21.4 [template = constants.%.29] // CHECK:STDOUT: %d: %i32 = bind_name d, %.loc27_21.5 // CHECK:STDOUT: %.loc33_22: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc33_23.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc33_23.2: = bound_method %.loc33_22, %.loc33_23.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc33_23.3: = specific_function %.loc33_23.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %.loc33_23.3(%.loc33_22) [template = constants.%.25] -// CHECK:STDOUT: %.loc33_23.4: %i32 = value_of_initializer %int.convert_checked.loc33 [template = constants.%.25] -// CHECK:STDOUT: %.loc33_23.5: %i32 = converted %.loc33_22, %.loc33_23.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc33_23.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc33_23.2: = bound_method %.loc33_22, %.loc33_23.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc33_23.3: = specific_function %.loc33_23.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %.loc33_23.3(%.loc33_22) [template = constants.%.29] +// CHECK:STDOUT: %.loc33_23.4: %i32 = value_of_initializer %int.convert_checked.loc33 [template = constants.%.29] +// CHECK:STDOUT: %.loc33_23.5: %i32 = converted %.loc33_22, %.loc33_23.4 [template = constants.%.29] // CHECK:STDOUT: %e: %i32 = bind_name e, %.loc33_23.5 // CHECK:STDOUT: %.loc46_28: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc46_29.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc46_29.2: = bound_method %.loc46_28, %.loc46_29.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc46_29.3: = specific_function %.loc46_29.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc46: init %i32 = call %.loc46_29.3(%.loc46_28) [template = constants.%.25] -// CHECK:STDOUT: %.loc46_29.4: %i32 = value_of_initializer %int.convert_checked.loc46 [template = constants.%.25] -// CHECK:STDOUT: %.loc46_29.5: %i32 = converted %.loc46_28, %.loc46_29.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc46_29.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc46_29.2: = bound_method %.loc46_28, %.loc46_29.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc46_29.3: = specific_function %.loc46_29.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc46: init %i32 = call %.loc46_29.3(%.loc46_28) [template = constants.%.29] +// CHECK:STDOUT: %.loc46_29.4: %i32 = value_of_initializer %int.convert_checked.loc46 [template = constants.%.29] +// CHECK:STDOUT: %.loc46_29.5: %i32 = converted %.loc46_28, %.loc46_29.4 [template = constants.%.29] // CHECK:STDOUT: %f: %i32 = bind_name f, %.loc46_29.5 // CHECK:STDOUT: %.loc59_30: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc59_31.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc59_31.2: = bound_method %.loc59_30, %.loc59_31.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc59_31.3: = specific_function %.loc59_31.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc59: init %i32 = call %.loc59_31.3(%.loc59_30) [template = constants.%.25] -// CHECK:STDOUT: %.loc59_31.4: %i32 = value_of_initializer %int.convert_checked.loc59 [template = constants.%.25] -// CHECK:STDOUT: %.loc59_31.5: %i32 = converted %.loc59_30, %.loc59_31.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc59_31.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc59_31.2: = bound_method %.loc59_30, %.loc59_31.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc59_31.3: = specific_function %.loc59_31.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc59: init %i32 = call %.loc59_31.3(%.loc59_30) [template = constants.%.29] +// CHECK:STDOUT: %.loc59_31.4: %i32 = value_of_initializer %int.convert_checked.loc59 [template = constants.%.29] +// CHECK:STDOUT: %.loc59_31.5: %i32 = converted %.loc59_30, %.loc59_31.4 [template = constants.%.29] // CHECK:STDOUT: %g: %i32 = bind_name g, %.loc59_31.5 // CHECK:STDOUT: %.loc72_32: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc72_33.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc72_33.2: = bound_method %.loc72_32, %.loc72_33.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc72_33.3: = specific_function %.loc72_33.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc72: init %i32 = call %.loc72_33.3(%.loc72_32) [template = constants.%.25] -// CHECK:STDOUT: %.loc72_33.4: %i32 = value_of_initializer %int.convert_checked.loc72 [template = constants.%.25] -// CHECK:STDOUT: %.loc72_33.5: %i32 = converted %.loc72_32, %.loc72_33.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc72_33.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc72_33.2: = bound_method %.loc72_32, %.loc72_33.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc72_33.3: = specific_function %.loc72_33.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc72: init %i32 = call %.loc72_33.3(%.loc72_32) [template = constants.%.29] +// CHECK:STDOUT: %.loc72_33.4: %i32 = value_of_initializer %int.convert_checked.loc72 [template = constants.%.29] +// CHECK:STDOUT: %.loc72_33.5: %i32 = converted %.loc72_32, %.loc72_33.4 [template = constants.%.29] // CHECK:STDOUT: %h: %i32 = bind_name h, %.loc72_33.5 // CHECK:STDOUT: %.loc84_34: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc84_35.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc84_35.2: = bound_method %.loc84_34, %.loc84_35.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc84_35.3: = specific_function %.loc84_35.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc84: init %i32 = call %.loc84_35.3(%.loc84_34) [template = constants.%.25] -// CHECK:STDOUT: %.loc84_35.4: %i32 = value_of_initializer %int.convert_checked.loc84 [template = constants.%.25] -// CHECK:STDOUT: %.loc84_35.5: %i32 = converted %.loc84_34, %.loc84_35.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc84_35.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc84_35.2: = bound_method %.loc84_34, %.loc84_35.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc84_35.3: = specific_function %.loc84_35.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc84: init %i32 = call %.loc84_35.3(%.loc84_34) [template = constants.%.29] +// CHECK:STDOUT: %.loc84_35.4: %i32 = value_of_initializer %int.convert_checked.loc84 [template = constants.%.29] +// CHECK:STDOUT: %.loc84_35.5: %i32 = converted %.loc84_34, %.loc84_35.4 [template = constants.%.29] // CHECK:STDOUT: %i: %i32 = bind_name i, %.loc84_35.5 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index b1941024c915..d2914d073b1f 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -23,10 +23,10 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } @@ -73,12 +73,12 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_14: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_15.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_15.2: = bound_method %.loc11_14, %.loc11_15.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_15.3: = specific_function %.loc11_15.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_15.3(%.loc11_14) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_15.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_15.5: %i32 = converted %.loc11_14, %.loc11_15.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_15.2: = bound_method %.loc11_14, %.loc11_15.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_15.3: = specific_function %.loc11_15.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_15.3(%.loc11_14) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_15.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_15.5: %i32 = converted %.loc11_14, %.loc11_15.4 [template = constants.%.29] // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc11_15.5 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 040d6817d386..1614151e73fb 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -27,10 +27,10 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -76,12 +76,12 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %int.make_type_signed.loc12 [template = constants.%i32] // CHECK:STDOUT: %.loc12_10.3: type = converted %int.make_type_signed.loc12, %.loc12_10.2 [template = constants.%i32] // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.5: %i32 = converted %.loc12_16, %.loc12_17.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.5: %i32 = converted %.loc12_16, %.loc12_17.4 [template = constants.%.29] // CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.5 // CHECK:STDOUT: %a.ref: %i32 = name_ref a, %a.loc12 // CHECK:STDOUT: return %a.ref diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 47acdf4bb272..84b4b96bbbbc 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -53,10 +53,10 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,12 +103,12 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_27: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_28.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_28.2: = bound_method %.loc4_27, %.loc4_28.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_28.3: = specific_function %.loc4_28.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_28.3(%.loc4_27) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc4_28.5: %i32 = converted %.loc4_27, %.loc4_28.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc4_28.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_28.2: = bound_method %.loc4_27, %.loc4_28.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_28.3: = specific_function %.loc4_28.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_28.3(%.loc4_27) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc4_28.5: %i32 = converted %.loc4_27, %.loc4_28.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc4_28.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index f98794d9541a..a3a5153a2d5d 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -33,10 +33,10 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %D.type: type = fn_type @D [template] @@ -108,12 +108,12 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.2: = bound_method %.loc15_27, %.loc15_28.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc15_28.3: = specific_function %.loc15_28.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_28.3(%.loc15_27) [template = constants.%.25] -// CHECK:STDOUT: %.loc15_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc15_28.5: %i32 = converted %.loc15_27, %.loc15_28.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_28.2: = bound_method %.loc15_27, %.loc15_28.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc15_28.3: = specific_function %.loc15_28.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_28.3(%.loc15_27) [template = constants.%.29] +// CHECK:STDOUT: %.loc15_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc15_28.5: %i32 = converted %.loc15_27, %.loc15_28.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc15_28.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index 546c9e6967a0..c0bd1396cbba 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -34,10 +34,10 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -75,12 +75,12 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: fn @.1() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc22_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc22_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_28.2: = bound_method %.loc22_27, %.loc22_28.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc22_28.3: = specific_function %.loc22_28.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_28.3(%.loc22_27) [template = constants.%.26] -// CHECK:STDOUT: %.loc22_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.26] -// CHECK:STDOUT: %.loc22_28.5: %i32 = converted %.loc22_27, %.loc22_28.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc22_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_28.2: = bound_method %.loc22_27, %.loc22_28.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc22_28.3: = specific_function %.loc22_28.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_28.3(%.loc22_27) [template = constants.%.30] +// CHECK:STDOUT: %.loc22_28.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.30] +// CHECK:STDOUT: %.loc22_28.5: %i32 = converted %.loc22_27, %.loc22_28.4 [template = constants.%.30] // CHECK:STDOUT: return %.loc22_28.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index d8029baef49d..9f5978df45e1 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -46,10 +46,10 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -109,11 +109,11 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %A.var: ref %i32 = var A // CHECK:STDOUT: %A: ref %i32 = bind_name A, %A.var // CHECK:STDOUT: %.loc22_18: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc22_19.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_19.2: = bound_method %.loc22_18, %.loc22_19.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc22_19.3: = specific_function %.loc22_19.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %.loc22_19.3(%.loc22_18) [template = constants.%.26] -// CHECK:STDOUT: %.loc22_19.4: init %i32 = converted %.loc22_18, %int.convert_checked.loc22 [template = constants.%.26] +// CHECK:STDOUT: %.loc22_19.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_19.2: = bound_method %.loc22_18, %.loc22_19.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc22_19.3: = specific_function %.loc22_19.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %.loc22_19.3(%.loc22_18) [template = constants.%.30] +// CHECK:STDOUT: %.loc22_19.4: init %i32 = converted %.loc22_18, %int.convert_checked.loc22 [template = constants.%.30] // CHECK:STDOUT: assign %A.var, %.loc22_19.4 // CHECK:STDOUT: %A.ref.loc25: ref %i32 = name_ref A, %A // CHECK:STDOUT: %.loc25: %i32 = bind_value %A.ref.loc25 @@ -121,12 +121,12 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %.loc27_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc27_11.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc27_11.2: = bound_method %.loc27_10, %.loc27_11.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc27_11.3: = specific_function %.loc27_11.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_11.3(%.loc27_10) [template = constants.%.26] -// CHECK:STDOUT: %.loc27_11.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.26] -// CHECK:STDOUT: %.loc27_11.5: %i32 = converted %.loc27_10, %.loc27_11.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc27_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc27_11.2: = bound_method %.loc27_10, %.loc27_11.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc27_11.3: = specific_function %.loc27_11.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %.loc27_11.3(%.loc27_10) [template = constants.%.30] +// CHECK:STDOUT: %.loc27_11.4: %i32 = value_of_initializer %int.convert_checked.loc27 [template = constants.%.30] +// CHECK:STDOUT: %.loc27_11.5: %i32 = converted %.loc27_10, %.loc27_11.4 [template = constants.%.30] // CHECK:STDOUT: return %.loc27_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index ef4e3cdb6893..a8a77251ca5d 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -39,48 +39,48 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] // CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 9 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 9 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 9 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.33: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.32, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.35, %.38) [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.14 [template] -// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.43: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.44: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.37: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.40: = bound_method %.36, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.39, %.42) [template] +// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.44: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %.45: = bound_method %.44, %Convert.14 [template] // CHECK:STDOUT: %.46: = specific_function %.45, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.47: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.48: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.50: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.48 = struct_value (%.35, %.38) [template] -// CHECK:STDOUT: %.51: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.52: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.53: = bound_method %.52, %Convert.14 [template] -// CHECK:STDOUT: %.54: = specific_function %.53, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.55: %i32 = int_value 5 [template] -// CHECK:STDOUT: %.56: bool = bool_literal true [template] -// CHECK:STDOUT: %.57: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.58: = bound_method %.57, %Convert.14 [template] -// CHECK:STDOUT: %.59: = specific_function %.58, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.60: %i32 = int_value 10 [template] +// CHECK:STDOUT: %.47: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.49: = bound_method %.48, %Convert.14 [template] +// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.51: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.52: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %.54: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %.52 = struct_value (%.39, %.42) [template] +// CHECK:STDOUT: %.55: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.56: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.57: = bound_method %.56, %Convert.14 [template] +// CHECK:STDOUT: %.58: = specific_function %.57, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.59: %i32 = int_value 5 [template] +// CHECK:STDOUT: %.60: bool = bool_literal true [template] +// CHECK:STDOUT: %.61: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %.62: = bound_method %.61, %Convert.14 [template] +// CHECK:STDOUT: %.63: = specific_function %.62, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.64: %i32 = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -110,19 +110,19 @@ fn Main() { // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 12 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_18.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_18.2: = bound_method %.loc12_16, %.loc12_18.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_18.3: = specific_function %.loc12_18.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_18.3(%.loc12_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_18.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_18.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_18.2: = bound_method %.loc12_16, %.loc12_18.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_18.3: = specific_function %.loc12_18.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_18.3(%.loc12_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_18.4: init %i32 = converted %.loc12_16, %int.convert_checked.loc12 [template = constants.%.29] // CHECK:STDOUT: assign %a.var, %.loc12_18.4 // CHECK:STDOUT: %a.ref.loc13: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc13_7: Core.IntLiteral = int_value 9 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_5.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_5.2: = bound_method %.loc13_7, %.loc13_5.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_5.3: = specific_function %.loc13_5.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_5.3(%.loc13_7) [template = constants.%.29] -// CHECK:STDOUT: %.loc13_5.4: init %i32 = converted %.loc13_7, %int.convert_checked.loc13 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_7: Core.IntLiteral = int_value 9 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_5.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_5.2: = bound_method %.loc13_7, %.loc13_5.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_5.3: = specific_function %.loc13_5.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_5.3(%.loc13_7) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_5.4: init %i32 = converted %.loc13_7, %int.convert_checked.loc13 [template = constants.%.33] // CHECK:STDOUT: assign %a.ref.loc13, %.loc13_5.4 // CHECK:STDOUT: %.loc15_11: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc15_11: init type = call constants.%Int(%.loc15_11) [template = constants.%i32] @@ -136,45 +136,45 @@ fn Main() { // CHECK:STDOUT: %.loc15_19.6: type = converted %.loc15_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var -// CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 2 [template = constants.%.32] +// CHECK:STDOUT: %.loc15_24: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 2 [template = constants.%.36] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.3 = tuple_literal (%.loc15_24, %.loc15_27) -// CHECK:STDOUT: %.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.3: = bound_method %.loc15_24, %.loc15_28.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc15_28.4: = specific_function %.loc15_28.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %.loc15_28.4(%.loc15_24) [template = constants.%.35] -// CHECK:STDOUT: %.loc15_28.5: init %i32 = converted %.loc15_24, %int.convert_checked.loc15_28.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_28.3: = bound_method %.loc15_24, %.loc15_28.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_28.4: = specific_function %.loc15_28.3, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %.loc15_28.4(%.loc15_24) [template = constants.%.39] +// CHECK:STDOUT: %.loc15_28.5: init %i32 = converted %.loc15_24, %int.convert_checked.loc15_28.1 [template = constants.%.39] // CHECK:STDOUT: %.loc15_28.6: ref %i32 = tuple_access %b.var, element0 -// CHECK:STDOUT: %.loc15_28.7: init %i32 = initialize_from %.loc15_28.5 to %.loc15_28.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_28.8: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc15_28.9: = bound_method %.loc15_27, %.loc15_28.8 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_28.10: = specific_function %.loc15_28.9, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %.loc15_28.10(%.loc15_27) [template = constants.%.38] -// CHECK:STDOUT: %.loc15_28.11: init %i32 = converted %.loc15_27, %int.convert_checked.loc15_28.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc15_28.7: init %i32 = initialize_from %.loc15_28.5 to %.loc15_28.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc15_28.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc15_28.9: = bound_method %.loc15_27, %.loc15_28.8 [template = constants.%.40] +// CHECK:STDOUT: %.loc15_28.10: = specific_function %.loc15_28.9, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %.loc15_28.10(%.loc15_27) [template = constants.%.42] +// CHECK:STDOUT: %.loc15_28.11: init %i32 = converted %.loc15_27, %int.convert_checked.loc15_28.2 [template = constants.%.42] // CHECK:STDOUT: %.loc15_28.12: ref %i32 = tuple_access %b.var, element1 -// CHECK:STDOUT: %.loc15_28.13: init %i32 = initialize_from %.loc15_28.11 to %.loc15_28.12 [template = constants.%.38] +// CHECK:STDOUT: %.loc15_28.13: init %i32 = initialize_from %.loc15_28.11 to %.loc15_28.12 [template = constants.%.42] // CHECK:STDOUT: %.loc15_28.14: init %tuple.type.2 = tuple_init (%.loc15_28.7, %.loc15_28.13) to %b.var [template = constants.%tuple] // CHECK:STDOUT: %.loc15_29: init %tuple.type.2 = converted %.loc15_28.1, %.loc15_28.14 [template = constants.%tuple] // CHECK:STDOUT: assign %b.var, %.loc15_29 // CHECK:STDOUT: %b.ref.loc16: ref %tuple.type.2 = name_ref b, %b -// CHECK:STDOUT: %.loc16_5: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %.loc16_5: Core.IntLiteral = int_value 0 [template = constants.%.43] // CHECK:STDOUT: %.loc16_4: ref %i32 = tuple_access %b.ref.loc16, element0 -// CHECK:STDOUT: %.loc16_9: Core.IntLiteral = int_value 3 [template = constants.%.40] -// CHECK:STDOUT: %.loc16_7.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_7.2: = bound_method %.loc16_9, %.loc16_7.1 [template = constants.%.41] -// CHECK:STDOUT: %.loc16_7.3: = specific_function %.loc16_7.2, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_7.3(%.loc16_9) [template = constants.%.43] -// CHECK:STDOUT: %.loc16_7.4: init %i32 = converted %.loc16_9, %int.convert_checked.loc16 [template = constants.%.43] +// CHECK:STDOUT: %.loc16_9: Core.IntLiteral = int_value 3 [template = constants.%.44] +// CHECK:STDOUT: %.loc16_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_7.2: = bound_method %.loc16_9, %.loc16_7.1 [template = constants.%.45] +// CHECK:STDOUT: %.loc16_7.3: = specific_function %.loc16_7.2, @Convert.2(constants.%.1) [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_7.3(%.loc16_9) [template = constants.%.47] +// CHECK:STDOUT: %.loc16_7.4: init %i32 = converted %.loc16_9, %int.convert_checked.loc16 [template = constants.%.47] // CHECK:STDOUT: assign %.loc16_4, %.loc16_7.4 // CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.2 = name_ref b, %b -// CHECK:STDOUT: %.loc17_5: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_5: Core.IntLiteral = int_value 1 [template = constants.%.35] // CHECK:STDOUT: %.loc17_4: ref %i32 = tuple_access %b.ref.loc17, element1 -// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 4 [template = constants.%.44] -// CHECK:STDOUT: %.loc17_7.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_7.2: = bound_method %.loc17_9, %.loc17_7.1 [template = constants.%.45] -// CHECK:STDOUT: %.loc17_7.3: = specific_function %.loc17_7.2, @Convert.2(constants.%.1) [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_7.3(%.loc17_9) [template = constants.%.47] -// CHECK:STDOUT: %.loc17_7.4: init %i32 = converted %.loc17_9, %int.convert_checked.loc17 [template = constants.%.47] +// CHECK:STDOUT: %.loc17_9: Core.IntLiteral = int_value 4 [template = constants.%.48] +// CHECK:STDOUT: %.loc17_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_7.2: = bound_method %.loc17_9, %.loc17_7.1 [template = constants.%.49] +// CHECK:STDOUT: %.loc17_7.3: = specific_function %.loc17_7.2, @Convert.2(constants.%.1) [template = constants.%.50] +// CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %.loc17_7.3(%.loc17_9) [template = constants.%.51] +// CHECK:STDOUT: %.loc17_7.4: init %i32 = converted %.loc17_9, %int.convert_checked.loc17 [template = constants.%.51] // CHECK:STDOUT: assign %.loc17_4, %.loc17_7.4 // CHECK:STDOUT: %.loc19_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc19_15: init type = call constants.%Int(%.loc19_15.1) [template = constants.%i32] @@ -184,89 +184,89 @@ fn Main() { // CHECK:STDOUT: %int.make_type_signed.loc19_24: init type = call constants.%Int(%.loc19_24.1) [template = constants.%i32] // CHECK:STDOUT: %.loc19_24.2: type = value_of_initializer %int.make_type_signed.loc19_24 [template = constants.%i32] // CHECK:STDOUT: %.loc19_24.3: type = converted %int.make_type_signed.loc19_24, %.loc19_24.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.48] -// CHECK:STDOUT: %c.var: ref %.48 = var c -// CHECK:STDOUT: %c: ref %.48 = bind_name c, %c.var -// CHECK:STDOUT: %.loc19_37: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_45: Core.IntLiteral = int_value 2 [template = constants.%.32] -// CHECK:STDOUT: %.loc19_46.1: %.50 = struct_literal (%.loc19_37, %.loc19_45) -// CHECK:STDOUT: %.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_46.3: = bound_method %.loc19_37, %.loc19_46.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc19_46.4: = specific_function %.loc19_46.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %.loc19_46.4(%.loc19_37) [template = constants.%.35] -// CHECK:STDOUT: %.loc19_46.5: init %i32 = converted %.loc19_37, %int.convert_checked.loc19_46.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_27: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.52] +// CHECK:STDOUT: %c.var: ref %.52 = var c +// CHECK:STDOUT: %c: ref %.52 = bind_name c, %c.var +// CHECK:STDOUT: %.loc19_37: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_45: Core.IntLiteral = int_value 2 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_46.1: %.54 = struct_literal (%.loc19_37, %.loc19_45) +// CHECK:STDOUT: %.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_46.3: = bound_method %.loc19_37, %.loc19_46.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc19_46.4: = specific_function %.loc19_46.3, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %.loc19_46.4(%.loc19_37) [template = constants.%.39] +// CHECK:STDOUT: %.loc19_46.5: init %i32 = converted %.loc19_37, %int.convert_checked.loc19_46.1 [template = constants.%.39] // CHECK:STDOUT: %.loc19_46.6: ref %i32 = struct_access %c.var, element0 -// CHECK:STDOUT: %.loc19_46.7: init %i32 = initialize_from %.loc19_46.5 to %.loc19_46.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_46.8: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc19_46.9: = bound_method %.loc19_45, %.loc19_46.8 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_46.10: = specific_function %.loc19_46.9, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %.loc19_46.10(%.loc19_45) [template = constants.%.38] -// CHECK:STDOUT: %.loc19_46.11: init %i32 = converted %.loc19_45, %int.convert_checked.loc19_46.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc19_46.7: init %i32 = initialize_from %.loc19_46.5 to %.loc19_46.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc19_46.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc19_46.9: = bound_method %.loc19_45, %.loc19_46.8 [template = constants.%.40] +// CHECK:STDOUT: %.loc19_46.10: = specific_function %.loc19_46.9, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %.loc19_46.10(%.loc19_45) [template = constants.%.42] +// CHECK:STDOUT: %.loc19_46.11: init %i32 = converted %.loc19_45, %int.convert_checked.loc19_46.2 [template = constants.%.42] // CHECK:STDOUT: %.loc19_46.12: ref %i32 = struct_access %c.var, element1 -// CHECK:STDOUT: %.loc19_46.13: init %i32 = initialize_from %.loc19_46.11 to %.loc19_46.12 [template = constants.%.38] -// CHECK:STDOUT: %.loc19_46.14: init %.48 = struct_init (%.loc19_46.7, %.loc19_46.13) to %c.var [template = constants.%struct] -// CHECK:STDOUT: %.loc19_47: init %.48 = converted %.loc19_46.1, %.loc19_46.14 [template = constants.%struct] +// CHECK:STDOUT: %.loc19_46.13: init %i32 = initialize_from %.loc19_46.11 to %.loc19_46.12 [template = constants.%.42] +// CHECK:STDOUT: %.loc19_46.14: init %.52 = struct_init (%.loc19_46.7, %.loc19_46.13) to %c.var [template = constants.%struct] +// CHECK:STDOUT: %.loc19_47: init %.52 = converted %.loc19_46.1, %.loc19_46.14 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc19_47 -// CHECK:STDOUT: %c.ref.loc20: ref %.48 = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc20: ref %.52 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref %i32 = struct_access %c.ref.loc20, element0 -// CHECK:STDOUT: %.loc20_9: Core.IntLiteral = int_value 3 [template = constants.%.40] -// CHECK:STDOUT: %.loc20_7.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc20_7.2: = bound_method %.loc20_9, %.loc20_7.1 [template = constants.%.41] -// CHECK:STDOUT: %.loc20_7.3: = specific_function %.loc20_7.2, @Convert.2(constants.%.1) [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %.loc20_7.3(%.loc20_9) [template = constants.%.43] -// CHECK:STDOUT: %.loc20_7.4: init %i32 = converted %.loc20_9, %int.convert_checked.loc20 [template = constants.%.43] +// CHECK:STDOUT: %.loc20_9: Core.IntLiteral = int_value 3 [template = constants.%.44] +// CHECK:STDOUT: %.loc20_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc20_7.2: = bound_method %.loc20_9, %.loc20_7.1 [template = constants.%.45] +// CHECK:STDOUT: %.loc20_7.3: = specific_function %.loc20_7.2, @Convert.2(constants.%.1) [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %.loc20_7.3(%.loc20_9) [template = constants.%.47] +// CHECK:STDOUT: %.loc20_7.4: init %i32 = converted %.loc20_9, %int.convert_checked.loc20 [template = constants.%.47] // CHECK:STDOUT: assign %.loc20_4, %.loc20_7.4 -// CHECK:STDOUT: %c.ref.loc21: ref %.48 = name_ref c, %c +// CHECK:STDOUT: %c.ref.loc21: ref %.52 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref %i32 = struct_access %c.ref.loc21, element1 -// CHECK:STDOUT: %.loc21_9: Core.IntLiteral = int_value 4 [template = constants.%.44] -// CHECK:STDOUT: %.loc21_7.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_7.2: = bound_method %.loc21_9, %.loc21_7.1 [template = constants.%.45] -// CHECK:STDOUT: %.loc21_7.3: = specific_function %.loc21_7.2, @Convert.2(constants.%.1) [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_7.3(%.loc21_9) [template = constants.%.47] -// CHECK:STDOUT: %.loc21_7.4: init %i32 = converted %.loc21_9, %int.convert_checked.loc21 [template = constants.%.47] +// CHECK:STDOUT: %.loc21_9: Core.IntLiteral = int_value 4 [template = constants.%.48] +// CHECK:STDOUT: %.loc21_7.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_7.2: = bound_method %.loc21_9, %.loc21_7.1 [template = constants.%.49] +// CHECK:STDOUT: %.loc21_7.3: = specific_function %.loc21_7.2, @Convert.2(constants.%.1) [template = constants.%.50] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_7.3(%.loc21_9) [template = constants.%.51] +// CHECK:STDOUT: %.loc21_7.4: init %i32 = converted %.loc21_9, %int.convert_checked.loc21 [template = constants.%.51] // CHECK:STDOUT: assign %.loc21_4, %.loc21_7.4 // CHECK:STDOUT: %.loc23_10: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc23: init type = call constants.%Int(%.loc23_10) [template = constants.%i32] // CHECK:STDOUT: %.loc23_13.1: type = value_of_initializer %int.make_type_signed.loc23 [template = constants.%i32] // CHECK:STDOUT: %.loc23_13.2: type = converted %int.make_type_signed.loc23, %.loc23_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_13.3: type = ptr_type %i32 [template = constants.%.51] -// CHECK:STDOUT: %p.var: ref %.51 = var p -// CHECK:STDOUT: %p: ref %.51 = bind_name p, %p.var +// CHECK:STDOUT: %.loc23_13.3: type = ptr_type %i32 [template = constants.%.55] +// CHECK:STDOUT: %p.var: ref %.55 = var p +// CHECK:STDOUT: %p: ref %.55 = bind_name p, %p.var // CHECK:STDOUT: %a.ref.loc23: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc23_17: %.51 = addr_of %a.ref.loc23 +// CHECK:STDOUT: %.loc23_17: %.55 = addr_of %a.ref.loc23 // CHECK:STDOUT: assign %p.var, %.loc23_17 -// CHECK:STDOUT: %p.ref.loc24: ref %.51 = name_ref p, %p -// CHECK:STDOUT: %.loc24_4: %.51 = bind_value %p.ref.loc24 +// CHECK:STDOUT: %p.ref.loc24: ref %.55 = name_ref p, %p +// CHECK:STDOUT: %.loc24_4: %.55 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref %i32 = deref %.loc24_4 -// CHECK:STDOUT: %.loc24_8: Core.IntLiteral = int_value 5 [template = constants.%.52] -// CHECK:STDOUT: %.loc24_6.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc24_6.2: = bound_method %.loc24_8, %.loc24_6.1 [template = constants.%.53] -// CHECK:STDOUT: %.loc24_6.3: = specific_function %.loc24_6.2, @Convert.2(constants.%.1) [template = constants.%.54] -// CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %.loc24_6.3(%.loc24_8) [template = constants.%.55] -// CHECK:STDOUT: %.loc24_6.4: init %i32 = converted %.loc24_8, %int.convert_checked.loc24 [template = constants.%.55] +// CHECK:STDOUT: %.loc24_8: Core.IntLiteral = int_value 5 [template = constants.%.56] +// CHECK:STDOUT: %.loc24_6.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc24_6.2: = bound_method %.loc24_8, %.loc24_6.1 [template = constants.%.57] +// CHECK:STDOUT: %.loc24_6.3: = specific_function %.loc24_6.2, @Convert.2(constants.%.1) [template = constants.%.58] +// CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %.loc24_6.3(%.loc24_8) [template = constants.%.59] +// CHECK:STDOUT: %.loc24_6.4: init %i32 = converted %.loc24_8, %int.convert_checked.loc24 [template = constants.%.59] // CHECK:STDOUT: assign %.loc24_3, %.loc24_6.4 -// CHECK:STDOUT: %.loc26_8: bool = bool_literal true [template = constants.%.56] +// CHECK:STDOUT: %.loc26_8: bool = bool_literal true [template = constants.%.60] // CHECK:STDOUT: if %.loc26_8 br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %p.ref.loc26: ref %.51 = name_ref p, %p -// CHECK:STDOUT: %.loc26_18: %.51 = bind_value %p.ref.loc26 +// CHECK:STDOUT: %p.ref.loc26: ref %.55 = name_ref p, %p +// CHECK:STDOUT: %.loc26_18: %.55 = bind_value %p.ref.loc26 // CHECK:STDOUT: br !if.expr.result(%.loc26_18) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %a.ref.loc26: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc26_25: %.51 = addr_of %a.ref.loc26 +// CHECK:STDOUT: %.loc26_25: %.55 = addr_of %a.ref.loc26 // CHECK:STDOUT: br !if.expr.result(%.loc26_25) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_5: %.51 = block_arg !if.expr.result +// CHECK:STDOUT: %.loc26_5: %.55 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref %i32 = deref %.loc26_5 -// CHECK:STDOUT: %.loc26_31: Core.IntLiteral = int_value 10 [template = constants.%.57] -// CHECK:STDOUT: %.loc26_29.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_29.2: = bound_method %.loc26_31, %.loc26_29.1 [template = constants.%.58] -// CHECK:STDOUT: %.loc26_29.3: = specific_function %.loc26_29.2, @Convert.2(constants.%.1) [template = constants.%.59] -// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_29.3(%.loc26_31) [template = constants.%.60] -// CHECK:STDOUT: %.loc26_29.4: init %i32 = converted %.loc26_31, %int.convert_checked.loc26 [template = constants.%.60] +// CHECK:STDOUT: %.loc26_31: Core.IntLiteral = int_value 10 [template = constants.%.61] +// CHECK:STDOUT: %.loc26_29.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_29.2: = bound_method %.loc26_31, %.loc26_29.1 [template = constants.%.62] +// CHECK:STDOUT: %.loc26_29.3: = specific_function %.loc26_29.2, @Convert.2(constants.%.1) [template = constants.%.63] +// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_29.3(%.loc26_31) [template = constants.%.64] +// CHECK:STDOUT: %.loc26_29.4: init %i32 = converted %.loc26_31, %int.convert_checked.loc26 [template = constants.%.64] // CHECK:STDOUT: assign %.loc26_3, %.loc26_29.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index e6b1a4f475cb..b74782c1f00d 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -72,36 +72,36 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%.27, %.28) [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%.31, %.32) [template] // CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%.2, %.3) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %.35: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.14 [template] // CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple.3: %tuple.type.2 = tuple_value (%.26, %.37) [template] -// CHECK:STDOUT: %.38: type = ptr_type %i32 [template] -// CHECK:STDOUT: %.39: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct.1: %.39 = struct_value (%.27, %.28) [template] -// CHECK:STDOUT: %struct.2: %.39 = struct_value (%.2, %.3) [template] -// CHECK:STDOUT: %.41: bool = bool_literal true [template] -// CHECK:STDOUT: %.42: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.14 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] +// CHECK:STDOUT: %.39: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple.3: %tuple.type.2 = tuple_value (%.30, %.41) [template] +// CHECK:STDOUT: %.42: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.43: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct.1: %.43 = struct_value (%.31, %.32) [template] +// CHECK:STDOUT: %struct.2: %.43 = struct_value (%.2, %.3) [template] +// CHECK:STDOUT: %.45: bool = bool_literal true [template] +// CHECK:STDOUT: %.46: = bound_method %.31, %Convert.14 [template] // CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.48: %i32 = int_value 10 [template] +// CHECK:STDOUT: %.48: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.49: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %.50: = bound_method %.49, %Convert.14 [template] +// CHECK:STDOUT: %.51: = specific_function %.50, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.52: %i32 = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -144,22 +144,22 @@ fn Main() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %i32 = call %F.ref() // CHECK:STDOUT: %.loc23_9: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc23_7.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_7.2: = bound_method %.loc23_9, %.loc23_7.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc23_7.3: = specific_function %.loc23_7.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_7.3(%.loc23_9) [template = constants.%.26] -// CHECK:STDOUT: %.loc23_7.4: init %i32 = converted %.loc23_9, %int.convert_checked.loc23 [template = constants.%.26] +// CHECK:STDOUT: %.loc23_7.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc23_7.2: = bound_method %.loc23_9, %.loc23_7.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc23_7.3: = specific_function %.loc23_7.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_7.3(%.loc23_9) [template = constants.%.30] +// CHECK:STDOUT: %.loc23_7.4: init %i32 = converted %.loc23_9, %int.convert_checked.loc23 [template = constants.%.30] // CHECK:STDOUT: assign %F.call, %.loc23_7.4 // CHECK:STDOUT: %.loc28_4: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc28_7: Core.IntLiteral = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc28_8.1: %tuple.type.1 = tuple_literal (%.loc28_4, %.loc28_7) -// CHECK:STDOUT: %.loc28_13: Core.IntLiteral = int_value 3 [template = constants.%.27] -// CHECK:STDOUT: %.loc28_16: Core.IntLiteral = int_value 4 [template = constants.%.28] +// CHECK:STDOUT: %.loc28_13: Core.IntLiteral = int_value 3 [template = constants.%.31] +// CHECK:STDOUT: %.loc28_16: Core.IntLiteral = int_value 4 [template = constants.%.32] // CHECK:STDOUT: %.loc28_17.1: %tuple.type.1 = tuple_literal (%.loc28_13, %.loc28_16) // CHECK:STDOUT: %.loc28_17.2: Core.IntLiteral = tuple_access %.loc28_8.1, element0 -// CHECK:STDOUT: %.loc28_17.3: init Core.IntLiteral = initialize_from %.loc28_13 to %.loc28_17.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc28_17.3: init Core.IntLiteral = initialize_from %.loc28_13 to %.loc28_17.2 [template = constants.%.31] // CHECK:STDOUT: %.loc28_17.4: Core.IntLiteral = tuple_access %.loc28_8.1, element1 -// CHECK:STDOUT: %.loc28_17.5: init Core.IntLiteral = initialize_from %.loc28_16 to %.loc28_17.4 [template = constants.%.28] +// CHECK:STDOUT: %.loc28_17.5: init Core.IntLiteral = initialize_from %.loc28_16 to %.loc28_17.4 [template = constants.%.32] // CHECK:STDOUT: %.loc28_17.6: init %tuple.type.1 = tuple_init (%.loc28_17.3, %.loc28_17.5) to %.loc28_8.1 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc28_10: init %tuple.type.1 = converted %.loc28_17.1, %.loc28_17.6 [template = constants.%tuple.1] // CHECK:STDOUT: assign %.loc28_8.1, %.loc28_10 @@ -171,12 +171,12 @@ fn Main() { // CHECK:STDOUT: %.loc29_10.3: type = converted %int.make_type_signed.loc29, %.loc29_10.2 [template = constants.%i32] // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var -// CHECK:STDOUT: %.loc29_16: Core.IntLiteral = int_value 0 [template = constants.%.30] -// CHECK:STDOUT: %.loc29_17.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc29_17.2: = bound_method %.loc29_16, %.loc29_17.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc29_17.3: = specific_function %.loc29_17.2, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_17.3(%.loc29_16) [template = constants.%.33] -// CHECK:STDOUT: %.loc29_17.4: init %i32 = converted %.loc29_16, %int.convert_checked.loc29 [template = constants.%.33] +// CHECK:STDOUT: %.loc29_16: Core.IntLiteral = int_value 0 [template = constants.%.34] +// CHECK:STDOUT: %.loc29_17.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc29_17.2: = bound_method %.loc29_16, %.loc29_17.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc29_17.3: = specific_function %.loc29_17.2, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %.loc29_17.3(%.loc29_16) [template = constants.%.37] +// CHECK:STDOUT: %.loc29_17.4: init %i32 = converted %.loc29_16, %int.convert_checked.loc29 [template = constants.%.37] // CHECK:STDOUT: assign %n.var, %.loc29_17.4 // CHECK:STDOUT: %n.ref.loc34_4: ref %i32 = name_ref n, %n // CHECK:STDOUT: %n.ref.loc34_7: ref %i32 = name_ref n, %n @@ -184,20 +184,20 @@ fn Main() { // CHECK:STDOUT: %.loc34_13: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc34_16: Core.IntLiteral = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc34_17.1: %tuple.type.1 = tuple_literal (%.loc34_13, %.loc34_16) -// CHECK:STDOUT: %.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_17.3: = bound_method %.loc34_13, %.loc34_17.2 [template = constants.%.24] -// CHECK:STDOUT: %.loc34_17.4: = specific_function %.loc34_17.3, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %.loc34_17.4(%.loc34_13) [template = constants.%.26] -// CHECK:STDOUT: %.loc34_17.5: init %i32 = converted %.loc34_13, %int.convert_checked.loc34_17.1 [template = constants.%.26] +// CHECK:STDOUT: %.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc34_17.3: = bound_method %.loc34_13, %.loc34_17.2 [template = constants.%.28] +// CHECK:STDOUT: %.loc34_17.4: = specific_function %.loc34_17.3, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %.loc34_17.4(%.loc34_13) [template = constants.%.30] +// CHECK:STDOUT: %.loc34_17.5: init %i32 = converted %.loc34_13, %int.convert_checked.loc34_17.1 [template = constants.%.30] // CHECK:STDOUT: %.loc34_17.6: %i32 = tuple_access %.loc34_8.1, element0 -// CHECK:STDOUT: %.loc34_17.7: init %i32 = initialize_from %.loc34_17.5 to %.loc34_17.6 [template = constants.%.26] -// CHECK:STDOUT: %.loc34_17.8: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc34_17.9: = bound_method %.loc34_16, %.loc34_17.8 [template = constants.%.35] -// CHECK:STDOUT: %.loc34_17.10: = specific_function %.loc34_17.9, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %.loc34_17.10(%.loc34_16) [template = constants.%.37] -// CHECK:STDOUT: %.loc34_17.11: init %i32 = converted %.loc34_16, %int.convert_checked.loc34_17.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc34_17.7: init %i32 = initialize_from %.loc34_17.5 to %.loc34_17.6 [template = constants.%.30] +// CHECK:STDOUT: %.loc34_17.8: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc34_17.9: = bound_method %.loc34_16, %.loc34_17.8 [template = constants.%.39] +// CHECK:STDOUT: %.loc34_17.10: = specific_function %.loc34_17.9, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %.loc34_17.10(%.loc34_16) [template = constants.%.41] +// CHECK:STDOUT: %.loc34_17.11: init %i32 = converted %.loc34_16, %int.convert_checked.loc34_17.2 [template = constants.%.41] // CHECK:STDOUT: %.loc34_17.12: %i32 = tuple_access %.loc34_8.1, element1 -// CHECK:STDOUT: %.loc34_17.13: init %i32 = initialize_from %.loc34_17.11 to %.loc34_17.12 [template = constants.%.37] +// CHECK:STDOUT: %.loc34_17.13: init %i32 = initialize_from %.loc34_17.11 to %.loc34_17.12 [template = constants.%.41] // CHECK:STDOUT: %.loc34_17.14: init %tuple.type.2 = tuple_init (%.loc34_17.7, %.loc34_17.13) to %.loc34_8.1 [template = constants.%tuple.3] // CHECK:STDOUT: %.loc34_10: init %tuple.type.2 = converted %.loc34_17.1, %.loc34_17.14 [template = constants.%tuple.3] // CHECK:STDOUT: assign %.loc34_8.1, %.loc34_10 @@ -211,54 +211,54 @@ fn Main() { // CHECK:STDOUT: %int.make_type_signed.loc39_9: init type = call constants.%Int(%.loc39_9) [template = constants.%i32] // CHECK:STDOUT: %.loc39_12.1: type = value_of_initializer %int.make_type_signed.loc39_9 [template = constants.%i32] // CHECK:STDOUT: %.loc39_12.2: type = converted %int.make_type_signed.loc39_9, %.loc39_12.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc39_12.3: type = ptr_type %i32 [template = constants.%.38] +// CHECK:STDOUT: %.loc39_12.3: type = ptr_type %i32 [template = constants.%.42] // CHECK:STDOUT: assign %int.make_type_signed.loc39_3, %.loc39_12.3 // CHECK:STDOUT: %.loc44_9: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc44_17: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc44_18.1: %.39 = struct_literal (%.loc44_9, %.loc44_17) -// CHECK:STDOUT: %.loc44_28: Core.IntLiteral = int_value 3 [template = constants.%.27] -// CHECK:STDOUT: %.loc44_36: Core.IntLiteral = int_value 4 [template = constants.%.28] -// CHECK:STDOUT: %.loc44_37.1: %.39 = struct_literal (%.loc44_28, %.loc44_36) +// CHECK:STDOUT: %.loc44_18.1: %.43 = struct_literal (%.loc44_9, %.loc44_17) +// CHECK:STDOUT: %.loc44_28: Core.IntLiteral = int_value 3 [template = constants.%.31] +// CHECK:STDOUT: %.loc44_36: Core.IntLiteral = int_value 4 [template = constants.%.32] +// CHECK:STDOUT: %.loc44_37.1: %.43 = struct_literal (%.loc44_28, %.loc44_36) // CHECK:STDOUT: %.loc44_37.2: Core.IntLiteral = struct_access %.loc44_18.1, element0 -// CHECK:STDOUT: %.loc44_37.3: init Core.IntLiteral = initialize_from %.loc44_28 to %.loc44_37.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc44_37.3: init Core.IntLiteral = initialize_from %.loc44_28 to %.loc44_37.2 [template = constants.%.31] // CHECK:STDOUT: %.loc44_37.4: Core.IntLiteral = struct_access %.loc44_18.1, element1 -// CHECK:STDOUT: %.loc44_37.5: init Core.IntLiteral = initialize_from %.loc44_36 to %.loc44_37.4 [template = constants.%.28] -// CHECK:STDOUT: %.loc44_37.6: init %.39 = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] -// CHECK:STDOUT: %.loc44_20: init %.39 = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_37.5: init Core.IntLiteral = initialize_from %.loc44_36 to %.loc44_37.4 [template = constants.%.32] +// CHECK:STDOUT: %.loc44_37.6: init %.43 = struct_init (%.loc44_37.3, %.loc44_37.5) to %.loc44_18.1 [template = constants.%struct.1] +// CHECK:STDOUT: %.loc44_20: init %.43 = converted %.loc44_37.1, %.loc44_37.6 [template = constants.%struct.1] // CHECK:STDOUT: assign %.loc44_18.1, %.loc44_20 -// CHECK:STDOUT: %struct: %.39 = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] -// CHECK:STDOUT: %.loc44_18.2: %.39 = converted %.loc44_18.1, %struct [template = constants.%struct.2] -// CHECK:STDOUT: %.loc49_7: bool = bool_literal true [template = constants.%.41] +// CHECK:STDOUT: %struct: %.43 = struct_value (%.loc44_9, %.loc44_17) [template = constants.%struct.2] +// CHECK:STDOUT: %.loc44_18.2: %.43 = converted %.loc44_18.1, %struct [template = constants.%struct.2] +// CHECK:STDOUT: %.loc49_7: bool = bool_literal true [template = constants.%.45] // CHECK:STDOUT: if %.loc49_7 br !if.expr.then.loc49 else br !if.expr.else.loc49 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc49: // CHECK:STDOUT: %.loc49_17: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc49_12.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc49_12.2: = bound_method %.loc49_17, %.loc49_12.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc49_12.3: = specific_function %.loc49_12.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %.loc49_12.3(%.loc49_17) [template = constants.%.26] -// CHECK:STDOUT: %.loc49_12.4: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%.26] -// CHECK:STDOUT: %.loc49_12.5: %i32 = converted %.loc49_17, %.loc49_12.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc49_12.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc49_12.2: = bound_method %.loc49_17, %.loc49_12.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc49_12.3: = specific_function %.loc49_12.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %.loc49_12.3(%.loc49_17) [template = constants.%.30] +// CHECK:STDOUT: %.loc49_12.4: %i32 = value_of_initializer %int.convert_checked.loc49_12 [template = constants.%.30] +// CHECK:STDOUT: %.loc49_12.5: %i32 = converted %.loc49_17, %.loc49_12.4 [template = constants.%.30] // CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_12.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc49: // CHECK:STDOUT: %.loc49_24: Core.IntLiteral = int_value 2 [template = constants.%.3] -// CHECK:STDOUT: %.loc49_19.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc49_19.2: = bound_method %.loc49_24, %.loc49_19.1 [template = constants.%.35] -// CHECK:STDOUT: %.loc49_19.3: = specific_function %.loc49_19.2, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %.loc49_19.3(%.loc49_24) [template = constants.%.37] -// CHECK:STDOUT: %.loc49_19.4: %i32 = value_of_initializer %int.convert_checked.loc49_19 [template = constants.%.37] -// CHECK:STDOUT: %.loc49_19.5: %i32 = converted %.loc49_24, %.loc49_19.4 [template = constants.%.37] +// CHECK:STDOUT: %.loc49_19.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc49_19.2: = bound_method %.loc49_24, %.loc49_19.1 [template = constants.%.39] +// CHECK:STDOUT: %.loc49_19.3: = specific_function %.loc49_19.2, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %.loc49_19.3(%.loc49_24) [template = constants.%.41] +// CHECK:STDOUT: %.loc49_19.4: %i32 = value_of_initializer %int.convert_checked.loc49_19 [template = constants.%.41] +// CHECK:STDOUT: %.loc49_19.5: %i32 = converted %.loc49_24, %.loc49_19.4 [template = constants.%.41] // CHECK:STDOUT: br !if.expr.result.loc49(%.loc49_19.5) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc49: -// CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%.26] -// CHECK:STDOUT: %.loc49_29: Core.IntLiteral = int_value 3 [template = constants.%.27] -// CHECK:STDOUT: %.loc49_27.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc49_27.2: = bound_method %.loc49_29, %.loc49_27.1 [template = constants.%.42] -// CHECK:STDOUT: %.loc49_27.3: = specific_function %.loc49_27.2, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %.loc49_27.3(%.loc49_29) [template = constants.%.44] -// CHECK:STDOUT: %.loc49_27.4: init %i32 = converted %.loc49_29, %int.convert_checked.loc49_27 [template = constants.%.44] +// CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%.30] +// CHECK:STDOUT: %.loc49_29: Core.IntLiteral = int_value 3 [template = constants.%.31] +// CHECK:STDOUT: %.loc49_27.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc49_27.2: = bound_method %.loc49_29, %.loc49_27.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc49_27.3: = specific_function %.loc49_27.2, @Convert.2(constants.%.1) [template = constants.%.47] +// CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %.loc49_27.3(%.loc49_29) [template = constants.%.48] +// CHECK:STDOUT: %.loc49_27.4: init %i32 = converted %.loc49_29, %int.convert_checked.loc49_27 [template = constants.%.48] // CHECK:STDOUT: assign %.loc49_4, %.loc49_27.4 // CHECK:STDOUT: %.loc52_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc52: init type = call constants.%Int(%.loc52_10.1) [template = constants.%i32] @@ -266,7 +266,7 @@ fn Main() { // CHECK:STDOUT: %.loc52_10.3: type = converted %int.make_type_signed.loc52, %.loc52_10.2 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc56_7: bool = bool_literal true [template = constants.%.41] +// CHECK:STDOUT: %.loc56_7: bool = bool_literal true [template = constants.%.45] // CHECK:STDOUT: if %.loc56_7 br !if.expr.then.loc56 else br !if.expr.else.loc56 // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then.loc56: @@ -281,12 +281,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.result.loc56: // CHECK:STDOUT: %.loc56_4: %i32 = block_arg !if.expr.result.loc56 -// CHECK:STDOUT: %.loc56_29: Core.IntLiteral = int_value 10 [template = constants.%.45] -// CHECK:STDOUT: %.loc56_27.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc56_27.2: = bound_method %.loc56_29, %.loc56_27.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc56_27.3: = specific_function %.loc56_27.2, @Convert.2(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc56: init %i32 = call %.loc56_27.3(%.loc56_29) [template = constants.%.48] -// CHECK:STDOUT: %.loc56_27.4: init %i32 = converted %.loc56_29, %int.convert_checked.loc56 [template = constants.%.48] +// CHECK:STDOUT: %.loc56_29: Core.IntLiteral = int_value 10 [template = constants.%.49] +// CHECK:STDOUT: %.loc56_27.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc56_27.2: = bound_method %.loc56_29, %.loc56_27.1 [template = constants.%.50] +// CHECK:STDOUT: %.loc56_27.3: = specific_function %.loc56_27.2, @Convert.2(constants.%.1) [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked.loc56: init %i32 = call %.loc56_27.3(%.loc56_29) [template = constants.%.52] +// CHECK:STDOUT: %.loc56_27.4: init %i32 = converted %.loc56_29, %int.convert_checked.loc56 [template = constants.%.52] // CHECK:STDOUT: assign %.loc56_4, %.loc56_27.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 5cbf6c890ca3..49e040638940 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -36,16 +36,16 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,12 +81,12 @@ fn Main() { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_25.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_25.2: = bound_method %.loc11_24, %.loc11_25.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_25.3: = specific_function %.loc11_25.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_25.3(%.loc11_24) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_25.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_25.5: %i32 = converted %.loc11_24, %.loc11_25.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc11_25.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -98,12 +98,12 @@ fn Main() { // CHECK:STDOUT: %.loc14_10.3: type = converted %int.make_type_signed, %.loc14_10.2 [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%.26] -// CHECK:STDOUT: %.loc14_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_17.2: = bound_method %.loc14_16, %.loc14_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_17.3: = specific_function %.loc14_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_17.3(%.loc14_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_17.4: init %i32 = converted %.loc14_16, %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_17.2: = bound_method %.loc14_16, %.loc14_17.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_17.3: = specific_function %.loc14_17.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_17.3(%.loc14_16) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_17.4: init %i32 = converted %.loc14_16, %int.convert_checked [template = constants.%.33] // CHECK:STDOUT: assign %a.var, %.loc14_17.4 // CHECK:STDOUT: %a.ref.loc19_3: ref %i32 = name_ref a, %a // CHECK:STDOUT: %a.ref.loc19_7: ref %i32 = name_ref a, %a diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index c1638f315777..0aa5a7f1a9b9 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -32,11 +32,11 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.26: f64 = float_literal 5.6000000000000005 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.30: f64 = float_literal 5.6000000000000005 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -66,14 +66,14 @@ fn Main() { // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 3 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %a.var, %.loc12_17.4 // CHECK:STDOUT: %a.ref: ref %i32 = name_ref a, %a -// CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.26] +// CHECK:STDOUT: %.loc19_7: f64 = float_literal 5.6000000000000005 [template = constants.%.30] // CHECK:STDOUT: %.loc19_5: %i32 = converted %.loc19_7, [template = ] // CHECK:STDOUT: assign %a.ref, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index cdcc44ab90d5..3de7f2fd0b20 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -64,7 +64,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+36, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index a32aa799e52d..f8626527e3c5 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %BitAndAssign.type: type = facet_type <@BitAndAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+27, loaded [template = constants.%BitAnd.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+59, loaded [template = constants.%BitAndAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+29, loaded [template = constants.%BitAnd.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+63, loaded [template = constants.%BitAndAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitAndAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index b0c44fe0b8cc..823cff0861e1 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -34,7 +34,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] @@ -91,7 +91,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -116,7 +116,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23_17.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23_17.2 diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index 2c83140a6eca..22dfb0787700 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %BitOrAssign.type: type = facet_type <@BitOrAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+88, loaded [template = constants.%BitOr.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+120, loaded [template = constants.%BitOrAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+94, loaded [template = constants.%BitOr.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+128, loaded [template = constants.%BitOrAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitOrAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index f5258921fd78..d2e1933c5aed 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %BitXorAssign.type: type = facet_type <@BitXorAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+149, loaded [template = constants.%BitXor.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+181, loaded [template = constants.%BitXorAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+159, loaded [template = constants.%BitXor.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+193, loaded [template = constants.%BitXorAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %BitXorAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 4e842fa8030f..31c9028497a0 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -35,7 +35,7 @@ fn TestOp() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] @@ -47,7 +47,7 @@ fn TestOp() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+171, loaded [template = constants.%Dec.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+183, loaded [template = constants.%Dec.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,7 +77,7 @@ fn TestOp() { // CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -103,7 +103,7 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 // CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc23_3.2(%.loc23_5) diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index 2b7acc75a2f4..13fee7181db8 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %DivAssign.type: type = facet_type <@DivAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+254, loaded [template = constants.%Div.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+286, loaded [template = constants.%DivAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+272, loaded [template = constants.%Div.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+306, loaded [template = constants.%DivAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %DivAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index d6ac45944b25..8059f5d719e3 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -97,7 +97,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] // CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestEqual.type: type = fn_type @TestEqual [template] // CHECK:STDOUT: %TestEqual: %TestEqual.type = struct_value () [template] // CHECK:STDOUT: %TestNotEqual.type: type = fn_type @TestNotEqual [template] @@ -211,7 +211,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -234,7 +234,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %.loc12_12.1: %Equal.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc12_12.2: = bound_method %a.ref, %.loc12_12.1 // CHECK:STDOUT: %Equal.call: init bool = call %.loc12_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc12_16.1: bool = value_of_initializer %Equal.call @@ -246,7 +246,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.3, element1 [template = constants.%NotEqual.1] +// CHECK:STDOUT: %.loc16_12.1: %NotEqual.type.2 = interface_witness_access constants.%.5, element1 [template = constants.%NotEqual.1] // CHECK:STDOUT: %.loc16_12.2: = bound_method %a.ref, %.loc16_12.1 // CHECK:STDOUT: %NotEqual.call: init bool = call %.loc16_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc16_16.1: bool = value_of_initializer %NotEqual.call @@ -364,7 +364,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] // CHECK:STDOUT: %NotEqual.1: %NotEqual.type.1 = struct_value () [template] // CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Equal.1, %NotEqual.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Equal.1, %NotEqual.1) [template] // CHECK:STDOUT: %TestRhsBad.type: type = fn_type @TestRhsBad [template] // CHECK:STDOUT: %TestRhsBad: %TestRhsBad.type = struct_value () [template] // CHECK:STDOUT: %TestLhsBad.type: type = fn_type @TestLhsBad [template] @@ -481,7 +481,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc7: = interface_witness (%Equal.decl, %NotEqual.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Equal = %Equal.decl @@ -511,7 +511,7 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Equal.1] +// CHECK:STDOUT: %.loc23_12.1: %Equal.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Equal.1] // CHECK:STDOUT: %.loc23_12.2: = bound_method %a.ref, %.loc23_12.1 // CHECK:STDOUT: %.loc23_15: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %Equal.call: init bool = call %.loc23_12.2(%a.ref, ) diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index dcddfb6d2264..228798c0c158 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -52,12 +52,12 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestIncNonRef.type: type = fn_type @TestIncNonRef [template] // CHECK:STDOUT: %TestIncNonRef: %TestIncNonRef.type = struct_value () [template] // CHECK:STDOUT: %TestAddAssignNonRef.type: type = fn_type @TestAddAssignNonRef [template] @@ -71,8 +71,8 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+63, loaded [template = constants.%Inc.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+67, loaded [template = constants.%Inc.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+36, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -128,7 +128,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc15: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -151,7 +151,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc18: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -172,7 +172,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: fn @TestIncNonRef(%a.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc30_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc30_3.2: = bound_method %a.ref, %.loc30_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc30_3.2() // CHECK:STDOUT: return @@ -182,7 +182,7 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc40_5.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc40_5.2: = bound_method %a.ref, %.loc40_5.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc40_5.2(, %b.ref) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 176da59d7ba0..0ef223d0c9df 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -60,13 +60,13 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %AddAssign.type: type = facet_type <@AddAssign> [template] -// CHECK:STDOUT: %.4: type = ptr_type %C [template] +// CHECK:STDOUT: %.6: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.6: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.10: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -83,7 +83,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+1, loaded [template = constants.%Add.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+34, loaded [template = constants.%AddAssign.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+36, loaded [template = constants.%AddAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -154,7 +154,7 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc16: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -163,21 +163,21 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %AddAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.4 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.4 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.6 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.6 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc20_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.4] +// CHECK:STDOUT: %.loc20_21: type = ptr_type %C [template = constants.%.6] // CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.4 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.4 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.6 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.6 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc19: = interface_witness (%Op.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -200,13 +200,13 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Op.1[%self.param_patt: %C](%other.param_patt: %C) -> %C; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.4](%other.param_patt: %C); +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.6](%other.param_patt: %C); // CHECK:STDOUT: // CHECK:STDOUT: fn @Test(%a.param_patt: %C, %b.param_patt: %D) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc34_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc34_12.2: = bound_method %a.ref, %.loc34_12.1 // CHECK:STDOUT: %.loc23_21.2: ref %C = splice_block %return {} // CHECK:STDOUT: %.loc34_14: %C = converted %b.ref, [template = ] @@ -225,9 +225,9 @@ fn TestAssign(b: D) { // CHECK:STDOUT: assign %a.var, %.loc38_16 // CHECK:STDOUT: %a.ref: ref %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %D = name_ref b, %b -// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.6, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc48_5.1: %Op.type.4 = interface_witness_access constants.%.10, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc48_5.2: = bound_method %a.ref, %.loc48_5.1 -// CHECK:STDOUT: %.loc48_3: %.4 = addr_of %a.ref +// CHECK:STDOUT: %.loc48_3: %.6 = addr_of %a.ref // CHECK:STDOUT: %.loc48_8: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc48_5.2(%.loc48_3, ) // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index aa5d6a37bd9a..f3545ae95960 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -49,12 +49,12 @@ fn Test() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%X) [template] -// CHECK:STDOUT: %.9: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.12: = interface_witness (%Convert.2) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.4) [template] // CHECK:STDOUT: %Sink_i32.type: type = fn_type @Sink_i32 [template] // CHECK:STDOUT: %Sink_i32: %Sink_i32.type = struct_value () [template] // CHECK:STDOUT: %Sink_X.type: type = fn_type @Sink_X [template] @@ -63,11 +63,11 @@ fn Test() { // CHECK:STDOUT: %T.patt: type = symbolic_binding_pattern T, 0 [symbolic] // CHECK:STDOUT: %Source.type: type = fn_type @Source [template] // CHECK:STDOUT: %Source: %Source.type = struct_value () [template] -// CHECK:STDOUT: %.14: = specific_function %Source, @Source(%T) [symbolic] +// CHECK:STDOUT: %.18: = specific_function %Source, @Source(%T) [symbolic] // CHECK:STDOUT: %Test.type: type = fn_type @Test [template] // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] -// CHECK:STDOUT: %.15: = specific_function %Source, @Source(%X) [template] -// CHECK:STDOUT: %.31: = specific_function %Source, @Source(%i32) [template] +// CHECK:STDOUT: %.19: = specific_function %Source, @Source(%X) [template] +// CHECK:STDOUT: %.37: = specific_function %Source, @Source(%i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -77,7 +77,7 @@ fn Test() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+54, loaded [template = constants.%ImplicitAs] +// CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+56, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -162,7 +162,7 @@ fn Test() { // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.9] +// CHECK:STDOUT: %.loc15_32: = interface_witness (%Convert.decl) [template = constants.%.12] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -186,7 +186,7 @@ fn Test() { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.13] +// CHECK:STDOUT: %.loc19_32: = interface_witness (%Convert.decl) [template = constants.%.17] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -235,13 +235,13 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc27_11.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %.loc27_35.2 (constants.%.14)] +// CHECK:STDOUT: %.loc27_35.2: = specific_function constants.%Source, @Source(%T.loc27_11.2) [symbolic = %.loc27_35.2 (constants.%.18)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) -> @Source.%T.loc27_11.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Source.ref: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %T.ref.loc27_42: type = name_ref T, %T.loc27_11.1 [symbolic = %T.loc27_11.2 (constants.%T)] -// CHECK:STDOUT: %.loc27_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %.loc27_35.2 (constants.%.14)] +// CHECK:STDOUT: %.loc27_35.1: = specific_function %Source.ref, @Source(constants.%T) [symbolic = %.loc27_35.2 (constants.%.18)] // CHECK:STDOUT: %Source.call: init @Source.%T.loc27_11.2 (%T) = call %.loc27_35.1() // CHECK:STDOUT: %.loc27_44.1: @Source.%T.loc27_11.2 (%T) = value_of_initializer %Source.call // CHECK:STDOUT: %.loc27_44.2: @Source.%T.loc27_11.2 (%T) = converted %Source.call, %.loc27_44.1 @@ -254,10 +254,10 @@ fn Test() { // CHECK:STDOUT: %Sink_i32.ref: %Sink_i32.type = name_ref Sink_i32, file.%Sink_i32.decl [template = constants.%Sink_i32] // CHECK:STDOUT: %Source.ref.loc30: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc30_12: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%.15] +// CHECK:STDOUT: %.loc30_12: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%.19] // CHECK:STDOUT: %.loc30_18.1: ref %X = temporary_storage // CHECK:STDOUT: %Source.call.loc30: init %X = call %.loc30_12() to %.loc30_18.1 -// CHECK:STDOUT: %.loc30_18.2: %Convert.type.5 = interface_witness_access constants.%.13, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc30_18.2: %Convert.type.5 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.4] // CHECK:STDOUT: %.loc30_18.3: = bound_method %Source.call.loc30, %.loc30_18.2 // CHECK:STDOUT: %.loc30_18.4: ref %X = temporary %.loc30_18.1, %Source.call.loc30 // CHECK:STDOUT: %.loc30_18.5: %X = bind_value %.loc30_18.4 @@ -271,9 +271,9 @@ fn Test() { // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc31_17) [template = constants.%i32] // CHECK:STDOUT: %.loc31_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc31_16.2: type = converted %int.make_type_signed, %.loc31_16.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc31_10: = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%.31] +// CHECK:STDOUT: %.loc31_10: = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%.37] // CHECK:STDOUT: %Source.call.loc31: init %i32 = call %.loc31_10() -// CHECK:STDOUT: %.loc31_16.3: %Convert.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc31_16.3: %Convert.type.3 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.2] // CHECK:STDOUT: %.loc31_16.4: = bound_method %Source.call.loc31, %.loc31_16.3 // CHECK:STDOUT: %.loc31_16.5: ref %X = temporary_storage // CHECK:STDOUT: %.loc31_16.6: %i32 = value_of_initializer %Source.call.loc31 @@ -291,7 +291,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%T // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.14 +// CHECK:STDOUT: %.loc27_35.2 => constants.%.18 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(%T.loc27_11.2) { @@ -304,7 +304,7 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%X // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.15 +// CHECK:STDOUT: %.loc27_35.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Source(constants.%i32) { @@ -312,6 +312,6 @@ fn Test() { // CHECK:STDOUT: %T.patt.loc27_11.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc27_35.2 => constants.%.31 +// CHECK:STDOUT: %.loc27_35.2 => constants.%.37 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index 53c4ac263dff..de618de75688 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -35,7 +35,7 @@ fn TestOp() { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.7: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] @@ -47,7 +47,7 @@ fn TestOp() { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+63, loaded [template = constants.%Inc.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+67, loaded [template = constants.%Inc.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,7 +77,7 @@ fn TestOp() { // CHECK:STDOUT: %self.param: %.3 = value_param runtime_param0 // CHECK:STDOUT: %self: %.3 = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -103,7 +103,7 @@ fn TestOp() { // CHECK:STDOUT: %.loc22_16: init %C = converted %.loc22_15.1, %.loc22_15.2 [template = constants.%struct] // CHECK:STDOUT: assign %c.var, %.loc22_16 // CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c -// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc23_3.1: %Op.type.2 = interface_witness_access constants.%.7, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc23_3.2: = bound_method %c.ref, %.loc23_3.1 // CHECK:STDOUT: %.loc23_5: %.3 = addr_of %c.ref // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc23_3.2(%.loc23_5) diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 4820175b8cf3..a30eea47ff0f 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -90,7 +90,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] -// CHECK:STDOUT: %.7: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.10: = interface_witness (%At.2) [template] // CHECK:STDOUT: %struct.1: %ElementType.1 = struct_value () [template] // CHECK:STDOUT: %struct.2: %SubscriptType.1 = struct_value () [template] // CHECK:STDOUT: %struct.3: %C = struct_value () [template] @@ -151,7 +151,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -205,7 +205,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %c: %C = bind_name c, %.loc15_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %s.ref: %SubscriptType.1 = name_ref s, %s -// CHECK:STDOUT: %.loc16_25.1: %At.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc16_25.1: %At.type.3 = interface_witness_access constants.%.10, element0 [template = constants.%At.2] // CHECK:STDOUT: %.loc16_25.2: = bound_method %c.ref, %.loc16_25.1 // CHECK:STDOUT: %.loc16_25.3: ref %ElementType.1 = temporary_storage // CHECK:STDOUT: %At.call: init %ElementType.1 = call %.loc16_25.2(%c.ref, %s.ref) to %.loc16_25.3 @@ -230,25 +230,25 @@ let x: i32 = c[0]; // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%i32, %i32) [template] -// CHECK:STDOUT: %.6: = interface_witness (%At.2) [template] -// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.10: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.9: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.13: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.2(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.31: = bound_method %.9, %Convert.14 [template] -// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.34: = bound_method %.10, %Convert.14 [template] -// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.36: %i32 = int_value 5 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.33, %.36) [template] -// CHECK:STDOUT: %.37: = bound_method %.8, %Convert.14 [template] -// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.39: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.37: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.38: = bound_method %.12, %Convert.14 [template] +// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.41: = bound_method %.13, %Convert.14 [template] +// CHECK:STDOUT: %.42: = specific_function %.41, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.43: %i32 = int_value 5 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.40, %.43) [template] +// CHECK:STDOUT: %.44: = bound_method %.11, %Convert.14 [template] +// CHECK:STDOUT: %.45: = specific_function %.44, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.46: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -333,7 +333,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_45: = interface_witness (%At.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc4_45: = interface_witness (%At.decl) [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -343,40 +343,40 @@ let x: i32 = c[0]; // CHECK:STDOUT: fn @At.2[%self.param_patt: %tuple.type.2](%subscript.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %tuple.type.2 = name_ref self, %self -// CHECK:STDOUT: %.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%.8] +// CHECK:STDOUT: %.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%.11] // CHECK:STDOUT: %.loc6_16: %i32 = tuple_access %self.ref, element0 // CHECK:STDOUT: return %.loc6_16 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc10_22: Core.IntLiteral = int_value 1 [template = constants.%.9] -// CHECK:STDOUT: %.loc10_25: Core.IntLiteral = int_value 5 [template = constants.%.10] +// CHECK:STDOUT: %.loc10_22: Core.IntLiteral = int_value 1 [template = constants.%.12] +// CHECK:STDOUT: %.loc10_25: Core.IntLiteral = int_value 5 [template = constants.%.13] // CHECK:STDOUT: %.loc10_26.1: %tuple.type.3 = tuple_literal (%.loc10_22, %.loc10_25) -// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_22, %.loc10_26.2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %.loc10_26.4(%.loc10_22) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_22, %.loc10_26.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_26.7: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_26.8: = bound_method %.loc10_25, %.loc10_26.7 [template = constants.%.34] -// CHECK:STDOUT: %.loc10_26.9: = specific_function %.loc10_26.8, @Convert.2(constants.%.1) [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %.loc10_26.9(%.loc10_25) [template = constants.%.36] -// CHECK:STDOUT: %.loc10_26.10: %i32 = value_of_initializer %int.convert_checked.loc10_26.2 [template = constants.%.36] -// CHECK:STDOUT: %.loc10_26.11: %i32 = converted %.loc10_25, %.loc10_26.10 [template = constants.%.36] +// CHECK:STDOUT: %.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_26.3: = bound_method %.loc10_22, %.loc10_26.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc10_26.4: = specific_function %.loc10_26.3, @Convert.2(constants.%.1) [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %.loc10_26.4(%.loc10_22) [template = constants.%.40] +// CHECK:STDOUT: %.loc10_26.5: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%.40] +// CHECK:STDOUT: %.loc10_26.6: %i32 = converted %.loc10_22, %.loc10_26.5 [template = constants.%.40] +// CHECK:STDOUT: %.loc10_26.7: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_26.8: = bound_method %.loc10_25, %.loc10_26.7 [template = constants.%.41] +// CHECK:STDOUT: %.loc10_26.9: = specific_function %.loc10_26.8, @Convert.2(constants.%.1) [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %.loc10_26.9(%.loc10_25) [template = constants.%.43] +// CHECK:STDOUT: %.loc10_26.10: %i32 = value_of_initializer %int.convert_checked.loc10_26.2 [template = constants.%.43] +// CHECK:STDOUT: %.loc10_26.11: %i32 = converted %.loc10_25, %.loc10_26.10 [template = constants.%.43] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc10_26.6, %.loc10_26.11) [template = constants.%tuple] // CHECK:STDOUT: %.loc10_27: %tuple.type.2 = converted %.loc10_26.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %s: %tuple.type.2 = bind_name s, %.loc10_27 // CHECK:STDOUT: %s.ref: %tuple.type.2 = name_ref s, %s -// CHECK:STDOUT: %.loc11_16: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_17.2: = bound_method %.loc11_16, %.loc11_17.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc11_17.3: = specific_function %.loc11_17.2, @Convert.2(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_17.3(%.loc11_16) [template = constants.%.39] -// CHECK:STDOUT: %.loc11_17.4: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_17.5: %i32 = converted %.loc11_16, %.loc11_17.4 [template = constants.%.39] -// CHECK:STDOUT: %.loc11_17.6: %At.type.3 = interface_witness_access constants.%.6, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc11_16: Core.IntLiteral = int_value 0 [template = constants.%.11] +// CHECK:STDOUT: %.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%.37, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_17.2: = bound_method %.loc11_16, %.loc11_17.1 [template = constants.%.44] +// CHECK:STDOUT: %.loc11_17.3: = specific_function %.loc11_17.2, @Convert.2(constants.%.1) [template = constants.%.45] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_17.3(%.loc11_16) [template = constants.%.46] +// CHECK:STDOUT: %.loc11_17.4: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.46] +// CHECK:STDOUT: %.loc11_17.5: %i32 = converted %.loc11_16, %.loc11_17.4 [template = constants.%.46] +// CHECK:STDOUT: %.loc11_17.6: %At.type.3 = interface_witness_access constants.%.9, element0 [template = constants.%At.2] // CHECK:STDOUT: %.loc11_17.7: = bound_method %s.ref, %.loc11_17.6 // CHECK:STDOUT: %At.call: init %i32 = call %.loc11_17.7(%s.ref, %.loc11_17.5) // CHECK:STDOUT: %.loc11_18.1: %i32 = value_of_initializer %At.call @@ -399,10 +399,10 @@ let x: i32 = c[0]; // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%SubscriptType.1, %ElementType.1) [template] -// CHECK:STDOUT: %.7: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.10: = interface_witness (%At.2) [template] // CHECK:STDOUT: %struct.1: %ElementType.1 = struct_value () [template] // CHECK:STDOUT: %struct.2: %C = struct_value () [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.12: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -459,7 +459,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc8: = interface_witness (%At.decl) [template = constants.%.10] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -505,9 +505,9 @@ let x: i32 = c[0]; // CHECK:STDOUT: %.loc14_14.2: %C = bind_value %.loc14_14.1 // CHECK:STDOUT: %c: %C = bind_name c, %.loc14_14.2 // CHECK:STDOUT: %c.ref: %C = name_ref c, %c -// CHECK:STDOUT: %.loc22_24: Core.IntLiteral = int_value 0 [template = constants.%.9] +// CHECK:STDOUT: %.loc22_24: Core.IntLiteral = int_value 0 [template = constants.%.12] // CHECK:STDOUT: %.loc22_25.1: %SubscriptType.1 = converted %.loc22_24, [template = ] -// CHECK:STDOUT: %.loc22_25.2: %At.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc22_25.2: %At.type.3 = interface_witness_access constants.%.10, element0 [template = constants.%At.2] // CHECK:STDOUT: %.loc22_25.3: = bound_method %c.ref, %.loc22_25.2 // CHECK:STDOUT: %.loc22_25.4: ref %ElementType.1 = temporary_storage // CHECK:STDOUT: %At.call: init %ElementType.1 = call %.loc22_25.3(%c.ref, ) to %.loc22_25.4 diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index 388dc6b70f6f..aff25ef48035 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %LeftShiftAssign.type: type = facet_type <@LeftShiftAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+210, loaded [template = constants.%LeftShift.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+242, loaded [template = constants.%LeftShiftAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+224, loaded [template = constants.%LeftShift.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+258, loaded [template = constants.%LeftShiftAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %LeftShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index de604e391865..8a7addff3648 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %ModAssign.type: type = facet_type <@ModAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+315, loaded [template = constants.%Mod.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+347, loaded [template = constants.%ModAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+337, loaded [template = constants.%Mod.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+371, loaded [template = constants.%ModAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %ModAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index 3866874451eb..c04768559fdd 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %MulAssign.type: type = facet_type <@MulAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+193, loaded [template = constants.%Mul.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+225, loaded [template = constants.%MulAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+207, loaded [template = constants.%Mul.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+241, loaded [template = constants.%MulAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %MulAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index 684e06bbbb5b..4090978232a2 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -34,7 +34,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] @@ -46,7 +46,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+85, loaded [template = constants.%Negate.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+91, loaded [template = constants.%Negate.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -91,7 +91,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -116,7 +116,7 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: fn @TestOp(%a.param_patt: %C) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a -// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc24_10.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc24_10.2: = bound_method %a.ref, %.loc24_10.1 // CHECK:STDOUT: %.loc23_17.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc24_10.2(%a.ref) to %.loc23_17.2 diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index 5c09a7eee94b..5330e2e483fe 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -121,22 +121,24 @@ fn F() { ()[()]; } // CHECK:STDOUT: %IndexWith: %IndexWith.type.1 = struct_value () [template] // CHECK:STDOUT: %IndexWith.type.2: type = facet_type <@IndexWith, @IndexWith(%SubscriptType)> [symbolic] // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %At.type.1: type = fn_type @At.1, @IndexWith(%SubscriptType) [symbolic] // CHECK:STDOUT: %At.1: %At.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @IndexWith.%At.decl [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %IndexWith.type.2, %At.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @IndexWith.%At.decl [symbolic] // CHECK:STDOUT: %IndexWith.type.3: type = facet_type <@IndexWith, @IndexWith(%empty_tuple.type)> [template] // CHECK:STDOUT: %At.type.2: type = fn_type @At.2 [template] // CHECK:STDOUT: %At.2: %At.type.2 = struct_value () [template] // CHECK:STDOUT: %At.type.3: type = fn_type @At.1, @IndexWith(%empty_tuple.type) [template] // CHECK:STDOUT: %At.3: %At.type.3 = struct_value () [template] -// CHECK:STDOUT: %.3: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] -// CHECK:STDOUT: %.4: %.3 = assoc_entity element0, @IndexWith.%At.decl [template] -// CHECK:STDOUT: %.5: = interface_witness (%At.2) [template] +// CHECK:STDOUT: %.4: type = assoc_entity_type %IndexWith.type.3, %At.type.3 [template] +// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @IndexWith.%At.decl [template] +// CHECK:STDOUT: %.6: %IndexWith.type.2 = facet_value %empty_tuple.type, %empty_tuple.type [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%At.2) [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.6: = bound_method %empty_tuple, %At.2 [template] +// CHECK:STDOUT: %.8: = bound_method %empty_tuple, %At.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -175,34 +177,34 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Self.2: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %At.type: type = fn_type @At.1, @IndexWith(%SubscriptType.loc5_26.2) [symbolic = %At.type (constants.%At.type.1)] // CHECK:STDOUT: %At: @IndexWith.%At.type (%At.type.1) = struct_value () [symbolic = %At (constants.%At.1)] -// CHECK:STDOUT: %.loc6_52.2: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.loc6_52.2 (constants.%.1)] -// CHECK:STDOUT: %.loc6_52.3: @IndexWith.%.loc6_52.2 (%.1) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.2)] +// CHECK:STDOUT: %.loc6_52.2: type = assoc_entity_type @IndexWith.%IndexWith.type (%IndexWith.type.2), @IndexWith.%At.type (%At.type.1) [symbolic = %.loc6_52.2 (constants.%.2)] +// CHECK:STDOUT: %.loc6_52.3: @IndexWith.%.loc6_52.2 (%.2) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @IndexWith.%IndexWith.type (%IndexWith.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %At.decl: @IndexWith.%At.type (%At.type.1) = fn_decl @At.1 [symbolic = @IndexWith.%At (constants.%At.1)] { -// CHECK:STDOUT: %self.patt: @At.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @At.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @At.1.%.loc6_15.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @At.1.%.loc6_15.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %subscript.patt: @At.1.%SubscriptType (%SubscriptType) = binding_pattern subscript // CHECK:STDOUT: %subscript.param_patt: @At.1.%SubscriptType (%SubscriptType) = value_param_pattern %subscript.patt, runtime_param1 // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_15.1: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc6_15.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc6_15.3: type = converted %Self.ref, %.loc6_15.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc6_15.2: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc6_15.3: type = facet_access_type %Self.ref [symbolic = %.loc6_15.1 (constants.%.1)] +// CHECK:STDOUT: %.loc6_15.4: type = converted %Self.ref, %.loc6_15.3 [symbolic = %.loc6_15.1 (constants.%.1)] // CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc5_26.1 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %.loc6_51.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_51.2: type = converted %.loc6_51.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %self.param: @At.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @At.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @At.1.%.loc6_15.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @At.1.%.loc6_15.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: @At.1.%SubscriptType (%SubscriptType) = value_param runtime_param1 // CHECK:STDOUT: %subscript: @At.1.%SubscriptType (%SubscriptType) = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6_52.1: @IndexWith.%.loc6_52.2 (%.1) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.2)] +// CHECK:STDOUT: %.loc6_52.1: @IndexWith.%.loc6_52.2 (%.2) = assoc_entity element0, %At.decl [symbolic = %.loc6_52.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -232,7 +234,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_31: = interface_witness (%At.decl) [template = constants.%.5] +// CHECK:STDOUT: %.loc9_31: = interface_witness (%At.decl) [template = constants.%.7] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .At = %At.decl @@ -243,8 +245,9 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType: type = bind_symbolic_name SubscriptType, 0 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(%SubscriptType)> [symbolic = %IndexWith.type (constants.%IndexWith.type.2)] // CHECK:STDOUT: %Self: %IndexWith.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc6_15.1: type = facet_access_type %Self [symbolic = %.loc6_15.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @At.1.%Self (%Self)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> %empty_tuple.type; +// CHECK:STDOUT: fn[%self.param_patt: @At.1.%.loc6_15.1 (%.1)](%subscript.param_patt: @At.1.%SubscriptType (%SubscriptType)) -> %empty_tuple.type; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @At.2[%self.param_patt: %empty_tuple.type](%subscript.param_patt: %empty_tuple.type) -> %empty_tuple.type { @@ -263,8 +266,8 @@ fn F() { ()[()]; } // CHECK:STDOUT: %.loc15_11.2: %empty_tuple.type = converted %.loc15_11.1, %empty_tuple.loc15_11 [template = constants.%empty_tuple] // CHECK:STDOUT: %empty_tuple.loc15_14: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_15.1: %empty_tuple.type = converted %.loc15_14, %empty_tuple.loc15_14 [template = constants.%empty_tuple] -// CHECK:STDOUT: %.loc15_15.2: %At.type.3 = interface_witness_access constants.%.5, element0 [template = constants.%At.2] -// CHECK:STDOUT: %.loc15_15.3: = bound_method %.loc15_11.2, %.loc15_15.2 [template = constants.%.6] +// CHECK:STDOUT: %.loc15_15.2: %At.type.3 = interface_witness_access constants.%.7, element0 [template = constants.%At.2] +// CHECK:STDOUT: %.loc15_15.3: = bound_method %.loc15_11.2, %.loc15_15.2 [template = constants.%.8] // CHECK:STDOUT: %At.call: init %empty_tuple.type = call %.loc15_15.3(%.loc15_11.2, %.loc15_15.1) // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -283,6 +286,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %SubscriptType => constants.%SubscriptType // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.2 // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc6_15.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @IndexWith(%SubscriptType.loc5_26.2) { @@ -299,13 +303,14 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %At.type => constants.%At.type.3 // CHECK:STDOUT: %At => constants.%At.3 -// CHECK:STDOUT: %.loc6_52.2 => constants.%.3 -// CHECK:STDOUT: %.loc6_52.3 => constants.%.4 +// CHECK:STDOUT: %.loc6_52.2 => constants.%.4 +// CHECK:STDOUT: %.loc6_52.3 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @At.1(constants.%empty_tuple.type, constants.%empty_tuple.type) { +// CHECK:STDOUT: specific @At.1(constants.%empty_tuple.type, constants.%.6) { // CHECK:STDOUT: %SubscriptType => constants.%empty_tuple.type // CHECK:STDOUT: %IndexWith.type => constants.%IndexWith.type.3 -// CHECK:STDOUT: %Self => constants.%empty_tuple.type +// CHECK:STDOUT: %Self => constants.%.6 +// CHECK:STDOUT: %.loc6_15.1 => constants.%empty_tuple.type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index f0df8f3c42a5..1b5435baa09e 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -95,7 +95,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %LessOrEquivalent.type.2: type = fn_type @LessOrEquivalent.2 [template] // CHECK:STDOUT: %Greater.type.2: type = fn_type @Greater.2 [template] // CHECK:STDOUT: %GreaterOrEquivalent.type.2: type = fn_type @GreaterOrEquivalent.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Less.1, %LessOrEquivalent.1, %Greater.1, %GreaterOrEquivalent.1) [template] // CHECK:STDOUT: %TestLess.type: type = fn_type @TestLess [template] // CHECK:STDOUT: %TestLess: %TestLess.type = struct_value () [template] // CHECK:STDOUT: %TestLessEqual.type: type = fn_type @TestLessEqual [template] @@ -113,7 +113,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+70, loaded [template = constants.%Ordered.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/comparison, inst+73, loaded [template = constants.%Ordered.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -295,7 +295,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc6: = interface_witness (%Less.decl, %LessOrEquivalent.decl, %Greater.decl, %GreaterOrEquivalent.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Less = %Less.decl @@ -324,7 +324,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Less.1] +// CHECK:STDOUT: %.loc14_12.1: %Less.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Less.1] // CHECK:STDOUT: %.loc14_12.2: = bound_method %a.ref, %.loc14_12.1 // CHECK:STDOUT: %Less.call: init bool = call %.loc14_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc14_15.1: bool = value_of_initializer %Less.call @@ -336,7 +336,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.3, element1 [template = constants.%LessOrEquivalent.1] +// CHECK:STDOUT: %.loc18_12.1: %LessOrEquivalent.type.2 = interface_witness_access constants.%.5, element1 [template = constants.%LessOrEquivalent.1] // CHECK:STDOUT: %.loc18_12.2: = bound_method %a.ref, %.loc18_12.1 // CHECK:STDOUT: %LessOrEquivalent.call: init bool = call %.loc18_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc18_16.1: bool = value_of_initializer %LessOrEquivalent.call @@ -348,7 +348,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.3, element2 [template = constants.%Greater.1] +// CHECK:STDOUT: %.loc22_12.1: %Greater.type.2 = interface_witness_access constants.%.5, element2 [template = constants.%Greater.1] // CHECK:STDOUT: %.loc22_12.2: = bound_method %a.ref, %.loc22_12.1 // CHECK:STDOUT: %Greater.call: init bool = call %.loc22_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc22_15.1: bool = value_of_initializer %Greater.call @@ -360,7 +360,7 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.3, element3 [template = constants.%GreaterOrEquivalent.1] +// CHECK:STDOUT: %.loc26_12.1: %GreaterOrEquivalent.type.2 = interface_witness_access constants.%.5, element3 [template = constants.%GreaterOrEquivalent.1] // CHECK:STDOUT: %.loc26_12.2: = bound_method %a.ref, %.loc26_12.1 // CHECK:STDOUT: %GreaterOrEquivalent.call: init bool = call %.loc26_12.2(%a.ref, %b.ref) // CHECK:STDOUT: %.loc26_16.1: bool = value_of_initializer %GreaterOrEquivalent.call diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index 748098160d6a..20352ecdcd86 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %RightShiftAssign.type: type = facet_type <@RightShiftAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+271, loaded [template = constants.%RightShift.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+303, loaded [template = constants.%RightShiftAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/bitwise, inst+289, loaded [template = constants.%RightShift.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/bitwise, inst+323, loaded [template = constants.%RightShiftAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %RightShiftAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index b8c46656cbaa..4a419e1d206e 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -42,14 +42,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Op.1: %Op.type.1 = struct_value () [template] // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] -// CHECK:STDOUT: %.3: = interface_witness (%Op.1) [template] +// CHECK:STDOUT: %.5: = interface_witness (%Op.1) [template] // CHECK:STDOUT: %struct: %C = struct_value () [template] // CHECK:STDOUT: %SubAssign.type: type = facet_type <@SubAssign> [template] -// CHECK:STDOUT: %.5: type = ptr_type %C [template] +// CHECK:STDOUT: %.7: type = ptr_type %C [template] // CHECK:STDOUT: %Op.type.3: type = fn_type @Op.3 [template] // CHECK:STDOUT: %Op.3: %Op.type.3 = struct_value () [template] // CHECK:STDOUT: %Op.type.4: type = fn_type @Op.4 [template] -// CHECK:STDOUT: %.7: = interface_witness (%Op.3) [template] +// CHECK:STDOUT: %.11: = interface_witness (%Op.3) [template] // CHECK:STDOUT: %TestOp.type: type = fn_type @TestOp [template] // CHECK:STDOUT: %TestOp: %TestOp.type = struct_value () [template] // CHECK:STDOUT: %TestAssign.type: type = fn_type @TestAssign [template] @@ -63,8 +63,8 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+110, loaded [template = constants.%Sub.type] -// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+142, loaded [template = constants.%SubAssign.type] +// CHECK:STDOUT: %import_ref.1: type = import_ref Core//prelude/operators/arithmetic, inst+118, loaded [template = constants.%Sub.type] +// CHECK:STDOUT: %import_ref.5: type = import_ref Core//prelude/operators/arithmetic, inst+152, loaded [template = constants.%SubAssign.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,16 +105,16 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAssign.decl: %TestAssign.type = fn_decl @TestAssign [template = constants.%TestAssign] { -// CHECK:STDOUT: %a.patt: %.5 = binding_pattern a -// CHECK:STDOUT: %a.param_patt: %.5 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: %.7 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %.7 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc30: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %a.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %a: %.5 = bind_name a, %a.param +// CHECK:STDOUT: %a.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %a: %.7 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } @@ -139,7 +139,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.3] +// CHECK:STDOUT: %.loc17: = interface_witness (%Op.decl) [template = constants.%.5] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -148,21 +148,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.2: %C.ref as %SubAssign.ref { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { -// CHECK:STDOUT: %self.patt: %.5 = binding_pattern self -// CHECK:STDOUT: %self.param_patt: %.5 = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: %.7 = binding_pattern self +// CHECK:STDOUT: %self.param_patt: %.7 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.5] +// CHECK:STDOUT: %.loc23_21: type = ptr_type %C [template = constants.%.7] // CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %self.param: %.5 = value_param runtime_param0 -// CHECK:STDOUT: %self: %.5 = bind_name self, %self.param +// CHECK:STDOUT: %self.param: %.7 = value_param runtime_param0 +// CHECK:STDOUT: %self: %.7 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.7] +// CHECK:STDOUT: %.loc22: = interface_witness (%Op.decl) [template = constants.%.11] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Op = %Op.decl @@ -184,7 +184,7 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: return %.loc19_14 to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.5](%other.param_patt: %C) { +// CHECK:STDOUT: fn @Op.3[addr %self.param_patt: %.7](%other.param_patt: %C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -193,21 +193,21 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %a.ref: %C = name_ref a, %a // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.3, element0 [template = constants.%Op.1] +// CHECK:STDOUT: %.loc27_12.1: %Op.type.2 = interface_witness_access constants.%.5, element0 [template = constants.%Op.1] // CHECK:STDOUT: %.loc27_12.2: = bound_method %a.ref, %.loc27_12.1 // CHECK:STDOUT: %.loc26_23.2: ref %C = splice_block %return {} // CHECK:STDOUT: %Op.call: init %C = call %.loc27_12.2(%a.ref, %b.ref) to %.loc26_23.2 // CHECK:STDOUT: return %Op.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.5, %b.param_patt: %C) { +// CHECK:STDOUT: fn @TestAssign(%a.param_patt: %.7, %b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: %.5 = name_ref a, %a +// CHECK:STDOUT: %a.ref: %.7 = name_ref a, %a // CHECK:STDOUT: %.loc31_3.1: ref %C = deref %a.ref // CHECK:STDOUT: %b.ref: %C = name_ref b, %b -// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.7, element0 [template = constants.%Op.3] +// CHECK:STDOUT: %.loc31_6.1: %Op.type.4 = interface_witness_access constants.%.11, element0 [template = constants.%Op.3] // CHECK:STDOUT: %.loc31_6.2: = bound_method %.loc31_3.1, %.loc31_6.1 -// CHECK:STDOUT: %.loc31_3.2: %.5 = addr_of %.loc31_3.1 +// CHECK:STDOUT: %.loc31_3.2: %.7 = addr_of %.loc31_3.1 // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc31_6.2(%.loc31_3.2, %b.ref) // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 6ed1a4ae8000..578a6330fda3 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -52,10 +52,10 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -91,11 +91,11 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign file.%x.var, %.loc4_15.4 // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] // CHECK:STDOUT: %x.ref: ref %i32 = name_ref x, file.%x @@ -115,16 +115,16 @@ fn Main() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -160,12 +160,12 @@ fn Main() { // CHECK:STDOUT: %.loc7_10.3: type = converted %int.make_type_signed.loc7, %.loc7_10.2 [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %.loc7_16: Core.IntLiteral = int_value 1 [template = constants.%.26] -// CHECK:STDOUT: %.loc7_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc7_17.2: = bound_method %.loc7_16, %.loc7_17.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc7_17.3: = specific_function %.loc7_17.2, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_17.3(%.loc7_16) [template = constants.%.29] -// CHECK:STDOUT: %.loc7_17.4: init %i32 = converted %.loc7_16, %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc7_16: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %.loc7_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc7_17.2: = bound_method %.loc7_16, %.loc7_17.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc7_17.3: = specific_function %.loc7_17.2, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc7_17.3(%.loc7_16) [template = constants.%.33] +// CHECK:STDOUT: %.loc7_17.4: init %i32 = converted %.loc7_16, %int.convert_checked [template = constants.%.33] // CHECK:STDOUT: assign %x.var, %.loc7_17.4 // CHECK:STDOUT: %.loc9_10.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc9: init type = call constants.%Int(%.loc9_10.1) [template = constants.%i32] @@ -183,11 +183,11 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign file.%x.var, %.loc4_15.4 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index d22c528ff876..8c11fced238d 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -33,10 +33,10 @@ var b: i32 = a; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,11 +65,11 @@ var b: i32 = a; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc4_15.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_15.2: = bound_method %.loc4_14, %.loc4_15.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_15.3: = specific_function %.loc4_15.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_15.3(%.loc4_14) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_15.4: init %i32 = converted %.loc4_14, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign file.%a.var, %.loc4_15.4 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -88,57 +88,61 @@ var b: i32 = a; // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.8 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.8 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.15 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.15 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.25 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.25 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.32 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.32 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.17: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.17 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -151,35 +155,35 @@ var b: i32 = a; // CHECK:STDOUT: %import_ref.2 = import_ref Main//lib, inst+37, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref Main//lib, inst+38, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Main//lib, inst+39, unloaded -// CHECK:STDOUT: %import_ref.5: type = import_ref Main//lib, inst+81, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.6: type = import_ref Main//lib, inst+82, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.7 = import_ref Main//lib, inst+83, unloaded -// CHECK:STDOUT: %import_ref.8 = import_ref Main//lib, inst+54, unloaded -// CHECK:STDOUT: %import_ref.9: type = import_ref Main//lib, inst+111, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.10: type = import_ref Main//lib, inst+112, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.11 = import_ref Main//lib, inst+113, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Main//lib, inst+140, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.13: type = import_ref Main//lib, inst+141, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.14 = import_ref Main//lib, inst+142, unloaded -// CHECK:STDOUT: %import_ref.16: type = import_ref Main//lib, inst+172, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.17: type = import_ref Main//lib, inst+173, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.18 = import_ref Main//lib, inst+174, unloaded -// CHECK:STDOUT: %import_ref.19 = import_ref Main//lib, inst+204, unloaded -// CHECK:STDOUT: %import_ref.20 = import_ref Main//lib, inst+205, unloaded -// CHECK:STDOUT: %import_ref.21 = import_ref Main//lib, inst+206, unloaded -// CHECK:STDOUT: %import_ref.22: type = import_ref Main//lib, inst+212, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.23: type = import_ref Main//lib, inst+213, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.24 = import_ref Main//lib, inst+214, unloaded -// CHECK:STDOUT: %import_ref.25 = import_ref Main//lib, inst+229, unloaded -// CHECK:STDOUT: %import_ref.26: type = import_ref Main//lib, inst+266, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.27: type = import_ref Main//lib, inst+267, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.28 = import_ref Main//lib, inst+268, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Main//lib, inst+295, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.30: type = import_ref Main//lib, inst+296, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.31 = import_ref Main//lib, inst+297, unloaded -// CHECK:STDOUT: %import_ref.33: type = import_ref Main//lib, inst+327, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.34: type = import_ref Main//lib, inst+328, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.35 = import_ref Main//lib, inst+329, unloaded +// CHECK:STDOUT: %import_ref.5: type = import_ref Main//lib, inst+84, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.6: type = import_ref Main//lib, inst+85, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.7 = import_ref Main//lib, inst+86, unloaded +// CHECK:STDOUT: %import_ref.8 = import_ref Main//lib, inst+55, unloaded +// CHECK:STDOUT: %import_ref.9: type = import_ref Main//lib, inst+114, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.10: type = import_ref Main//lib, inst+115, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.11 = import_ref Main//lib, inst+116, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Main//lib, inst+143, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.13: type = import_ref Main//lib, inst+144, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.14 = import_ref Main//lib, inst+145, unloaded +// CHECK:STDOUT: %import_ref.16: type = import_ref Main//lib, inst+175, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.17: type = import_ref Main//lib, inst+176, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.18 = import_ref Main//lib, inst+177, unloaded +// CHECK:STDOUT: %import_ref.19 = import_ref Main//lib, inst+207, unloaded +// CHECK:STDOUT: %import_ref.20 = import_ref Main//lib, inst+208, unloaded +// CHECK:STDOUT: %import_ref.21 = import_ref Main//lib, inst+209, unloaded +// CHECK:STDOUT: %import_ref.22: type = import_ref Main//lib, inst+215, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.23: type = import_ref Main//lib, inst+216, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.24 = import_ref Main//lib, inst+217, unloaded +// CHECK:STDOUT: %import_ref.25 = import_ref Main//lib, inst+233, unloaded +// CHECK:STDOUT: %import_ref.26: type = import_ref Main//lib, inst+272, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.27: type = import_ref Main//lib, inst+273, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.28 = import_ref Main//lib, inst+274, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Main//lib, inst+301, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.30: type = import_ref Main//lib, inst+302, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.31 = import_ref Main//lib, inst+303, unloaded +// CHECK:STDOUT: %import_ref.33: type = import_ref Main//lib, inst+333, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.34: type = import_ref Main//lib, inst+334, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.35 = import_ref Main//lib, inst+335, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -191,7 +195,7 @@ var b: i32 = a; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8.1: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_8.1: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8.1) [template = constants.%i32] // CHECK:STDOUT: %.loc4_8.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc4_8.3: type = converted %int.make_type_signed, %.loc4_8.2 [template = constants.%i32] @@ -208,8 +212,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.8 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.8 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -228,8 +232,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.25 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.25 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -248,7 +252,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.5 as imports.%import_ref.6 { // CHECK:STDOUT: !members: @@ -265,7 +269,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.9 as imports.%import_ref.10 { // CHECK:STDOUT: !members: @@ -281,7 +285,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -297,7 +301,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.16 as imports.%import_ref.17 { // CHECK:STDOUT: !members: @@ -314,7 +318,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.22 as imports.%import_ref.23 { // CHECK:STDOUT: !members: @@ -331,7 +335,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.26 as imports.%import_ref.27 { // CHECK:STDOUT: !members: @@ -347,7 +351,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -363,7 +367,7 @@ var b: i32 = a; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.33 as imports.%import_ref.34 { // CHECK:STDOUT: !members: @@ -375,8 +379,9 @@ var b: i32 = a; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -419,8 +424,9 @@ var b: i32 = a; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -510,6 +516,7 @@ var b: i32 = a; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -555,8 +562,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -636,6 +643,7 @@ var b: i32 = a; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -681,8 +689,8 @@ var b: i32 = a; // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index 9003aca5b5af..cde11803ddbb 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -26,11 +26,11 @@ fn F() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,16 +70,16 @@ fn F() -> i32 { // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %n.var, %.loc12_17.4 // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_13: %.26 = addr_of %n.ref +// CHECK:STDOUT: %.loc13_13: %.30 = addr_of %n.ref // CHECK:STDOUT: %.loc13_12: ref %i32 = deref %.loc13_13 -// CHECK:STDOUT: %.loc13_11: %.26 = addr_of %.loc13_12 +// CHECK:STDOUT: %.loc13_11: %.30 = addr_of %.loc13_12 // CHECK:STDOUT: %.loc13_10.1: ref %i32 = deref %.loc13_11 // CHECK:STDOUT: %.loc13_10.2: %i32 = bind_value %.loc13_10.1 // CHECK:STDOUT: return %.loc13_10.2 diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index e3cf2dc17350..1a5dbc843f62 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -37,20 +37,20 @@ fn F() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.29, %.32) [template] -// CHECK:STDOUT: %.33: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template] +// CHECK:STDOUT: %.37: type = ptr_type %i32 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29, %.32) [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.33, %.36) [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -87,20 +87,20 @@ fn F() { // CHECK:STDOUT: %.loc12_37: Core.IntLiteral = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc12_45: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc12_46.1: %.6 = struct_literal (%.loc12_37, %.loc12_45) -// CHECK:STDOUT: %.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_46.3: = bound_method %.loc12_37, %.loc12_46.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc12_46.4: = specific_function %.loc12_46.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %.loc12_46.4(%.loc12_37) [template = constants.%.29] -// CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %.loc12_37, %int.convert_checked.loc12_46.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_46.3: = bound_method %.loc12_37, %.loc12_46.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_46.4: = specific_function %.loc12_46.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %.loc12_46.4(%.loc12_37) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %.loc12_37, %int.convert_checked.loc12_46.1 [template = constants.%.33] // CHECK:STDOUT: %.loc12_46.6: ref %i32 = struct_access %s.var, element0 -// CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc12_46.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_46.9: = bound_method %.loc12_45, %.loc12_46.8 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_46.10: = specific_function %.loc12_46.9, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %.loc12_46.10(%.loc12_45) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_46.11: init %i32 = converted %.loc12_45, %int.convert_checked.loc12_46.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [template = constants.%.33] +// CHECK:STDOUT: %.loc12_46.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_46.9: = bound_method %.loc12_45, %.loc12_46.8 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_46.10: = specific_function %.loc12_46.9, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %.loc12_46.10(%.loc12_45) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_46.11: init %i32 = converted %.loc12_45, %int.convert_checked.loc12_46.2 [template = constants.%.36] // CHECK:STDOUT: %.loc12_46.12: ref %i32 = struct_access %s.var, element1 -// CHECK:STDOUT: %.loc12_46.13: init %i32 = initialize_from %.loc12_46.11 to %.loc12_46.12 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_46.13: init %i32 = initialize_from %.loc12_46.11 to %.loc12_46.12 [template = constants.%.36] // CHECK:STDOUT: %.loc12_46.14: init %.2 = struct_init (%.loc12_46.7, %.loc12_46.13) to %s.var [template = constants.%struct] // CHECK:STDOUT: %.loc12_47: init %.2 = converted %.loc12_46.1, %.loc12_46.14 [template = constants.%struct] // CHECK:STDOUT: assign %s.var, %.loc12_47 @@ -123,23 +123,23 @@ fn F() { // CHECK:STDOUT: %int.make_type_signed.loc15: init type = call constants.%Int(%.loc15_10) [template = constants.%i32] // CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %int.make_type_signed.loc15 [template = constants.%i32] // CHECK:STDOUT: %.loc15_13.2: type = converted %int.make_type_signed.loc15, %.loc15_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_13.3: type = ptr_type %i32 [template = constants.%.33] -// CHECK:STDOUT: %q.var: ref %.33 = var q -// CHECK:STDOUT: %q: ref %.33 = bind_name q, %q.var +// CHECK:STDOUT: %.loc15_13.3: type = ptr_type %i32 [template = constants.%.37] +// CHECK:STDOUT: %q.var: ref %.37 = var q +// CHECK:STDOUT: %q: ref %.37 = bind_name q, %q.var // CHECK:STDOUT: %s.ref.loc15: ref %.2 = name_ref s, %s // CHECK:STDOUT: %.loc15_19: ref %i32 = struct_access %s.ref.loc15, element0 -// CHECK:STDOUT: %.loc15_17: %.33 = addr_of %.loc15_19 +// CHECK:STDOUT: %.loc15_17: %.37 = addr_of %.loc15_19 // CHECK:STDOUT: assign %q.var, %.loc15_17 // CHECK:STDOUT: %.loc16_10: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc16: init type = call constants.%Int(%.loc16_10) [template = constants.%i32] // CHECK:STDOUT: %.loc16_13.1: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] // CHECK:STDOUT: %.loc16_13.2: type = converted %int.make_type_signed.loc16, %.loc16_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_13.3: type = ptr_type %i32 [template = constants.%.33] -// CHECK:STDOUT: %r.var: ref %.33 = var r -// CHECK:STDOUT: %r: ref %.33 = bind_name r, %r.var +// CHECK:STDOUT: %.loc16_13.3: type = ptr_type %i32 [template = constants.%.37] +// CHECK:STDOUT: %r.var: ref %.37 = var r +// CHECK:STDOUT: %r: ref %.37 = bind_name r, %r.var // CHECK:STDOUT: %s.ref.loc16: ref %.2 = name_ref s, %s // CHECK:STDOUT: %.loc16_19: ref %i32 = struct_access %s.ref.loc16, element1 -// CHECK:STDOUT: %.loc16_17: %.33 = addr_of %.loc16_19 +// CHECK:STDOUT: %.loc16_17: %.37 = addr_of %.loc16_19 // CHECK:STDOUT: assign %r.var, %.loc16_17 // CHECK:STDOUT: %.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc18_11: init type = call constants.%Int(%.loc18_11) [template = constants.%i32] @@ -156,20 +156,20 @@ fn F() { // CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc18_27: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc18_28.1: %tuple.type.3 = tuple_literal (%.loc18_24, %.loc18_27) -// CHECK:STDOUT: %.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_28.3: = bound_method %.loc18_24, %.loc18_28.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc18_28.4: = specific_function %.loc18_28.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %.loc18_28.4(%.loc18_24) [template = constants.%.29] -// CHECK:STDOUT: %.loc18_28.5: init %i32 = converted %.loc18_24, %int.convert_checked.loc18_28.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_28.3: = bound_method %.loc18_24, %.loc18_28.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc18_28.4: = specific_function %.loc18_28.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %.loc18_28.4(%.loc18_24) [template = constants.%.33] +// CHECK:STDOUT: %.loc18_28.5: init %i32 = converted %.loc18_24, %int.convert_checked.loc18_28.1 [template = constants.%.33] // CHECK:STDOUT: %.loc18_28.6: ref %i32 = tuple_access %t.var, element0 -// CHECK:STDOUT: %.loc18_28.7: init %i32 = initialize_from %.loc18_28.5 to %.loc18_28.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc18_28.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_28.9: = bound_method %.loc18_27, %.loc18_28.8 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_28.10: = specific_function %.loc18_28.9, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %.loc18_28.10(%.loc18_27) [template = constants.%.32] -// CHECK:STDOUT: %.loc18_28.11: init %i32 = converted %.loc18_27, %int.convert_checked.loc18_28.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_28.7: init %i32 = initialize_from %.loc18_28.5 to %.loc18_28.6 [template = constants.%.33] +// CHECK:STDOUT: %.loc18_28.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_28.9: = bound_method %.loc18_27, %.loc18_28.8 [template = constants.%.34] +// CHECK:STDOUT: %.loc18_28.10: = specific_function %.loc18_28.9, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %.loc18_28.10(%.loc18_27) [template = constants.%.36] +// CHECK:STDOUT: %.loc18_28.11: init %i32 = converted %.loc18_27, %int.convert_checked.loc18_28.2 [template = constants.%.36] // CHECK:STDOUT: %.loc18_28.12: ref %i32 = tuple_access %t.var, element1 -// CHECK:STDOUT: %.loc18_28.13: init %i32 = initialize_from %.loc18_28.11 to %.loc18_28.12 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_28.13: init %i32 = initialize_from %.loc18_28.11 to %.loc18_28.12 [template = constants.%.36] // CHECK:STDOUT: %.loc18_28.14: init %tuple.type.2 = tuple_init (%.loc18_28.7, %.loc18_28.13) to %t.var [template = constants.%tuple] // CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.14 [template = constants.%tuple] // CHECK:STDOUT: assign %t.var, %.loc18_29 @@ -177,25 +177,25 @@ fn F() { // CHECK:STDOUT: %int.make_type_signed.loc19: init type = call constants.%Int(%.loc19_11) [template = constants.%i32] // CHECK:STDOUT: %.loc19_14.1: type = value_of_initializer %int.make_type_signed.loc19 [template = constants.%i32] // CHECK:STDOUT: %.loc19_14.2: type = converted %int.make_type_signed.loc19, %.loc19_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_14.3: type = ptr_type %i32 [template = constants.%.33] -// CHECK:STDOUT: %t0.var: ref %.33 = var t0 -// CHECK:STDOUT: %t0: ref %.33 = bind_name t0, %t0.var +// CHECK:STDOUT: %.loc19_14.3: type = ptr_type %i32 [template = constants.%.37] +// CHECK:STDOUT: %t0.var: ref %.37 = var t0 +// CHECK:STDOUT: %t0: ref %.37 = bind_name t0, %t0.var // CHECK:STDOUT: %t.ref.loc19: ref %tuple.type.2 = name_ref t, %t -// CHECK:STDOUT: %.loc19_21: Core.IntLiteral = int_value 0 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_21: Core.IntLiteral = int_value 0 [template = constants.%.39] // CHECK:STDOUT: %.loc19_20: ref %i32 = tuple_access %t.ref.loc19, element0 -// CHECK:STDOUT: %.loc19_18: %.33 = addr_of %.loc19_20 +// CHECK:STDOUT: %.loc19_18: %.37 = addr_of %.loc19_20 // CHECK:STDOUT: assign %t0.var, %.loc19_18 // CHECK:STDOUT: %.loc20_11: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc20: init type = call constants.%Int(%.loc20_11) [template = constants.%i32] // CHECK:STDOUT: %.loc20_14.1: type = value_of_initializer %int.make_type_signed.loc20 [template = constants.%i32] // CHECK:STDOUT: %.loc20_14.2: type = converted %int.make_type_signed.loc20, %.loc20_14.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc20_14.3: type = ptr_type %i32 [template = constants.%.33] -// CHECK:STDOUT: %t1.var: ref %.33 = var t1 -// CHECK:STDOUT: %t1: ref %.33 = bind_name t1, %t1.var +// CHECK:STDOUT: %.loc20_14.3: type = ptr_type %i32 [template = constants.%.37] +// CHECK:STDOUT: %t1.var: ref %.37 = var t1 +// CHECK:STDOUT: %t1: ref %.37 = bind_name t1, %t1.var // CHECK:STDOUT: %t.ref.loc20: ref %tuple.type.2 = name_ref t, %t // CHECK:STDOUT: %.loc20_21: Core.IntLiteral = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc20_20: ref %i32 = tuple_access %t.ref.loc20, element1 -// CHECK:STDOUT: %.loc20_18: %.33 = addr_of %.loc20_20 +// CHECK:STDOUT: %.loc20_18: %.37 = addr_of %.loc20_20 // CHECK:STDOUT: assign %t1.var, %.loc20_18 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 59d36b496fc4..97d2368f7f52 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -28,11 +28,11 @@ fn F() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -72,24 +72,24 @@ fn F() -> i32 { // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc12_17.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_17.2: = bound_method %.loc12_16, %.loc12_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_17.3: = specific_function %.loc12_17.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.3(%.loc12_16) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.4: init %i32 = converted %.loc12_16, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %n.var, %.loc12_17.4 // CHECK:STDOUT: %.loc13_10: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_10) [template = constants.%i32] // CHECK:STDOUT: %.loc13_13.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] // CHECK:STDOUT: %.loc13_13.2: type = converted %int.make_type_signed.loc13, %.loc13_13.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_13.3: type = ptr_type %i32 [template = constants.%.26] -// CHECK:STDOUT: %p.var: ref %.26 = var p -// CHECK:STDOUT: %p: ref %.26 = bind_name p, %p.var +// CHECK:STDOUT: %.loc13_13.3: type = ptr_type %i32 [template = constants.%.30] +// CHECK:STDOUT: %p.var: ref %.30 = var p +// CHECK:STDOUT: %p: ref %.30 = bind_name p, %p.var // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n -// CHECK:STDOUT: %.loc13_17: %.26 = addr_of %n.ref +// CHECK:STDOUT: %.loc13_17: %.30 = addr_of %n.ref // CHECK:STDOUT: assign %p.var, %.loc13_17 -// CHECK:STDOUT: %p.ref: ref %.26 = name_ref p, %p -// CHECK:STDOUT: %.loc15_11: %.26 = bind_value %p.ref +// CHECK:STDOUT: %p.ref: ref %.30 = name_ref p, %p +// CHECK:STDOUT: %.loc15_11: %.30 = bind_value %p.ref // CHECK:STDOUT: %.loc15_10.1: ref %i32 = deref %.loc15_11 // CHECK:STDOUT: %.loc15_10.2: %i32 = bind_value %.loc15_10.1 // CHECK:STDOUT: return %.loc15_10.2 diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 771233b156f9..0da60f8c4150 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -32,11 +32,11 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: type = ptr_type %i32 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -65,22 +65,22 @@ var a: i32* = a_ref; // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_12) [template = constants.%i32] // CHECK:STDOUT: %.loc5_15.1: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_15.2: type = converted %int.make_type_signed.loc5, %.loc5_15.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_15.3: type = ptr_type %i32 [template = constants.%.26] -// CHECK:STDOUT: %a_ref.var: ref %.26 = var a_ref -// CHECK:STDOUT: %a_ref: ref %.26 = bind_name a_ref, %a_ref.var +// CHECK:STDOUT: %.loc5_15.3: type = ptr_type %i32 [template = constants.%.30] +// CHECK:STDOUT: %a_ref.var: ref %.30 = var a_ref +// CHECK:STDOUT: %a_ref: ref %.30 = bind_name a_ref, %a_ref.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_19: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_20.2: = bound_method %.loc4_19, %.loc4_20.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_20.3: = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_20.3(%.loc4_19) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_20.4: init %i32 = converted %.loc4_19, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.2: = bound_method %.loc4_19, %.loc4_20.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_20.3: = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc4_20.3(%.loc4_19) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_20.4: init %i32 = converted %.loc4_19, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign file.%a_orig.var, %.loc4_20.4 // CHECK:STDOUT: %a_orig.ref: ref %i32 = name_ref a_orig, file.%a_orig -// CHECK:STDOUT: %.loc5: %.26 = addr_of %a_orig.ref +// CHECK:STDOUT: %.loc5: %.30 = addr_of %a_orig.ref // CHECK:STDOUT: assign file.%a_ref.var, %.loc5 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -99,63 +99,67 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.9 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.9 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.16 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.16 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.26 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.26 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.33 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.33 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.17: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.17 [template] -// CHECK:STDOUT: %.18: type = ptr_type %i32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] +// CHECK:STDOUT: %.22: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+22, unloaded -// CHECK:STDOUT: %import_ref.2: ref %.18 = import_ref Implicit//default, inst+368, loaded +// CHECK:STDOUT: %import_ref.2: ref %.22 = import_ref Implicit//default, inst+374, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.37 // CHECK:STDOUT: import Core//prelude @@ -164,35 +168,35 @@ var a: i32* = a_ref; // CHECK:STDOUT: %import_ref.3 = import_ref Implicit//default, inst+37, unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Implicit//default, inst+38, unloaded // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+39, unloaded -// CHECK:STDOUT: %import_ref.6: type = import_ref Implicit//default, inst+81, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.7: type = import_ref Implicit//default, inst+82, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.8 = import_ref Implicit//default, inst+83, unloaded -// CHECK:STDOUT: %import_ref.9 = import_ref Implicit//default, inst+54, unloaded -// CHECK:STDOUT: %import_ref.10: type = import_ref Implicit//default, inst+111, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.11: type = import_ref Implicit//default, inst+112, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.12 = import_ref Implicit//default, inst+113, unloaded -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+140, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+141, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.15 = import_ref Implicit//default, inst+142, unloaded -// CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+172, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.18: type = import_ref Implicit//default, inst+173, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.19 = import_ref Implicit//default, inst+174, unloaded -// CHECK:STDOUT: %import_ref.20 = import_ref Implicit//default, inst+204, unloaded -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+205, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+206, unloaded -// CHECK:STDOUT: %import_ref.23: type = import_ref Implicit//default, inst+212, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+213, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.25 = import_ref Implicit//default, inst+214, unloaded -// CHECK:STDOUT: %import_ref.26 = import_ref Implicit//default, inst+229, unloaded -// CHECK:STDOUT: %import_ref.27: type = import_ref Implicit//default, inst+266, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.28: type = import_ref Implicit//default, inst+267, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+268, unloaded -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+295, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.31: type = import_ref Implicit//default, inst+296, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.32 = import_ref Implicit//default, inst+297, unloaded -// CHECK:STDOUT: %import_ref.34: type = import_ref Implicit//default, inst+327, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.35: type = import_ref Implicit//default, inst+328, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.36 = import_ref Implicit//default, inst+329, unloaded +// CHECK:STDOUT: %import_ref.6: type = import_ref Implicit//default, inst+84, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.7: type = import_ref Implicit//default, inst+85, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.8 = import_ref Implicit//default, inst+86, unloaded +// CHECK:STDOUT: %import_ref.9 = import_ref Implicit//default, inst+55, unloaded +// CHECK:STDOUT: %import_ref.10: type = import_ref Implicit//default, inst+114, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.11: type = import_ref Implicit//default, inst+115, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.12 = import_ref Implicit//default, inst+116, unloaded +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+143, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.14: type = import_ref Implicit//default, inst+144, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.15 = import_ref Implicit//default, inst+145, unloaded +// CHECK:STDOUT: %import_ref.17: type = import_ref Implicit//default, inst+175, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.18: type = import_ref Implicit//default, inst+176, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.19 = import_ref Implicit//default, inst+177, unloaded +// CHECK:STDOUT: %import_ref.20 = import_ref Implicit//default, inst+207, unloaded +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+208, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+209, unloaded +// CHECK:STDOUT: %import_ref.23: type = import_ref Implicit//default, inst+215, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.24: type = import_ref Implicit//default, inst+216, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.25 = import_ref Implicit//default, inst+217, unloaded +// CHECK:STDOUT: %import_ref.26 = import_ref Implicit//default, inst+233, unloaded +// CHECK:STDOUT: %import_ref.27: type = import_ref Implicit//default, inst+272, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.28: type = import_ref Implicit//default, inst+273, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.29 = import_ref Implicit//default, inst+274, unloaded +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+301, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.31: type = import_ref Implicit//default, inst+302, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.32 = import_ref Implicit//default, inst+303, unloaded +// CHECK:STDOUT: %import_ref.34: type = import_ref Implicit//default, inst+333, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.35: type = import_ref Implicit//default, inst+334, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.36 = import_ref Implicit//default, inst+335, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -205,13 +209,13 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_8: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_8: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc4_8) [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_11.3: type = ptr_type %i32 [template = constants.%.18] -// CHECK:STDOUT: %a.var: ref %.18 = var a -// CHECK:STDOUT: %a: ref %.18 = bind_name a, %a.var +// CHECK:STDOUT: %.loc4_11.3: type = ptr_type %i32 [template = constants.%.22] +// CHECK:STDOUT: %a.var: ref %.22 = var a +// CHECK:STDOUT: %a: ref %.22 = bind_name a, %a.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic interface @ImplicitAs(constants.%Dest: type) { @@ -223,8 +227,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.9 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -243,8 +247,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.26 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.26 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -263,7 +267,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.6 as imports.%import_ref.7 { // CHECK:STDOUT: !members: @@ -280,7 +284,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.10 as imports.%import_ref.11 { // CHECK:STDOUT: !members: @@ -296,7 +300,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.13 as imports.%import_ref.14 { // CHECK:STDOUT: !members: @@ -312,7 +316,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.17 as imports.%import_ref.18 { // CHECK:STDOUT: !members: @@ -329,7 +333,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.23 as imports.%import_ref.24 { // CHECK:STDOUT: !members: @@ -346,7 +350,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.27 as imports.%import_ref.28 { // CHECK:STDOUT: !members: @@ -362,7 +366,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.30 as imports.%import_ref.31 { // CHECK:STDOUT: !members: @@ -378,7 +382,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.34 as imports.%import_ref.35 { // CHECK:STDOUT: !members: @@ -390,8 +394,9 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -434,8 +439,9 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -476,8 +482,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.18 = name_ref a_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc4: %.18 = bind_value %a_ref.ref +// CHECK:STDOUT: %a_ref.ref: ref %.22 = name_ref a_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc4: %.22 = bind_value %a_ref.ref // CHECK:STDOUT: assign file.%a.var, %.loc4 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -525,6 +531,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -570,8 +577,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -651,6 +658,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -696,8 +704,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 7bd10ec6292f..862bc5f78e98 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -35,10 +35,10 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,12 +80,12 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc12_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index 93a00018c381..39c87fe6d628 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -45,26 +45,26 @@ fn G() -> C { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.27: type = unbound_element_type %C, %i32 [template] -// CHECK:STDOUT: %.28: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %.29: = complete_type_witness %.28 [template] +// CHECK:STDOUT: %.31: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %.32: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %.33: = complete_type_witness %.32 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.32: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.33: = bound_method %.26, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.36: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.35, %.38) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.36: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %.37: = bound_method %.30, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.40: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.39, %.42) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -111,13 +111,13 @@ fn G() -> C { // CHECK:STDOUT: %int.make_type_signed.loc23_18: init type = call constants.%Int(%.loc23_18.1) [template = constants.%i32] // CHECK:STDOUT: %.loc23_18.2: type = value_of_initializer %int.make_type_signed.loc23_18 [template = constants.%i32] // CHECK:STDOUT: %.loc23_18.3: type = converted %int.make_type_signed.loc23_18, %.loc23_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_16: %.27 = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc23_16: %.31 = field_decl a, element0 [template] // CHECK:STDOUT: %.loc23_30.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc23_30: init type = call constants.%Int(%.loc23_30.1) [template = constants.%i32] // CHECK:STDOUT: %.loc23_30.2: type = value_of_initializer %int.make_type_signed.loc23_30 [template = constants.%i32] // CHECK:STDOUT: %.loc23_30.3: type = converted %int.make_type_signed.loc23_30, %.loc23_30.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc23_28: %.27 = field_decl b, element1 [template] -// CHECK:STDOUT: %.loc23_35: = complete_type_witness %.28 [template = constants.%.29] +// CHECK:STDOUT: %.loc23_28: %.31 = field_decl b, element1 [template] +// CHECK:STDOUT: %.loc23_35: = complete_type_witness %.32 [template = constants.%.33] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C @@ -134,13 +134,13 @@ fn G() -> C { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc12_25: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_26.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_26.2: = bound_method %.loc12_25, %.loc12_26.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_26.3: = specific_function %.loc12_26.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_26.3(%.loc12_25) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_26.4: init %i32 = converted %.loc12_25, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc12_26.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_26.2: = bound_method %.loc12_25, %.loc12_26.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_26.3: = specific_function %.loc12_26.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_26.3(%.loc12_25) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_26.4: init %i32 = converted %.loc12_25, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: assign %v.var, %.loc12_26.4 -// CHECK:STDOUT: %.loc20: Core.IntLiteral = int_value 1 [template = constants.%.26] +// CHECK:STDOUT: %.loc20: Core.IntLiteral = int_value 1 [template = constants.%.30] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -148,23 +148,23 @@ fn G() -> C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %return -// CHECK:STDOUT: %.loc25_29: Core.IntLiteral = int_value 1 [template = constants.%.26] -// CHECK:STDOUT: %.loc25_37: Core.IntLiteral = int_value 2 [template = constants.%.31] -// CHECK:STDOUT: %.loc25_38.1: %.32 = struct_literal (%.loc25_29, %.loc25_37) -// CHECK:STDOUT: %.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_38.3: = bound_method %.loc25_29, %.loc25_38.2 [template = constants.%.33] -// CHECK:STDOUT: %.loc25_38.4: = specific_function %.loc25_38.3, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc25_38.1: init %i32 = call %.loc25_38.4(%.loc25_29) [template = constants.%.35] -// CHECK:STDOUT: %.loc25_38.5: init %i32 = converted %.loc25_29, %int.convert_checked.loc25_38.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc25_29: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %.loc25_37: Core.IntLiteral = int_value 2 [template = constants.%.35] +// CHECK:STDOUT: %.loc25_38.1: %.36 = struct_literal (%.loc25_29, %.loc25_37) +// CHECK:STDOUT: %.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_38.3: = bound_method %.loc25_29, %.loc25_38.2 [template = constants.%.37] +// CHECK:STDOUT: %.loc25_38.4: = specific_function %.loc25_38.3, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc25_38.1: init %i32 = call %.loc25_38.4(%.loc25_29) [template = constants.%.39] +// CHECK:STDOUT: %.loc25_38.5: init %i32 = converted %.loc25_29, %int.convert_checked.loc25_38.1 [template = constants.%.39] // CHECK:STDOUT: %.loc25_38.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc25_38.7: init %i32 = initialize_from %.loc25_38.5 to %.loc25_38.6 [template = constants.%.35] -// CHECK:STDOUT: %.loc25_38.8: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc25_38.9: = bound_method %.loc25_37, %.loc25_38.8 [template = constants.%.36] -// CHECK:STDOUT: %.loc25_38.10: = specific_function %.loc25_38.9, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc25_38.2: init %i32 = call %.loc25_38.10(%.loc25_37) [template = constants.%.38] -// CHECK:STDOUT: %.loc25_38.11: init %i32 = converted %.loc25_37, %int.convert_checked.loc25_38.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc25_38.7: init %i32 = initialize_from %.loc25_38.5 to %.loc25_38.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc25_38.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc25_38.9: = bound_method %.loc25_37, %.loc25_38.8 [template = constants.%.40] +// CHECK:STDOUT: %.loc25_38.10: = specific_function %.loc25_38.9, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc25_38.2: init %i32 = call %.loc25_38.10(%.loc25_37) [template = constants.%.42] +// CHECK:STDOUT: %.loc25_38.11: init %i32 = converted %.loc25_37, %int.convert_checked.loc25_38.2 [template = constants.%.42] // CHECK:STDOUT: %.loc25_38.12: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc25_38.13: init %i32 = initialize_from %.loc25_38.11 to %.loc25_38.12 [template = constants.%.38] +// CHECK:STDOUT: %.loc25_38.13: init %i32 = initialize_from %.loc25_38.11 to %.loc25_38.12 [template = constants.%.42] // CHECK:STDOUT: %.loc25_38.14: init %C = class_init (%.loc25_38.7, %.loc25_38.13), %return [template = constants.%struct] // CHECK:STDOUT: %.loc25_39: init %C = converted %.loc25_38.1, %.loc25_38.14 [template = constants.%struct] // CHECK:STDOUT: assign %return, %.loc25_39 diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index 9d4ebd599370..1eb68845cf35 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -53,14 +53,14 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] // CHECK:STDOUT: %DifferentScopes: %DifferentScopes.type = struct_value () [template] // CHECK:STDOUT: } @@ -118,11 +118,11 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc13_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_28.2: = bound_method %.loc13_27, %.loc13_28.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_28.3: = specific_function %.loc13_28.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_28.3(%.loc13_27) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_28.4: init %i32 = converted %.loc13_27, %int.convert_checked.loc13 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_28.2: = bound_method %.loc13_27, %.loc13_28.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_28.3: = specific_function %.loc13_28.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_28.3(%.loc13_27) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_28.4: init %i32 = converted %.loc13_27, %int.convert_checked.loc13 [template = constants.%.30] // CHECK:STDOUT: assign %v.var, %.loc13_28.4 // CHECK:STDOUT: %.loc21_21.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc21: init type = call constants.%Int(%.loc21_21.1) [template = constants.%i32] @@ -130,23 +130,23 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %.loc21_21.3: type = converted %int.make_type_signed.loc21, %.loc21_21.2 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc21_27: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc21_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc21_28.2: = bound_method %.loc21_27, %.loc21_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc21_28.3: = specific_function %.loc21_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_28.3(%.loc21_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc21_28.4: init %i32 = converted %.loc21_27, %int.convert_checked.loc21 [template = constants.%.30] +// CHECK:STDOUT: %.loc21_27: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc21_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc21_28.2: = bound_method %.loc21_27, %.loc21_28.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc21_28.3: = specific_function %.loc21_28.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %.loc21_28.3(%.loc21_27) [template = constants.%.34] +// CHECK:STDOUT: %.loc21_28.4: init %i32 = converted %.loc21_27, %int.convert_checked.loc21 [template = constants.%.34] // CHECK:STDOUT: assign %w.var, %.loc21_28.4 // CHECK:STDOUT: br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %.loc23_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_11.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_11.2: = bound_method %.loc23_10, %.loc23_11.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc23_11.3: = specific_function %.loc23_11.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_11.3(%.loc23_10) [template = constants.%.26] -// CHECK:STDOUT: %.loc23_11.4: %i32 = value_of_initializer %int.convert_checked.loc23 [template = constants.%.26] -// CHECK:STDOUT: %.loc23_11.5: %i32 = converted %.loc23_10, %.loc23_11.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc23_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc23_11.2: = bound_method %.loc23_10, %.loc23_11.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc23_11.3: = specific_function %.loc23_11.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_11.3(%.loc23_10) [template = constants.%.30] +// CHECK:STDOUT: %.loc23_11.4: %i32 = value_of_initializer %int.convert_checked.loc23 [template = constants.%.30] +// CHECK:STDOUT: %.loc23_11.5: %i32 = converted %.loc23_10, %.loc23_11.4 [template = constants.%.30] // CHECK:STDOUT: return %.loc23_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -163,11 +163,11 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc28_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc28_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc28_28.2: = bound_method %.loc28_27, %.loc28_28.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc28_28.3: = specific_function %.loc28_28.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_28.3(%.loc28_27) [template = constants.%.26] -// CHECK:STDOUT: %.loc28_28.4: init %i32 = converted %.loc28_27, %int.convert_checked.loc28 [template = constants.%.26] +// CHECK:STDOUT: %.loc28_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc28_28.2: = bound_method %.loc28_27, %.loc28_28.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc28_28.3: = specific_function %.loc28_28.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_28.3(%.loc28_27) [template = constants.%.30] +// CHECK:STDOUT: %.loc28_28.4: init %i32 = converted %.loc28_27, %int.convert_checked.loc28 [template = constants.%.30] // CHECK:STDOUT: assign %v.var, %.loc28_28.4 // CHECK:STDOUT: %.loc29: bool = bool_literal true [template = constants.%.2] // CHECK:STDOUT: if %.loc29 br !if.then.loc29 else br !if.else.loc29 @@ -179,12 +179,12 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %.loc36_23.3: type = converted %int.make_type_signed.loc36, %.loc36_23.2 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc36_29: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc36_30.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc36_30.2: = bound_method %.loc36_29, %.loc36_30.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc36_30.3: = specific_function %.loc36_30.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %.loc36_30.3(%.loc36_29) [template = constants.%.30] -// CHECK:STDOUT: %.loc36_30.4: init %i32 = converted %.loc36_29, %int.convert_checked.loc36 [template = constants.%.30] +// CHECK:STDOUT: %.loc36_29: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc36_30.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc36_30.2: = bound_method %.loc36_29, %.loc36_30.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc36_30.3: = specific_function %.loc36_30.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %.loc36_30.3(%.loc36_29) [template = constants.%.34] +// CHECK:STDOUT: %.loc36_30.4: init %i32 = converted %.loc36_29, %int.convert_checked.loc36 [template = constants.%.34] // CHECK:STDOUT: assign %w.var, %.loc36_30.4 // CHECK:STDOUT: br !if.else.loc29 // CHECK:STDOUT: @@ -193,12 +193,12 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: // CHECK:STDOUT: %.loc39_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc39_11.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc39_11.2: = bound_method %.loc39_10, %.loc39_11.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc39_11.3: = specific_function %.loc39_11.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc39: init %i32 = call %.loc39_11.3(%.loc39_10) [template = constants.%.26] -// CHECK:STDOUT: %.loc39_11.4: %i32 = value_of_initializer %int.convert_checked.loc39 [template = constants.%.26] -// CHECK:STDOUT: %.loc39_11.5: %i32 = converted %.loc39_10, %.loc39_11.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc39_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc39_11.2: = bound_method %.loc39_10, %.loc39_11.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc39_11.3: = specific_function %.loc39_11.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc39: init %i32 = call %.loc39_11.3(%.loc39_10) [template = constants.%.30] +// CHECK:STDOUT: %.loc39_11.4: %i32 = value_of_initializer %int.convert_checked.loc39 [template = constants.%.30] +// CHECK:STDOUT: %.loc39_11.5: %i32 = converted %.loc39_10, %.loc39_11.4 [template = constants.%.30] // CHECK:STDOUT: return %.loc39_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon index bc35e74760dc..abd1e22646e6 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -75,20 +75,22 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %ImplicitAs: %ImplicitAs.type.1 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.2: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] -// CHECK:STDOUT: %.3: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.3 [template] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic] +// CHECK:STDOUT: %.4: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.4 [template] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.4: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] -// CHECK:STDOUT: %.5: %.4 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] -// CHECK:STDOUT: %.6: = interface_witness (%Convert.2) [template] +// CHECK:STDOUT: %.5: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.3 [template] +// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, @ImplicitAs.%Convert.decl [template] +// CHECK:STDOUT: %.7: %ImplicitAs.type.2 = facet_value Core.IntLiteral, Core.IntLiteral [symbolic] +// CHECK:STDOUT: %.8: = interface_witness (%Convert.2) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -132,7 +134,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc12_17.2: type = converted %int_literal.make_type, %.loc12_17.1 [template = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] -// CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_33) [template = constants.%i32] // CHECK:STDOUT: %.loc12_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc12_32.2: type = converted %int.make_type_signed, %.loc12_32.1 [template = constants.%i32] @@ -149,28 +151,28 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T.loc8_22.2) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.loc9_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.loc9_32.2 (constants.%.1)] -// CHECK:STDOUT: %.loc9_32.3: @ImplicitAs.%.loc9_32.2 (%.1) = assoc_entity element0, %Convert.decl [symbolic = %.loc9_32.3 (constants.%.2)] +// CHECK:STDOUT: %.loc9_32.2: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.loc9_32.2 (constants.%.2)] +// CHECK:STDOUT: %.loc9_32.3: @ImplicitAs.%.loc9_32.2 (%.2) = assoc_entity element0, %Convert.decl [symbolic = %.loc9_32.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.1) = fn_decl @Convert.1 [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] { -// CHECK:STDOUT: %self.patt: @Convert.1.%Self (%Self) = binding_pattern self -// CHECK:STDOUT: %self.param_patt: @Convert.1.%Self (%Self) = value_param_pattern %self.patt, runtime_param0 +// CHECK:STDOUT: %self.patt: @Convert.1.%.loc9_20.1 (%.1) = binding_pattern self +// CHECK:STDOUT: %self.param_patt: @Convert.1.%.loc9_20.1 (%.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_20.1: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc9_20.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_20.2: type = facet_type_access %Self.ref [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %.loc9_20.3: type = converted %Self.ref, %.loc9_20.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc9_20.2: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc9_20.2 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc9_20.3: type = facet_access_type %Self.ref [symbolic = %.loc9_20.1 (constants.%.1)] +// CHECK:STDOUT: %.loc9_20.4: type = converted %Self.ref, %.loc9_20.3 [symbolic = %.loc9_20.1 (constants.%.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc8_22.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %self.param: @Convert.1.%Self (%Self) = value_param runtime_param0 -// CHECK:STDOUT: %self: @Convert.1.%Self (%Self) = bind_name self, %self.param +// CHECK:STDOUT: %self.param: @Convert.1.%.loc9_20.1 (%.1) = value_param runtime_param0 +// CHECK:STDOUT: %self: @Convert.1.%.loc9_20.1 (%.1) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_32.1: @ImplicitAs.%.loc9_32.2 (%.1) = assoc_entity element0, %Convert.decl [symbolic = %.loc9_32.3 (constants.%.2)] +// CHECK:STDOUT: %.loc9_32.1: @ImplicitAs.%.loc9_32.2 (%.2) = assoc_entity element0, %Convert.decl [symbolic = %.loc9_32.3 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self.1 @@ -187,7 +189,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { // CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc12_17.2 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_31.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc13_31.1) [template = constants.%i32] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc13_31.3: type = converted %int.make_type_signed, %.loc13_31.2 [template = constants.%i32] @@ -196,7 +198,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_38: = interface_witness (%Convert.decl) [template = constants.%.6] +// CHECK:STDOUT: %.loc12_38: = interface_witness (%Convert.decl) [template = constants.%.8] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -211,8 +213,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %.loc9_20.1: type = facet_access_type %Self [symbolic = %.loc9_20.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.loc9_20.1 (%.1)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; @@ -231,6 +234,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self +// CHECK:STDOUT: %.loc9_20.1 => constants.%.1 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(%T.loc8_22.2) { @@ -247,14 +251,15 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2 => constants.%Self // CHECK:STDOUT: %Convert.type => constants.%Convert.type.3 // CHECK:STDOUT: %Convert => constants.%Convert.3 -// CHECK:STDOUT: %.loc9_32.2 => constants.%.4 -// CHECK:STDOUT: %.loc9_32.3 => constants.%.5 +// CHECK:STDOUT: %.loc9_32.2 => constants.%.5 +// CHECK:STDOUT: %.loc9_32.3 => constants.%.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%i32, Core.IntLiteral) { +// CHECK:STDOUT: specific @Convert.1(constants.%i32, constants.%.7) { // CHECK:STDOUT: %T => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.3 -// CHECK:STDOUT: %Self => Core.IntLiteral +// CHECK:STDOUT: %Self => constants.%.7 +// CHECK:STDOUT: %.loc9_20.1 => Core.IntLiteral // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- library.carbon @@ -288,78 +293,88 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.10: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.6 [symbolic] +// CHECK:STDOUT: %.13: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.12: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.14: %.10 = assoc_entity element0, imports.%import_ref.7 [symbolic] +// CHECK:STDOUT: %.14: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.16: %.11 = assoc_entity element0, imports.%import_ref.7 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.15: = interface_witness (%Convert.3) [template] -// CHECK:STDOUT: %.16: = bound_method %.8, %Convert.3 [template] -// CHECK:STDOUT: %.17: %i32 = int_value 0 [template] -// CHECK:STDOUT: %struct: %D = struct_value (%.17, %.17) [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.17) [template] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %.18: = bound_method %.8, %Convert.3 [template] +// CHECK:STDOUT: %.19: %i32 = int_value 0 [template] +// CHECK:STDOUT: %struct: %D = struct_value (%.19, %.19) [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.19) [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.6 [template] -// CHECK:STDOUT: %.20: = interface_witness (%Convert.4) [template] -// CHECK:STDOUT: %.22: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.23: = bound_method %.22, %Convert.3 [template] -// CHECK:STDOUT: %.24: %i32 = int_value 1 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.24) [template] +// CHECK:STDOUT: %.20: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.5 [template] +// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.6 [template] +// CHECK:STDOUT: %.22: %ImplicitAs.type.2 = facet_value %C.3, %C.3 [symbolic] +// CHECK:STDOUT: %.23: = interface_witness (%Convert.4) [template] +// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.26: = bound_method %.25, %Convert.3 [template] +// CHECK:STDOUT: %.27: %i32 = int_value 1 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.27) [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.25: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.27: = bound_method %.26, %Convert.3 [template] -// CHECK:STDOUT: %.28: %i32 = int_value 2 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.28) [template] +// CHECK:STDOUT: %.28: %ImplicitAs.type.2 = facet_value %C.4, %C.4 [symbolic] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.3 [template] +// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.32) [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.3 [template] -// CHECK:STDOUT: %.32: %i32 = int_value 3 [template] -// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.32) [template] +// CHECK:STDOUT: %.33: %ImplicitAs.type.2 = facet_value %C.5, %C.5 [symbolic] +// CHECK:STDOUT: %.34: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.3 [template] +// CHECK:STDOUT: %.37: %i32 = int_value 3 [template] +// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.37) [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.3 [template] -// CHECK:STDOUT: %.36: %i32 = int_value 4 [template] -// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.36) [template] +// CHECK:STDOUT: %.38: %ImplicitAs.type.2 = facet_value %C.6, %C.6 [symbolic] +// CHECK:STDOUT: %.39: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.3 [template] +// CHECK:STDOUT: %.42: %i32 = int_value 4 [template] +// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.42) [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %.37: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.39: = bound_method %.38, %Convert.3 [template] -// CHECK:STDOUT: %.40: %i32 = int_value 5 [template] -// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.40) [template] +// CHECK:STDOUT: %.43: %ImplicitAs.type.2 = facet_value %C.7, %C.7 [symbolic] +// CHECK:STDOUT: %.44: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.3 [template] +// CHECK:STDOUT: %.47: %i32 = int_value 5 [template] +// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.47) [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %.41: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.3 [template] -// CHECK:STDOUT: %.44: %i32 = int_value 6 [template] -// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.44) [template] +// CHECK:STDOUT: %.48: %ImplicitAs.type.2 = facet_value %C.8, %C.8 [symbolic] +// CHECK:STDOUT: %.49: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %.50: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %.51: = bound_method %.50, %Convert.3 [template] +// CHECK:STDOUT: %.52: %i32 = int_value 6 [template] +// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.52) [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.45: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.47: = bound_method %.46, %Convert.3 [template] -// CHECK:STDOUT: %.48: %i32 = int_value 7 [template] -// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.48) [template] +// CHECK:STDOUT: %.53: %ImplicitAs.type.2 = facet_value %C.9, %C.9 [symbolic] +// CHECK:STDOUT: %.54: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %.55: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %.56: = bound_method %.55, %Convert.3 [template] +// CHECK:STDOUT: %.57: %i32 = int_value 7 [template] +// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.57) [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10 [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %.49: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %.58: %ImplicitAs.type.2 = facet_value %C.10, %C.10 [symbolic] +// CHECK:STDOUT: %.59: = interface_witness (%Convert.12) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -370,12 +385,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//default, inst+30, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst+36, unloaded -// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.10) = import_ref Core//default, inst+58, loaded [symbolic = @ImplicitAs.%.2 (constants.%.14)] -// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.type (%Convert.type.1) = import_ref Core//default, inst+51, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] -// CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+51, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Core//default, inst+69, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Core//default, inst+77, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.10: = import_ref Core//default, inst+100, loaded [template = constants.%.15] +// CHECK:STDOUT: %import_ref.4: @ImplicitAs.%.1 (%.11) = import_ref Core//default, inst+60, loaded [symbolic = @ImplicitAs.%.2 (constants.%.16)] +// CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.type (%Convert.type.1) = import_ref Core//default, inst+52, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] +// CHECK:STDOUT: %import_ref.6 = import_ref Core//default, inst+52, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Core//default, inst+71, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Core//default, inst+79, loaded [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %import_ref.10: = import_ref Core//default, inst+103, loaded [template = constants.%.17] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -409,12 +424,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc10_8: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc10_7.2: = bound_method %.loc10_8, %.loc10_7.1 [template = constants.%.16] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_7.2(%.loc10_8) [template = constants.%.17] -// CHECK:STDOUT: %.loc10_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.17] -// CHECK:STDOUT: %.loc10_7.4: %i32 = converted %.loc10_8, %.loc10_7.3 [template = constants.%.17] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.17) [template = constants.%C.3] +// CHECK:STDOUT: %.loc10_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc10_7.2: = bound_method %.loc10_8, %.loc10_7.1 [template = constants.%.18] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_7.2(%.loc10_8) [template = constants.%.19] +// CHECK:STDOUT: %.loc10_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.19] +// CHECK:STDOUT: %.loc10_7.4: %i32 = converted %.loc10_8, %.loc10_7.3 [template = constants.%.19] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.19) [template = constants.%C.3] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -422,13 +437,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_8: Core.IntLiteral = int_value 1 [template = constants.%.22] -// CHECK:STDOUT: %.loc11_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc11_7.2: = bound_method %.loc11_8, %.loc11_7.1 [template = constants.%.23] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_7.2(%.loc11_8) [template = constants.%.24] -// CHECK:STDOUT: %.loc11_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.24] -// CHECK:STDOUT: %.loc11_7.4: %i32 = converted %.loc11_8, %.loc11_7.3 [template = constants.%.24] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.24) [template = constants.%C.4] +// CHECK:STDOUT: %.loc11_8: Core.IntLiteral = int_value 1 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc11_7.2: = bound_method %.loc11_8, %.loc11_7.1 [template = constants.%.26] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_7.2(%.loc11_8) [template = constants.%.27] +// CHECK:STDOUT: %.loc11_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] +// CHECK:STDOUT: %.loc11_7.4: %i32 = converted %.loc11_8, %.loc11_7.3 [template = constants.%.27] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.27) [template = constants.%C.4] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -436,13 +451,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_8: Core.IntLiteral = int_value 2 [template = constants.%.26] -// CHECK:STDOUT: %.loc12_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc12_7.2: = bound_method %.loc12_8, %.loc12_7.1 [template = constants.%.27] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_7.2(%.loc12_8) [template = constants.%.28] -// CHECK:STDOUT: %.loc12_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.28] -// CHECK:STDOUT: %.loc12_7.4: %i32 = converted %.loc12_8, %.loc12_7.3 [template = constants.%.28] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.28) [template = constants.%C.5] +// CHECK:STDOUT: %.loc12_8: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc12_7.2: = bound_method %.loc12_8, %.loc12_7.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_7.2(%.loc12_8) [template = constants.%.32] +// CHECK:STDOUT: %.loc12_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc12_7.4: %i32 = converted %.loc12_8, %.loc12_7.3 [template = constants.%.32] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.32) [template = constants.%C.5] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -450,13 +465,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_8: Core.IntLiteral = int_value 3 [template = constants.%.30] -// CHECK:STDOUT: %.loc13_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc13_7.2: = bound_method %.loc13_8, %.loc13_7.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_7.2(%.loc13_8) [template = constants.%.32] -// CHECK:STDOUT: %.loc13_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc13_7.4: %i32 = converted %.loc13_8, %.loc13_7.3 [template = constants.%.32] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.32) [template = constants.%C.6] +// CHECK:STDOUT: %.loc13_8: Core.IntLiteral = int_value 3 [template = constants.%.35] +// CHECK:STDOUT: %.loc13_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc13_7.2: = bound_method %.loc13_8, %.loc13_7.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_7.2(%.loc13_8) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.37] +// CHECK:STDOUT: %.loc13_7.4: %i32 = converted %.loc13_8, %.loc13_7.3 [template = constants.%.37] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.37) [template = constants.%C.6] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -464,13 +479,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.6 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_8: Core.IntLiteral = int_value 4 [template = constants.%.34] -// CHECK:STDOUT: %.loc14_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc14_7.2: = bound_method %.loc14_8, %.loc14_7.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_7.2(%.loc14_8) [template = constants.%.36] -// CHECK:STDOUT: %.loc14_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.36] -// CHECK:STDOUT: %.loc14_7.4: %i32 = converted %.loc14_8, %.loc14_7.3 [template = constants.%.36] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.36) [template = constants.%C.7] +// CHECK:STDOUT: %.loc14_8: Core.IntLiteral = int_value 4 [template = constants.%.40] +// CHECK:STDOUT: %.loc14_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc14_7.2: = bound_method %.loc14_8, %.loc14_7.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_7.2(%.loc14_8) [template = constants.%.42] +// CHECK:STDOUT: %.loc14_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.42] +// CHECK:STDOUT: %.loc14_7.4: %i32 = converted %.loc14_8, %.loc14_7.3 [template = constants.%.42] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.42) [template = constants.%C.7] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -478,13 +493,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.7 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc15_8: Core.IntLiteral = int_value 5 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc15_7.2: = bound_method %.loc15_8, %.loc15_7.1 [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_7.2(%.loc15_8) [template = constants.%.40] -// CHECK:STDOUT: %.loc15_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.40] -// CHECK:STDOUT: %.loc15_7.4: %i32 = converted %.loc15_8, %.loc15_7.3 [template = constants.%.40] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.40) [template = constants.%C.8] +// CHECK:STDOUT: %.loc15_8: Core.IntLiteral = int_value 5 [template = constants.%.45] +// CHECK:STDOUT: %.loc15_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc15_7.2: = bound_method %.loc15_8, %.loc15_7.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_7.2(%.loc15_8) [template = constants.%.47] +// CHECK:STDOUT: %.loc15_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.47] +// CHECK:STDOUT: %.loc15_7.4: %i32 = converted %.loc15_8, %.loc15_7.3 [template = constants.%.47] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.47) [template = constants.%C.8] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -492,13 +507,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.8 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc16_8: Core.IntLiteral = int_value 6 [template = constants.%.42] -// CHECK:STDOUT: %.loc16_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc16_7.2: = bound_method %.loc16_8, %.loc16_7.1 [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_7.2(%.loc16_8) [template = constants.%.44] -// CHECK:STDOUT: %.loc16_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.44] -// CHECK:STDOUT: %.loc16_7.4: %i32 = converted %.loc16_8, %.loc16_7.3 [template = constants.%.44] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.44) [template = constants.%C.9] +// CHECK:STDOUT: %.loc16_8: Core.IntLiteral = int_value 6 [template = constants.%.50] +// CHECK:STDOUT: %.loc16_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc16_7.2: = bound_method %.loc16_8, %.loc16_7.1 [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_7.2(%.loc16_8) [template = constants.%.52] +// CHECK:STDOUT: %.loc16_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.52] +// CHECK:STDOUT: %.loc16_7.4: %i32 = converted %.loc16_8, %.loc16_7.3 [template = constants.%.52] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.52) [template = constants.%C.9] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -506,13 +521,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.9 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc17_8: Core.IntLiteral = int_value 7 [template = constants.%.46] -// CHECK:STDOUT: %.loc17_7.1: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc17_7.2: = bound_method %.loc17_8, %.loc17_7.1 [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_7.2(%.loc17_8) [template = constants.%.48] -// CHECK:STDOUT: %.loc17_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.48] -// CHECK:STDOUT: %.loc17_7.4: %i32 = converted %.loc17_8, %.loc17_7.3 [template = constants.%.48] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.48) [template = constants.%C.10] +// CHECK:STDOUT: %.loc17_8: Core.IntLiteral = int_value 7 [template = constants.%.55] +// CHECK:STDOUT: %.loc17_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc17_7.2: = bound_method %.loc17_8, %.loc17_7.1 [template = constants.%.56] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_7.2(%.loc17_8) [template = constants.%.57] +// CHECK:STDOUT: %.loc17_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.57] +// CHECK:STDOUT: %.loc17_7.4: %i32 = converted %.loc17_8, %.loc17_7.3 [template = constants.%.57] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.57) [template = constants.%C.10] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] @@ -529,8 +544,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.10)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.11)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.11) = assoc_entity element0, imports.%import_ref.6 [symbolic = %.2 (constants.%.12)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -559,7 +574,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_33: = interface_witness (%Convert.decl) [template = constants.%.20] +// CHECK:STDOUT: %.loc10_33: = interface_witness (%Convert.decl) [template = constants.%.23] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -580,7 +595,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_33: = interface_witness (%Convert.decl) [template = constants.%.25] +// CHECK:STDOUT: %.loc11_33: = interface_witness (%Convert.decl) [template = constants.%.29] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -601,7 +616,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc12_33: = interface_witness (%Convert.decl) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_33: = interface_witness (%Convert.decl) [template = constants.%.34] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -622,7 +637,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc13_33: = interface_witness (%Convert.decl) [template = constants.%.33] +// CHECK:STDOUT: %.loc13_33: = interface_witness (%Convert.decl) [template = constants.%.39] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -643,7 +658,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_33: = interface_witness (%Convert.decl) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_33: = interface_witness (%Convert.decl) [template = constants.%.44] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -664,7 +679,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_33: = interface_witness (%Convert.decl) [template = constants.%.41] +// CHECK:STDOUT: %.loc15_33: = interface_witness (%Convert.decl) [template = constants.%.49] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -685,7 +700,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc16_33: = interface_witness (%Convert.decl) [template = constants.%.45] +// CHECK:STDOUT: %.loc16_33: = interface_witness (%Convert.decl) [template = constants.%.54] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -706,7 +721,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc17_33: = interface_witness (%Convert.decl) [template = constants.%.49] +// CHECK:STDOUT: %.loc17_33: = interface_witness (%Convert.decl) [template = constants.%.59] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Convert = %Convert.decl @@ -753,18 +768,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc8_31: Core.IntLiteral = int_value 0 [template = constants.%.8] // CHECK:STDOUT: %.loc8_39: Core.IntLiteral = int_value 0 [template = constants.%.8] // CHECK:STDOUT: %.loc8_40.1: %.9 = struct_literal (%.loc8_31, %.loc8_39) -// CHECK:STDOUT: %.loc8_40.2: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_40.3: = bound_method %.loc8_31, %.loc8_40.2 [template = constants.%.16] -// CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32 = call %.loc8_40.3(%.loc8_31) [template = constants.%.17] -// CHECK:STDOUT: %.loc8_40.4: init %i32 = converted %.loc8_31, %int.convert_checked.loc8_40.1 [template = constants.%.17] +// CHECK:STDOUT: %.loc8_40.2: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc8_40.3: = bound_method %.loc8_31, %.loc8_40.2 [template = constants.%.18] +// CHECK:STDOUT: %int.convert_checked.loc8_40.1: init %i32 = call %.loc8_40.3(%.loc8_31) [template = constants.%.19] +// CHECK:STDOUT: %.loc8_40.4: init %i32 = converted %.loc8_31, %int.convert_checked.loc8_40.1 [template = constants.%.19] // CHECK:STDOUT: %.loc8_40.5: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc8_40.6: init %i32 = initialize_from %.loc8_40.4 to %.loc8_40.5 [template = constants.%.17] -// CHECK:STDOUT: %.loc8_40.7: %Convert.type.2 = interface_witness_access constants.%.15, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_40.8: = bound_method %.loc8_39, %.loc8_40.7 [template = constants.%.16] -// CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32 = call %.loc8_40.8(%.loc8_39) [template = constants.%.17] -// CHECK:STDOUT: %.loc8_40.9: init %i32 = converted %.loc8_39, %int.convert_checked.loc8_40.2 [template = constants.%.17] +// CHECK:STDOUT: %.loc8_40.6: init %i32 = initialize_from %.loc8_40.4 to %.loc8_40.5 [template = constants.%.19] +// CHECK:STDOUT: %.loc8_40.7: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc8_40.8: = bound_method %.loc8_39, %.loc8_40.7 [template = constants.%.18] +// CHECK:STDOUT: %int.convert_checked.loc8_40.2: init %i32 = call %.loc8_40.8(%.loc8_39) [template = constants.%.19] +// CHECK:STDOUT: %.loc8_40.9: init %i32 = converted %.loc8_39, %int.convert_checked.loc8_40.2 [template = constants.%.19] // CHECK:STDOUT: %.loc8_40.10: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc8_40.11: init %i32 = initialize_from %.loc8_40.9 to %.loc8_40.10 [template = constants.%.17] +// CHECK:STDOUT: %.loc8_40.11: init %i32 = initialize_from %.loc8_40.9 to %.loc8_40.10 [template = constants.%.19] // CHECK:STDOUT: %.loc8_40.12: init %D = class_init (%.loc8_40.6, %.loc8_40.11), %return [template = constants.%struct] // CHECK:STDOUT: %.loc8_41: init %D = converted %.loc8_40.1, %.loc8_40.12 [template = constants.%struct] // CHECK:STDOUT: return %.loc8_41 to %return @@ -774,8 +789,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.10)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; @@ -868,6 +884,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { @@ -879,13 +896,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.12 -// CHECK:STDOUT: %.2 => constants.%.13 +// CHECK:STDOUT: %.1 => constants.%.14 +// CHECK:STDOUT: %.2 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.17) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.17 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.17 +// CHECK:STDOUT: specific @C(constants.%.19) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.19 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.19 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -899,40 +916,29 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 +// CHECK:STDOUT: %.1 => constants.%.20 +// CHECK:STDOUT: %.2 => constants.%.21 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.3) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.22) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.3 +// CHECK:STDOUT: %Self => constants.%.22 +// CHECK:STDOUT: %.1 => constants.%C.3 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.24) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.24 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.24 +// CHECK:STDOUT: specific @C(constants.%.27) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.27 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.27 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.4) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.28) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.4 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.28) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.28 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.28 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.5) { -// CHECK:STDOUT: %T => constants.%D -// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.5 +// CHECK:STDOUT: %Self => constants.%.28 +// CHECK:STDOUT: %.1 => constants.%C.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%.32) { @@ -942,62 +948,81 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.6) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.33) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.6 +// CHECK:STDOUT: %Self => constants.%.33 +// CHECK:STDOUT: %.1 => constants.%C.5 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.36) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.36 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.36 +// CHECK:STDOUT: specific @C(constants.%.37) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.37 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.37 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.7) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.38) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.7 +// CHECK:STDOUT: %Self => constants.%.38 +// CHECK:STDOUT: %.1 => constants.%C.6 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.40) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.40 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.40 +// CHECK:STDOUT: specific @C(constants.%.42) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.42 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.42 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.8) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.43) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.8 +// CHECK:STDOUT: %Self => constants.%.43 +// CHECK:STDOUT: %.1 => constants.%C.7 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.44) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.44 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.44 +// CHECK:STDOUT: specific @C(constants.%.47) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.47 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.47 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.9) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.48) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.9 +// CHECK:STDOUT: %Self => constants.%.48 +// CHECK:STDOUT: %.1 => constants.%C.8 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.48) { -// CHECK:STDOUT: %N.loc6_9.2 => constants.%.48 -// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.48 +// CHECK:STDOUT: specific @C(constants.%.52) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.52 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.52 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%C.10) { +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.53) { // CHECK:STDOUT: %T => constants.%D // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 -// CHECK:STDOUT: %Self => constants.%C.10 +// CHECK:STDOUT: %Self => constants.%.53 +// CHECK:STDOUT: %.1 => constants.%C.9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%.57) { +// CHECK:STDOUT: %N.loc6_9.2 => constants.%.57 +// CHECK:STDOUT: %N.patt.loc6_9.2 => constants.%.57 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @Convert.1(constants.%D, constants.%.58) { +// CHECK:STDOUT: %T => constants.%D +// CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.4 +// CHECK:STDOUT: %Self => constants.%.58 +// CHECK:STDOUT: %.1 => constants.%C.10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- user.carbon @@ -1024,85 +1049,87 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %.9: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.10: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.11: %.10 = assoc_entity element0, imports.%import_ref.12 [symbolic] +// CHECK:STDOUT: %.12: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %ImplicitAs.type.3: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [template] -// CHECK:STDOUT: %.11: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] -// CHECK:STDOUT: %.12: %.11 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.13: %.9 = assoc_entity element0, imports.%import_ref.13 [symbolic] +// CHECK:STDOUT: %.13: type = assoc_entity_type %ImplicitAs.type.3, %Convert.type.2 [template] +// CHECK:STDOUT: %.14: %.13 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.15: %.10 = assoc_entity element0, imports.%import_ref.13 [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.2 [template] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [template] -// CHECK:STDOUT: %.14: = interface_witness (%Convert.3) [template] -// CHECK:STDOUT: %.15: = bound_method %.8, %Convert.3 [template] -// CHECK:STDOUT: %.16: %i32 = int_value 0 [template] -// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.16) [template] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.3) [template] +// CHECK:STDOUT: %.17: = bound_method %.8, %Convert.3 [template] +// CHECK:STDOUT: %.18: %i32 = int_value 0 [template] +// CHECK:STDOUT: %C.3: type = class_type @C, @C(%.18) [template] // CHECK:STDOUT: %struct.1: %C.3 = struct_value () [template] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%D)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.1, @ImplicitAs(%D) [template] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [template] -// CHECK:STDOUT: %.18: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.4 [template] -// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.12 [template] -// CHECK:STDOUT: %.20: %i32 = int_value 1 [template] -// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.20) [template] -// CHECK:STDOUT: %.21: %i32 = int_value 2 [template] -// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.21) [template] -// CHECK:STDOUT: %.22: %i32 = int_value 3 [template] -// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.22) [template] -// CHECK:STDOUT: %.23: %i32 = int_value 4 [template] -// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.23) [template] -// CHECK:STDOUT: %.24: %i32 = int_value 5 [template] -// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.24) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 6 [template] -// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.25) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 7 [template] -// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.26) [template] +// CHECK:STDOUT: %.20: type = assoc_entity_type %ImplicitAs.type.4, %Convert.type.4 [template] +// CHECK:STDOUT: %.21: %.20 = assoc_entity element0, imports.%import_ref.12 [template] +// CHECK:STDOUT: %.22: %i32 = int_value 1 [template] +// CHECK:STDOUT: %C.4: type = class_type @C, @C(%.22) [template] +// CHECK:STDOUT: %.23: %i32 = int_value 2 [template] +// CHECK:STDOUT: %C.5: type = class_type @C, @C(%.23) [template] +// CHECK:STDOUT: %.24: %i32 = int_value 3 [template] +// CHECK:STDOUT: %C.6: type = class_type @C, @C(%.24) [template] +// CHECK:STDOUT: %.25: %i32 = int_value 4 [template] +// CHECK:STDOUT: %C.7: type = class_type @C, @C(%.25) [template] +// CHECK:STDOUT: %.26: %i32 = int_value 5 [template] +// CHECK:STDOUT: %C.8: type = class_type @C, @C(%.26) [template] +// CHECK:STDOUT: %.27: %i32 = int_value 6 [template] +// CHECK:STDOUT: %C.9: type = class_type @C, @C(%.27) [template] +// CHECK:STDOUT: %.28: %i32 = int_value 7 [template] +// CHECK:STDOUT: %C.10: type = class_type @C, @C(%.28) [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.5) [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.29: = bound_method %.28, %Convert.3 [template] +// CHECK:STDOUT: %.29: = interface_witness (%Convert.5) [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.31: = bound_method %.30, %Convert.3 [template] // CHECK:STDOUT: %struct.2: %C.4 = struct_value () [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] -// CHECK:STDOUT: %.30: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.3 [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.6) [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.34: = bound_method %.33, %Convert.3 [template] // CHECK:STDOUT: %struct.3: %C.5 = struct_value () [template] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.5 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] -// CHECK:STDOUT: %.33: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.35: = bound_method %.34, %Convert.3 [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.7) [template] +// CHECK:STDOUT: %.36: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.37: = bound_method %.36, %Convert.3 [template] // CHECK:STDOUT: %struct.4: %C.6 = struct_value () [template] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.6 [template] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [template] -// CHECK:STDOUT: %.36: = interface_witness (%Convert.8) [template] -// CHECK:STDOUT: %.37: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.38: = bound_method %.37, %Convert.3 [template] +// CHECK:STDOUT: %.38: = interface_witness (%Convert.8) [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.3 [template] // CHECK:STDOUT: %struct.5: %C.7 = struct_value () [template] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.7 [template] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %.39: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %.40: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %.41: = bound_method %.40, %Convert.3 [template] +// CHECK:STDOUT: %.41: = interface_witness (%Convert.9) [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %.43: = bound_method %.42, %Convert.3 [template] // CHECK:STDOUT: %struct.6: %C.8 = struct_value () [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.8 [template] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %.42: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %.44: = bound_method %.43, %Convert.3 [template] +// CHECK:STDOUT: %.44: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %.45: Core.IntLiteral = int_value 6 [template] +// CHECK:STDOUT: %.46: = bound_method %.45, %Convert.3 [template] // CHECK:STDOUT: %struct.7: %C.9 = struct_value () [template] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.9 [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.45: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %.46: Core.IntLiteral = int_value 7 [template] -// CHECK:STDOUT: %.47: = bound_method %.46, %Convert.3 [template] +// CHECK:STDOUT: %.47: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %.48: Core.IntLiteral = int_value 7 [template] +// CHECK:STDOUT: %.49: = bound_method %.48, %Convert.3 [template] // CHECK:STDOUT: %struct.8: %C.10 = struct_value () [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10 [template] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %.48: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %.50: = interface_witness (%Convert.12) [template] // CHECK:STDOUT: %Make.type: type = fn_type @Make [template] // CHECK:STDOUT: %Make: %Make.type = struct_value () [template] // CHECK:STDOUT: } @@ -1126,36 +1153,36 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %import_ref.6: %C.type = import_ref P//library, inst+27, loaded [template = constants.%C.1] // CHECK:STDOUT: %import_ref.7 = import_ref P//library, inst+32, unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Core//default, inst+36, unloaded -// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.9) = import_ref Core//default, inst+58, loaded [symbolic = @ImplicitAs.%.2 (constants.%.13)] -// CHECK:STDOUT: %import_ref.11 = import_ref Core//default, inst+51, unloaded -// CHECK:STDOUT: %import_ref.12 = import_ref Core//default, inst+51, unloaded -// CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, inst+69, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, inst+77, loaded [template = constants.%ImplicitAs.type.3] -// CHECK:STDOUT: %import_ref.16: = import_ref Core//default, inst+100, loaded [template = constants.%.14] -// CHECK:STDOUT: %import_ref.17: type = import_ref P//library, inst+153, loaded [template = constants.%C.3] -// CHECK:STDOUT: %import_ref.18: type = import_ref P//library, inst+158, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.19: = import_ref P//library, inst+178, loaded [template = constants.%.27] -// CHECK:STDOUT: %import_ref.20: type = import_ref P//library, inst+195, loaded [template = constants.%C.4] -// CHECK:STDOUT: %import_ref.21: type = import_ref P//library, inst+200, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.22: = import_ref P//library, inst+215, loaded [template = constants.%.30] -// CHECK:STDOUT: %import_ref.23: type = import_ref P//library, inst+231, loaded [template = constants.%C.5] -// CHECK:STDOUT: %import_ref.24: type = import_ref P//library, inst+236, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.25: = import_ref P//library, inst+251, loaded [template = constants.%.33] -// CHECK:STDOUT: %import_ref.26: type = import_ref P//library, inst+267, loaded [template = constants.%C.6] -// CHECK:STDOUT: %import_ref.27: type = import_ref P//library, inst+272, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.28: = import_ref P//library, inst+287, loaded [template = constants.%.36] -// CHECK:STDOUT: %import_ref.29: type = import_ref P//library, inst+303, loaded [template = constants.%C.7] -// CHECK:STDOUT: %import_ref.30: type = import_ref P//library, inst+308, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.31: = import_ref P//library, inst+323, loaded [template = constants.%.39] -// CHECK:STDOUT: %import_ref.32: type = import_ref P//library, inst+339, loaded [template = constants.%C.8] -// CHECK:STDOUT: %import_ref.33: type = import_ref P//library, inst+344, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.34: = import_ref P//library, inst+359, loaded [template = constants.%.42] -// CHECK:STDOUT: %import_ref.35: type = import_ref P//library, inst+375, loaded [template = constants.%C.9] -// CHECK:STDOUT: %import_ref.36: type = import_ref P//library, inst+380, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.37: = import_ref P//library, inst+395, loaded [template = constants.%.45] -// CHECK:STDOUT: %import_ref.38: type = import_ref P//library, inst+411, loaded [template = constants.%C.10] -// CHECK:STDOUT: %import_ref.39: type = import_ref P//library, inst+416, loaded [template = constants.%ImplicitAs.type.4] -// CHECK:STDOUT: %import_ref.40: = import_ref P//library, inst+431, loaded [template = constants.%.48] +// CHECK:STDOUT: %import_ref.10: @ImplicitAs.%.1 (%.10) = import_ref Core//default, inst+60, loaded [symbolic = @ImplicitAs.%.2 (constants.%.15)] +// CHECK:STDOUT: %import_ref.11 = import_ref Core//default, inst+52, unloaded +// CHECK:STDOUT: %import_ref.12 = import_ref Core//default, inst+52, unloaded +// CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, inst+71, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, inst+79, loaded [template = constants.%ImplicitAs.type.3] +// CHECK:STDOUT: %import_ref.16: = import_ref Core//default, inst+103, loaded [template = constants.%.16] +// CHECK:STDOUT: %import_ref.17: type = import_ref P//library, inst+156, loaded [template = constants.%C.3] +// CHECK:STDOUT: %import_ref.18: type = import_ref P//library, inst+161, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.19: = import_ref P//library, inst+182, loaded [template = constants.%.29] +// CHECK:STDOUT: %import_ref.20: type = import_ref P//library, inst+199, loaded [template = constants.%C.4] +// CHECK:STDOUT: %import_ref.21: type = import_ref P//library, inst+204, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.22: = import_ref P//library, inst+220, loaded [template = constants.%.32] +// CHECK:STDOUT: %import_ref.23: type = import_ref P//library, inst+236, loaded [template = constants.%C.5] +// CHECK:STDOUT: %import_ref.24: type = import_ref P//library, inst+241, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.25: = import_ref P//library, inst+257, loaded [template = constants.%.35] +// CHECK:STDOUT: %import_ref.26: type = import_ref P//library, inst+273, loaded [template = constants.%C.6] +// CHECK:STDOUT: %import_ref.27: type = import_ref P//library, inst+278, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.28: = import_ref P//library, inst+294, loaded [template = constants.%.38] +// CHECK:STDOUT: %import_ref.29: type = import_ref P//library, inst+310, loaded [template = constants.%C.7] +// CHECK:STDOUT: %import_ref.30: type = import_ref P//library, inst+315, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.31: = import_ref P//library, inst+331, loaded [template = constants.%.41] +// CHECK:STDOUT: %import_ref.32: type = import_ref P//library, inst+347, loaded [template = constants.%C.8] +// CHECK:STDOUT: %import_ref.33: type = import_ref P//library, inst+352, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.34: = import_ref P//library, inst+368, loaded [template = constants.%.44] +// CHECK:STDOUT: %import_ref.35: type = import_ref P//library, inst+384, loaded [template = constants.%C.9] +// CHECK:STDOUT: %import_ref.36: type = import_ref P//library, inst+389, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.37: = import_ref P//library, inst+405, loaded [template = constants.%.47] +// CHECK:STDOUT: %import_ref.38: type = import_ref P//library, inst+421, loaded [template = constants.%C.10] +// CHECK:STDOUT: %import_ref.39: type = import_ref P//library, inst+426, loaded [template = constants.%ImplicitAs.type.4] +// CHECK:STDOUT: %import_ref.40: = import_ref P//library, inst+442, loaded [template = constants.%.50] // CHECK:STDOUT: %import_ref.41: %Make.type = import_ref P//library, inst+57, loaded [template = constants.%Make] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1195,8 +1222,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.9) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.10)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.10) = assoc_entity element0, imports.%import_ref.12 [symbolic = %.2 (constants.%.11)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1282,17 +1309,17 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc8: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] // CHECK:STDOUT: %.loc8_33: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_32.2: = bound_method %.loc8_33, %.loc8_32.1 [template = constants.%.15] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_32.2(%.loc8_33) [template = constants.%.16] -// CHECK:STDOUT: %.loc8_32.3: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.16] -// CHECK:STDOUT: %.loc8_32.4: %i32 = converted %.loc8_33, %.loc8_32.3 [template = constants.%.16] -// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%.16) [template = constants.%C.3] +// CHECK:STDOUT: %.loc8_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc8_32.2: = bound_method %.loc8_33, %.loc8_32.1 [template = constants.%.17] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_32.2(%.loc8_33) [template = constants.%.18] +// CHECK:STDOUT: %.loc8_32.3: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.18] +// CHECK:STDOUT: %.loc8_32.4: %i32 = converted %.loc8_33, %.loc8_32.3 [template = constants.%.18] +// CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%.18) [template = constants.%C.3] // CHECK:STDOUT: %.loc8_24.2: ref %C.3 = temporary_storage // CHECK:STDOUT: %.loc8_24.3: init %C.3 = class_init (), %.loc8_24.2 [template = constants.%struct.1] // CHECK:STDOUT: %.loc8_24.4: ref %C.3 = temporary %.loc8_24.2, %.loc8_24.3 // CHECK:STDOUT: %.loc8_26.1: ref %C.3 = converted %.loc8_24.1, %.loc8_24.4 -// CHECK:STDOUT: %.loc8_35.1: %Convert.type.4 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.5] +// CHECK:STDOUT: %.loc8_35.1: %Convert.type.4 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.5] // CHECK:STDOUT: %.loc8_35.2: = bound_method %.loc8_26.1, %.loc8_35.1 // CHECK:STDOUT: %.loc8_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc8_26.2: %C.3 = bind_value %.loc8_26.1 @@ -1308,18 +1335,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc9_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc9: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_33: Core.IntLiteral = int_value 1 [template = constants.%.28] -// CHECK:STDOUT: %.loc9_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc9_32.2: = bound_method %.loc9_33, %.loc9_32.1 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_32.2(%.loc9_33) [template = constants.%.20] -// CHECK:STDOUT: %.loc9_32.3: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.20] -// CHECK:STDOUT: %.loc9_32.4: %i32 = converted %.loc9_33, %.loc9_32.3 [template = constants.%.20] -// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%.20) [template = constants.%C.4] +// CHECK:STDOUT: %.loc9_33: Core.IntLiteral = int_value 1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc9_32.2: = bound_method %.loc9_33, %.loc9_32.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_32.2(%.loc9_33) [template = constants.%.22] +// CHECK:STDOUT: %.loc9_32.3: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.22] +// CHECK:STDOUT: %.loc9_32.4: %i32 = converted %.loc9_33, %.loc9_32.3 [template = constants.%.22] +// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%.22) [template = constants.%C.4] // CHECK:STDOUT: %.loc9_24.2: ref %C.4 = temporary_storage // CHECK:STDOUT: %.loc9_24.3: init %C.4 = class_init (), %.loc9_24.2 [template = constants.%struct.2] // CHECK:STDOUT: %.loc9_24.4: ref %C.4 = temporary %.loc9_24.2, %.loc9_24.3 // CHECK:STDOUT: %.loc9_26.1: ref %C.4 = converted %.loc9_24.1, %.loc9_24.4 -// CHECK:STDOUT: %.loc9_35.1: %Convert.type.4 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.6] +// CHECK:STDOUT: %.loc9_35.1: %Convert.type.4 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.6] // CHECK:STDOUT: %.loc9_35.2: = bound_method %.loc9_26.1, %.loc9_35.1 // CHECK:STDOUT: %.loc9_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc9_26.2: %C.4 = bind_value %.loc9_26.1 @@ -1335,18 +1362,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc10_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc10: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_33: Core.IntLiteral = int_value 2 [template = constants.%.31] -// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc10_32.2: = bound_method %.loc10_33, %.loc10_32.1 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_32.2(%.loc10_33) [template = constants.%.21] -// CHECK:STDOUT: %.loc10_32.3: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.21] -// CHECK:STDOUT: %.loc10_32.4: %i32 = converted %.loc10_33, %.loc10_32.3 [template = constants.%.21] -// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.21) [template = constants.%C.5] +// CHECK:STDOUT: %.loc10_33: Core.IntLiteral = int_value 2 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc10_32.2: = bound_method %.loc10_33, %.loc10_32.1 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_32.2(%.loc10_33) [template = constants.%.23] +// CHECK:STDOUT: %.loc10_32.3: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.23] +// CHECK:STDOUT: %.loc10_32.4: %i32 = converted %.loc10_33, %.loc10_32.3 [template = constants.%.23] +// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.23) [template = constants.%C.5] // CHECK:STDOUT: %.loc10_24.2: ref %C.5 = temporary_storage // CHECK:STDOUT: %.loc10_24.3: init %C.5 = class_init (), %.loc10_24.2 [template = constants.%struct.3] // CHECK:STDOUT: %.loc10_24.4: ref %C.5 = temporary %.loc10_24.2, %.loc10_24.3 // CHECK:STDOUT: %.loc10_26.1: ref %C.5 = converted %.loc10_24.1, %.loc10_24.4 -// CHECK:STDOUT: %.loc10_35.1: %Convert.type.4 = interface_witness_access constants.%.33, element0 [template = constants.%Convert.7] +// CHECK:STDOUT: %.loc10_35.1: %Convert.type.4 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.7] // CHECK:STDOUT: %.loc10_35.2: = bound_method %.loc10_26.1, %.loc10_35.1 // CHECK:STDOUT: %.loc10_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc10_26.2: %C.5 = bind_value %.loc10_26.1 @@ -1362,18 +1389,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc11_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc11: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_33: Core.IntLiteral = int_value 3 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc11_32.2: = bound_method %.loc11_33, %.loc11_32.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_32.2(%.loc11_33) [template = constants.%.22] -// CHECK:STDOUT: %.loc11_32.3: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.22] -// CHECK:STDOUT: %.loc11_32.4: %i32 = converted %.loc11_33, %.loc11_32.3 [template = constants.%.22] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%.22) [template = constants.%C.6] +// CHECK:STDOUT: %.loc11_33: Core.IntLiteral = int_value 3 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc11_32.2: = bound_method %.loc11_33, %.loc11_32.1 [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_32.2(%.loc11_33) [template = constants.%.24] +// CHECK:STDOUT: %.loc11_32.3: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.24] +// CHECK:STDOUT: %.loc11_32.4: %i32 = converted %.loc11_33, %.loc11_32.3 [template = constants.%.24] +// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%.24) [template = constants.%C.6] // CHECK:STDOUT: %.loc11_24.2: ref %C.6 = temporary_storage // CHECK:STDOUT: %.loc11_24.3: init %C.6 = class_init (), %.loc11_24.2 [template = constants.%struct.4] // CHECK:STDOUT: %.loc11_24.4: ref %C.6 = temporary %.loc11_24.2, %.loc11_24.3 // CHECK:STDOUT: %.loc11_26.1: ref %C.6 = converted %.loc11_24.1, %.loc11_24.4 -// CHECK:STDOUT: %.loc11_35.1: %Convert.type.4 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.8] +// CHECK:STDOUT: %.loc11_35.1: %Convert.type.4 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.8] // CHECK:STDOUT: %.loc11_35.2: = bound_method %.loc11_26.1, %.loc11_35.1 // CHECK:STDOUT: %.loc11_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc11_26.2: %C.6 = bind_value %.loc11_26.1 @@ -1389,18 +1416,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc12_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc12: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 4 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc12_32.2: = bound_method %.loc12_33, %.loc12_32.1 [template = constants.%.38] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_32.2(%.loc12_33) [template = constants.%.23] -// CHECK:STDOUT: %.loc12_32.3: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_32.4: %i32 = converted %.loc12_33, %.loc12_32.3 [template = constants.%.23] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%.23) [template = constants.%C.7] +// CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 4 [template = constants.%.39] +// CHECK:STDOUT: %.loc12_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc12_32.2: = bound_method %.loc12_33, %.loc12_32.1 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_32.2(%.loc12_33) [template = constants.%.25] +// CHECK:STDOUT: %.loc12_32.3: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_32.4: %i32 = converted %.loc12_33, %.loc12_32.3 [template = constants.%.25] +// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%.25) [template = constants.%C.7] // CHECK:STDOUT: %.loc12_24.2: ref %C.7 = temporary_storage // CHECK:STDOUT: %.loc12_24.3: init %C.7 = class_init (), %.loc12_24.2 [template = constants.%struct.5] // CHECK:STDOUT: %.loc12_24.4: ref %C.7 = temporary %.loc12_24.2, %.loc12_24.3 // CHECK:STDOUT: %.loc12_26.1: ref %C.7 = converted %.loc12_24.1, %.loc12_24.4 -// CHECK:STDOUT: %.loc12_35.1: %Convert.type.4 = interface_witness_access constants.%.39, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %.loc12_35.1: %Convert.type.4 = interface_witness_access constants.%.41, element0 [template = constants.%Convert.9] // CHECK:STDOUT: %.loc12_35.2: = bound_method %.loc12_26.1, %.loc12_35.1 // CHECK:STDOUT: %.loc12_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc12_26.2: %C.7 = bind_value %.loc12_26.1 @@ -1416,18 +1443,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc13_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc13: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc13_33: Core.IntLiteral = int_value 5 [template = constants.%.40] -// CHECK:STDOUT: %.loc13_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc13_32.2: = bound_method %.loc13_33, %.loc13_32.1 [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_32.2(%.loc13_33) [template = constants.%.24] -// CHECK:STDOUT: %.loc13_32.3: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_32.4: %i32 = converted %.loc13_33, %.loc13_32.3 [template = constants.%.24] -// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%.24) [template = constants.%C.8] +// CHECK:STDOUT: %.loc13_33: Core.IntLiteral = int_value 5 [template = constants.%.42] +// CHECK:STDOUT: %.loc13_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc13_32.2: = bound_method %.loc13_33, %.loc13_32.1 [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_32.2(%.loc13_33) [template = constants.%.26] +// CHECK:STDOUT: %.loc13_32.3: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_32.4: %i32 = converted %.loc13_33, %.loc13_32.3 [template = constants.%.26] +// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%.26) [template = constants.%C.8] // CHECK:STDOUT: %.loc13_24.2: ref %C.8 = temporary_storage // CHECK:STDOUT: %.loc13_24.3: init %C.8 = class_init (), %.loc13_24.2 [template = constants.%struct.6] // CHECK:STDOUT: %.loc13_24.4: ref %C.8 = temporary %.loc13_24.2, %.loc13_24.3 // CHECK:STDOUT: %.loc13_26.1: ref %C.8 = converted %.loc13_24.1, %.loc13_24.4 -// CHECK:STDOUT: %.loc13_35.1: %Convert.type.4 = interface_witness_access constants.%.42, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %.loc13_35.1: %Convert.type.4 = interface_witness_access constants.%.44, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %.loc13_35.2: = bound_method %.loc13_26.1, %.loc13_35.1 // CHECK:STDOUT: %.loc13_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc13_26.2: %C.8 = bind_value %.loc13_26.1 @@ -1443,18 +1470,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc14_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc14: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc14_33: Core.IntLiteral = int_value 6 [template = constants.%.43] -// CHECK:STDOUT: %.loc14_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc14_32.2: = bound_method %.loc14_33, %.loc14_32.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_32.2(%.loc14_33) [template = constants.%.25] -// CHECK:STDOUT: %.loc14_32.3: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.25] -// CHECK:STDOUT: %.loc14_32.4: %i32 = converted %.loc14_33, %.loc14_32.3 [template = constants.%.25] -// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%.25) [template = constants.%C.9] +// CHECK:STDOUT: %.loc14_33: Core.IntLiteral = int_value 6 [template = constants.%.45] +// CHECK:STDOUT: %.loc14_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc14_32.2: = bound_method %.loc14_33, %.loc14_32.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_32.2(%.loc14_33) [template = constants.%.27] +// CHECK:STDOUT: %.loc14_32.3: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_32.4: %i32 = converted %.loc14_33, %.loc14_32.3 [template = constants.%.27] +// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%.27) [template = constants.%C.9] // CHECK:STDOUT: %.loc14_24.2: ref %C.9 = temporary_storage // CHECK:STDOUT: %.loc14_24.3: init %C.9 = class_init (), %.loc14_24.2 [template = constants.%struct.7] // CHECK:STDOUT: %.loc14_24.4: ref %C.9 = temporary %.loc14_24.2, %.loc14_24.3 // CHECK:STDOUT: %.loc14_26.1: ref %C.9 = converted %.loc14_24.1, %.loc14_24.4 -// CHECK:STDOUT: %.loc14_35.1: %Convert.type.4 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.11] +// CHECK:STDOUT: %.loc14_35.1: %Convert.type.4 = interface_witness_access constants.%.47, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %.loc14_35.2: = bound_method %.loc14_26.1, %.loc14_35.1 // CHECK:STDOUT: %.loc14_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc14_26.2: %C.9 = bind_value %.loc14_26.1 @@ -1470,18 +1497,18 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %.loc15_24.1: %.6 = struct_literal () // CHECK:STDOUT: %P.ref.loc15: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, imports.%import_ref.6 [template = constants.%C.1] -// CHECK:STDOUT: %.loc15_33: Core.IntLiteral = int_value 7 [template = constants.%.46] -// CHECK:STDOUT: %.loc15_32.1: %Convert.type.2 = interface_witness_access constants.%.14, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc15_32.2: = bound_method %.loc15_33, %.loc15_32.1 [template = constants.%.47] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_32.2(%.loc15_33) [template = constants.%.26] -// CHECK:STDOUT: %.loc15_32.3: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.26] -// CHECK:STDOUT: %.loc15_32.4: %i32 = converted %.loc15_33, %.loc15_32.3 [template = constants.%.26] -// CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%.26) [template = constants.%C.10] +// CHECK:STDOUT: %.loc15_33: Core.IntLiteral = int_value 7 [template = constants.%.48] +// CHECK:STDOUT: %.loc15_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc15_32.2: = bound_method %.loc15_33, %.loc15_32.1 [template = constants.%.49] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_32.2(%.loc15_33) [template = constants.%.28] +// CHECK:STDOUT: %.loc15_32.3: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.28] +// CHECK:STDOUT: %.loc15_32.4: %i32 = converted %.loc15_33, %.loc15_32.3 [template = constants.%.28] +// CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%.28) [template = constants.%C.10] // CHECK:STDOUT: %.loc15_24.2: ref %C.10 = temporary_storage // CHECK:STDOUT: %.loc15_24.3: init %C.10 = class_init (), %.loc15_24.2 [template = constants.%struct.8] // CHECK:STDOUT: %.loc15_24.4: ref %C.10 = temporary %.loc15_24.2, %.loc15_24.3 // CHECK:STDOUT: %.loc15_26.1: ref %C.10 = converted %.loc15_24.1, %.loc15_24.4 -// CHECK:STDOUT: %.loc15_35.1: %Convert.type.4 = interface_witness_access constants.%.48, element0 [template = constants.%Convert.12] +// CHECK:STDOUT: %.loc15_35.1: %Convert.type.4 = interface_witness_access constants.%.50, element0 [template = constants.%Convert.12] // CHECK:STDOUT: %.loc15_35.2: = bound_method %.loc15_26.1, %.loc15_35.1 // CHECK:STDOUT: %.loc15_35.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc15_26.2: %C.10 = bind_value %.loc15_26.1 @@ -1501,8 +1528,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.9)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%T (%T); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.9)]() -> @Convert.1.%T (%T); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Convert.2[%self.param_patt: Core.IntLiteral]() -> %i32 = "int.convert_checked"; @@ -1549,6 +1577,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.12 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ImplicitAs(constants.%i32) { @@ -1560,13 +1589,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.2 // CHECK:STDOUT: %Convert => constants.%Convert.2 -// CHECK:STDOUT: %.1 => constants.%.11 -// CHECK:STDOUT: %.2 => constants.%.12 +// CHECK:STDOUT: %.1 => constants.%.13 +// CHECK:STDOUT: %.2 => constants.%.14 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.16) { -// CHECK:STDOUT: %N => constants.%.16 -// CHECK:STDOUT: %N.patt => constants.%.16 +// CHECK:STDOUT: specific @C(constants.%.18) { +// CHECK:STDOUT: %N => constants.%.18 +// CHECK:STDOUT: %N.patt => constants.%.18 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -1580,22 +1609,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.4 // CHECK:STDOUT: %Convert => constants.%Convert.4 -// CHECK:STDOUT: %.1 => constants.%.18 -// CHECK:STDOUT: %.2 => constants.%.19 -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.20) { -// CHECK:STDOUT: %N => constants.%.20 -// CHECK:STDOUT: %N.patt => constants.%.20 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @C(constants.%.21) { -// CHECK:STDOUT: %N => constants.%.21 -// CHECK:STDOUT: %N.patt => constants.%.21 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: +// CHECK:STDOUT: %.1 => constants.%.20 +// CHECK:STDOUT: %.2 => constants.%.21 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%.22) { @@ -1633,3 +1648,17 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: !definition: // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%.27) { +// CHECK:STDOUT: %N => constants.%.27 +// CHECK:STDOUT: %N.patt => constants.%.27 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: specific @C(constants.%.28) { +// CHECK:STDOUT: %N => constants.%.28 +// CHECK:STDOUT: %N.patt => constants.%.28 +// CHECK:STDOUT: +// CHECK:STDOUT: !definition: +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 882fa25368f6..4dada89ec2e5 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -42,20 +42,20 @@ fn G() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.7, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %C = struct_value (%.31, %.34) [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.7, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %C = struct_value (%.35, %.38) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] -// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.38: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.40: = bound_method %.39, %Convert.14 [template] +// CHECK:STDOUT: %.41: = specific_function %.40, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.42: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -123,20 +123,20 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc17_34: Core.IntLiteral = int_value 1 [template = constants.%.6] // CHECK:STDOUT: %.loc17_42: Core.IntLiteral = int_value 2 [template = constants.%.7] // CHECK:STDOUT: %.loc17_43.1: %.8 = struct_literal (%.loc17_34, %.loc17_42) -// CHECK:STDOUT: %.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_43.3: = bound_method %.loc17_34, %.loc17_43.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc17_43.4: = specific_function %.loc17_43.3, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc17_43.1: init %i32 = call %.loc17_43.4(%.loc17_34) [template = constants.%.31] -// CHECK:STDOUT: %.loc17_43.5: init %i32 = converted %.loc17_34, %int.convert_checked.loc17_43.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_43.3: = bound_method %.loc17_34, %.loc17_43.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc17_43.4: = specific_function %.loc17_43.3, @Convert.2(constants.%.1) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc17_43.1: init %i32 = call %.loc17_43.4(%.loc17_34) [template = constants.%.35] +// CHECK:STDOUT: %.loc17_43.5: init %i32 = converted %.loc17_34, %int.convert_checked.loc17_43.1 [template = constants.%.35] // CHECK:STDOUT: %.loc17_43.6: ref %i32 = class_element_access %return, element0 -// CHECK:STDOUT: %.loc17_43.7: init %i32 = initialize_from %.loc17_43.5 to %.loc17_43.6 [template = constants.%.31] -// CHECK:STDOUT: %.loc17_43.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_43.9: = bound_method %.loc17_42, %.loc17_43.8 [template = constants.%.32] -// CHECK:STDOUT: %.loc17_43.10: = specific_function %.loc17_43.9, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc17_43.2: init %i32 = call %.loc17_43.10(%.loc17_42) [template = constants.%.34] -// CHECK:STDOUT: %.loc17_43.11: init %i32 = converted %.loc17_42, %int.convert_checked.loc17_43.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_43.7: init %i32 = initialize_from %.loc17_43.5 to %.loc17_43.6 [template = constants.%.35] +// CHECK:STDOUT: %.loc17_43.8: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_43.9: = bound_method %.loc17_42, %.loc17_43.8 [template = constants.%.36] +// CHECK:STDOUT: %.loc17_43.10: = specific_function %.loc17_43.9, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc17_43.2: init %i32 = call %.loc17_43.10(%.loc17_42) [template = constants.%.38] +// CHECK:STDOUT: %.loc17_43.11: init %i32 = converted %.loc17_42, %int.convert_checked.loc17_43.2 [template = constants.%.38] // CHECK:STDOUT: %.loc17_43.12: ref %i32 = class_element_access %return, element1 -// CHECK:STDOUT: %.loc17_43.13: init %i32 = initialize_from %.loc17_43.11 to %.loc17_43.12 [template = constants.%.34] +// CHECK:STDOUT: %.loc17_43.13: init %i32 = initialize_from %.loc17_43.11 to %.loc17_43.12 [template = constants.%.38] // CHECK:STDOUT: %.loc17_43.14: init %C = class_init (%.loc17_43.7, %.loc17_43.13), %return [template = constants.%struct] // CHECK:STDOUT: %.loc17_44: init %C = converted %.loc17_43.1, %.loc17_43.14 [template = constants.%struct] // CHECK:STDOUT: assign %return, %.loc17_44 @@ -151,12 +151,12 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc22_24.3: type = converted %int.make_type_signed.loc22, %.loc22_24.2 [template = constants.%i32] // CHECK:STDOUT: %result.var: ref %i32 = var result // CHECK:STDOUT: %result: ref %i32 = bind_name result, %result.var -// CHECK:STDOUT: %.loc22_30: Core.IntLiteral = int_value 0 [template = constants.%.35] -// CHECK:STDOUT: %.loc22_31.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc22_31.2: = bound_method %.loc22_30, %.loc22_31.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc22_31.3: = specific_function %.loc22_31.2, @Convert.2(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_31.3(%.loc22_30) [template = constants.%.38] -// CHECK:STDOUT: %.loc22_31.4: init %i32 = converted %.loc22_30, %int.convert_checked [template = constants.%.38] +// CHECK:STDOUT: %.loc22_30: Core.IntLiteral = int_value 0 [template = constants.%.39] +// CHECK:STDOUT: %.loc22_31.1: %Convert.type.2 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc22_31.2: = bound_method %.loc22_30, %.loc22_31.1 [template = constants.%.40] +// CHECK:STDOUT: %.loc22_31.3: = specific_function %.loc22_31.2, @Convert.2(constants.%.1) [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc22_31.3(%.loc22_30) [template = constants.%.42] +// CHECK:STDOUT: %.loc22_31.4: init %i32 = converted %.loc22_30, %int.convert_checked [template = constants.%.42] // CHECK:STDOUT: assign %result.var, %.loc22_31.4 // CHECK:STDOUT: %.loc22_16: %i32 = bind_value %result // CHECK:STDOUT: return %.loc22_16 diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index c076e32892e0..022a8f68dcc8 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -41,14 +41,14 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.23: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.24: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.25: = specific_function %.24, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.26: %i32 = int_value 0 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.28: = bound_method %.3, %Convert.14 [template] // CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.30: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %EnclosingButAfter.type: type = fn_type @EnclosingButAfter [template] @@ -116,11 +116,11 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc13_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc13_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_28.2: = bound_method %.loc13_27, %.loc13_28.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc13_28.3: = specific_function %.loc13_28.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_28.3(%.loc13_27) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_28.4: init %i32 = converted %.loc13_27, %int.convert_checked.loc13 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_28.2: = bound_method %.loc13_27, %.loc13_28.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc13_28.3: = specific_function %.loc13_28.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_28.3(%.loc13_27) [template = constants.%.30] +// CHECK:STDOUT: %.loc13_28.4: init %i32 = converted %.loc13_27, %int.convert_checked.loc13 [template = constants.%.30] // CHECK:STDOUT: assign %v.var, %.loc13_28.4 // CHECK:STDOUT: br !if.else.loc12 // CHECK:STDOUT: @@ -135,23 +135,23 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc16_21.3: type = converted %int.make_type_signed.loc16, %.loc16_21.2 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc16_27: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc16_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc16_28.2: = bound_method %.loc16_27, %.loc16_28.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc16_28.3: = specific_function %.loc16_28.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_28.3(%.loc16_27) [template = constants.%.30] -// CHECK:STDOUT: %.loc16_28.4: init %i32 = converted %.loc16_27, %int.convert_checked.loc16 [template = constants.%.30] +// CHECK:STDOUT: %.loc16_27: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc16_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc16_28.2: = bound_method %.loc16_27, %.loc16_28.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc16_28.3: = specific_function %.loc16_28.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %.loc16_28.3(%.loc16_27) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_28.4: init %i32 = converted %.loc16_27, %int.convert_checked.loc16 [template = constants.%.34] // CHECK:STDOUT: assign %w.var, %.loc16_28.4 // CHECK:STDOUT: br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: // CHECK:STDOUT: %.loc18_10: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc18_11.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_11.2: = bound_method %.loc18_10, %.loc18_11.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc18_11.3: = specific_function %.loc18_11.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_11.3(%.loc18_10) [template = constants.%.26] -// CHECK:STDOUT: %.loc18_11.4: %i32 = value_of_initializer %int.convert_checked.loc18 [template = constants.%.26] -// CHECK:STDOUT: %.loc18_11.5: %i32 = converted %.loc18_10, %.loc18_11.4 [template = constants.%.26] +// CHECK:STDOUT: %.loc18_11.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_11.2: = bound_method %.loc18_10, %.loc18_11.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc18_11.3: = specific_function %.loc18_11.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %.loc18_11.3(%.loc18_10) [template = constants.%.30] +// CHECK:STDOUT: %.loc18_11.4: %i32 = value_of_initializer %int.convert_checked.loc18 [template = constants.%.30] +// CHECK:STDOUT: %.loc18_11.5: %i32 = converted %.loc18_10, %.loc18_11.4 [template = constants.%.30] // CHECK:STDOUT: return %.loc18_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -168,11 +168,11 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %.loc23_27: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc23_28.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc23_28.2: = bound_method %.loc23_27, %.loc23_28.1 [template = constants.%.24] -// CHECK:STDOUT: %.loc23_28.3: = specific_function %.loc23_28.2, @Convert.2(constants.%.1) [template = constants.%.25] -// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_28.3(%.loc23_27) [template = constants.%.26] -// CHECK:STDOUT: %.loc23_28.4: init %i32 = converted %.loc23_27, %int.convert_checked.loc23 [template = constants.%.26] +// CHECK:STDOUT: %.loc23_28.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc23_28.2: = bound_method %.loc23_27, %.loc23_28.1 [template = constants.%.28] +// CHECK:STDOUT: %.loc23_28.3: = specific_function %.loc23_28.2, @Convert.2(constants.%.1) [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %.loc23_28.3(%.loc23_27) [template = constants.%.30] +// CHECK:STDOUT: %.loc23_28.4: init %i32 = converted %.loc23_27, %int.convert_checked.loc23 [template = constants.%.30] // CHECK:STDOUT: assign %v.var, %.loc23_28.4 // CHECK:STDOUT: %.loc23_18: %i32 = bind_value %v // CHECK:STDOUT: return %.loc23_18 @@ -184,12 +184,12 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %.loc26_19.3: type = converted %int.make_type_signed.loc26, %.loc26_19.2 [template = constants.%i32] // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var -// CHECK:STDOUT: %.loc26_25: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc26_26.1: %Convert.type.2 = interface_witness_access constants.%.23, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc26_26.2: = bound_method %.loc26_25, %.loc26_26.1 [template = constants.%.28] -// CHECK:STDOUT: %.loc26_26.3: = specific_function %.loc26_26.2, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_26.3(%.loc26_25) [template = constants.%.30] -// CHECK:STDOUT: %.loc26_26.4: init %i32 = converted %.loc26_25, %int.convert_checked.loc26 [template = constants.%.30] +// CHECK:STDOUT: %.loc26_25: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc26_26.1: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc26_26.2: = bound_method %.loc26_25, %.loc26_26.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc26_26.3: = specific_function %.loc26_26.2, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %.loc26_26.3(%.loc26_25) [template = constants.%.34] +// CHECK:STDOUT: %.loc26_26.4: init %i32 = converted %.loc26_25, %int.convert_checked.loc26 [template = constants.%.34] // CHECK:STDOUT: assign %w.var, %.loc26_26.4 // CHECK:STDOUT: %.loc26_16: %i32 = bind_value %w // CHECK:STDOUT: return %.loc26_16 diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index 81576111f1fd..9c448c9130ed 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -27,11 +27,11 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 3 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.27) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 3 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.31) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,12 +67,12 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_16: Core.IntLiteral = int_value 3 [template = constants.%.3] // CHECK:STDOUT: %.loc12_17.1: %.4 = struct_literal (%.loc12_16) -// CHECK:STDOUT: %.loc12_17.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_17.3: = bound_method %.loc12_16, %.loc12_17.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_17.4: = specific_function %.loc12_17.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.4(%.loc12_16) [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc12_17.6: %i32 = converted %.loc12_16, %.loc12_17.5 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_17.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_17.3: = bound_method %.loc12_16, %.loc12_17.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc12_17.4: = specific_function %.loc12_17.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_17.4(%.loc12_16) [template = constants.%.31] +// CHECK:STDOUT: %.loc12_17.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc12_17.6: %i32 = converted %.loc12_16, %.loc12_17.5 [template = constants.%.31] // CHECK:STDOUT: %struct: %.2 = struct_value (%.loc12_17.6) [template = constants.%struct] // CHECK:STDOUT: %.loc12_18: %.2 = converted %.loc12_17.1, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc12_18 diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index eb9059593068..85aa834b41ac 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -30,14 +30,14 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 15 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 35 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 15 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 35 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,20 +79,20 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %.loc13_11: Core.IntLiteral = int_value 15 [template = constants.%.3] // CHECK:STDOUT: %.loc13_15: Core.IntLiteral = int_value 35 [template = constants.%.4] // CHECK:STDOUT: %.loc13_17.1: %tuple.type.3 = tuple_literal (%.loc13_11, %.loc13_15) -// CHECK:STDOUT: %.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_17.3: = bound_method %.loc13_11, %.loc13_17.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc13_17.4: = specific_function %.loc13_17.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc13_17.1: init %i32 = call %.loc13_17.4(%.loc13_11) [template = constants.%.27] -// CHECK:STDOUT: %.loc13_17.5: init %i32 = converted %.loc13_11, %int.convert_checked.loc13_17.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_17.3: = bound_method %.loc13_11, %.loc13_17.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc13_17.4: = specific_function %.loc13_17.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc13_17.1: init %i32 = call %.loc13_17.4(%.loc13_11) [template = constants.%.31] +// CHECK:STDOUT: %.loc13_17.5: init %i32 = converted %.loc13_11, %int.convert_checked.loc13_17.1 [template = constants.%.31] // CHECK:STDOUT: %.loc13_17.6: ref %i32 = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_17.7: init %i32 = initialize_from %.loc13_17.5 to %.loc13_17.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc13_17.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc13_17.9: = bound_method %.loc13_15, %.loc13_17.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc13_17.10: = specific_function %.loc13_17.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc13_17.2: init %i32 = call %.loc13_17.10(%.loc13_15) [template = constants.%.30] -// CHECK:STDOUT: %.loc13_17.11: init %i32 = converted %.loc13_15, %int.convert_checked.loc13_17.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_17.7: init %i32 = initialize_from %.loc13_17.5 to %.loc13_17.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc13_17.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc13_17.9: = bound_method %.loc13_15, %.loc13_17.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc13_17.10: = specific_function %.loc13_17.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc13_17.2: init %i32 = call %.loc13_17.10(%.loc13_15) [template = constants.%.34] +// CHECK:STDOUT: %.loc13_17.11: init %i32 = converted %.loc13_15, %int.convert_checked.loc13_17.2 [template = constants.%.34] // CHECK:STDOUT: %.loc13_17.12: ref %i32 = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_17.13: init %i32 = initialize_from %.loc13_17.11 to %.loc13_17.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc13_17.13: init %i32 = initialize_from %.loc13_17.11 to %.loc13_17.12 [template = constants.%.34] // CHECK:STDOUT: %.loc13_17.14: init %tuple.type.2 = tuple_init (%.loc13_17.7, %.loc13_17.13) to %return [template = constants.%tuple] // CHECK:STDOUT: %.loc13_18: init %tuple.type.2 = converted %.loc13_17.1, %.loc13_17.14 [template = constants.%tuple] // CHECK:STDOUT: return %.loc13_18 to %return diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index b651369a9b74..3b3d91587c26 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -25,10 +25,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,12 +62,12 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc12_10: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.23] -// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_11.1: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_11.2: = bound_method %.loc12_10, %.loc12_11.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc12_11.3: = specific_function %.loc12_11.2, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_11.3(%.loc12_10) [template = constants.%.29] +// CHECK:STDOUT: %.loc12_11.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc12_11.5: %i32 = converted %.loc12_10, %.loc12_11.4 [template = constants.%.29] // CHECK:STDOUT: return %.loc12_11.5 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 4a3e4f4f1a20..da63051ff25f 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -27,11 +27,11 @@ var y: i32 = x.b; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.27) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.31) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -69,11 +69,11 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 4 [template = constants.%.3] // CHECK:STDOUT: %.loc11_27.1: %.4 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_26, %.loc11_27.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.4(%.loc11_26) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_26, %int.convert_checked [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_26, %.loc11_27.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.4(%.loc11_26) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_26, %int.convert_checked [template = constants.%.31] // CHECK:STDOUT: %.loc11_27.6: init %.2 = struct_init (%.loc11_27.5) to file.%x.var [template = constants.%struct] // CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 2d41eb5e4694..f972b7ff2fba 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -43,10 +43,10 @@ var c_bad: C({.c = 1, .d = 2}) = F(); // --- fail_bad_value.impl.carbon impl package Implicit; -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C()` to `C()` [ImplicitAsConversionFailure] +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C()` to `C()` [ImplicitAsConversionFailure] // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C()` does not implement interface `ImplicitAs(C())` [MissingImplInMemberAccessNote] +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C()` does not implement interface `ImplicitAs(C())` [MissingImplInMemberAccessNote] // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var c_bad: C({.a = 3, .b = 4}) = F(); @@ -64,39 +64,39 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 0 [template] -// CHECK:STDOUT: %struct.1: %.2 = struct_value (%.27) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 0 [template] +// CHECK:STDOUT: %struct.1: %.2 = struct_value (%.31) [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.28: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] -// CHECK:STDOUT: %.29: type = struct_type {.a: %.28, .d: %i32} [template] +// CHECK:STDOUT: %.32: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] +// CHECK:STDOUT: %.33: type = struct_type {.a: %.32, .d: %i32} [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] -// CHECK:STDOUT: %.33: type = struct_type {.b: Core.IntLiteral, .c: %tuple.type.3} [template] -// CHECK:STDOUT: %.34: type = struct_type {.a: %.33, .d: Core.IntLiteral} [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27) [template] -// CHECK:STDOUT: %struct.2: %.28 = struct_value (%.27, %tuple) [template] -// CHECK:STDOUT: %struct.3: %.29 = struct_value (%struct.2, %.27) [template] -// CHECK:STDOUT: %.35: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.35 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.35 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.37: type = struct_type {.b: Core.IntLiteral, .c: %tuple.type.3} [template] +// CHECK:STDOUT: %.38: type = struct_type {.a: %.37, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31) [template] +// CHECK:STDOUT: %struct.2: %.32 = struct_value (%.31, %tuple) [template] +// CHECK:STDOUT: %struct.3: %.33 = struct_value (%struct.2, %.31) [template] +// CHECK:STDOUT: %.39: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %.39 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %.39 = symbolic_binding_pattern S, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%S) [symbolic] -// CHECK:STDOUT: %.36: type = struct_type {} [template] -// CHECK:STDOUT: %.37: = complete_type_witness %.36 [template] -// CHECK:STDOUT: %.38: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.39: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.40: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %.42: = bound_method %.38, %Convert.14 [template] -// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.44: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.45: = bound_method %.39, %Convert.14 [template] -// CHECK:STDOUT: %.46: = specific_function %.45, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.47: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct.4: %.35 = struct_value (%.44, %.47) [template] +// CHECK:STDOUT: %.40: type = struct_type {} [template] +// CHECK:STDOUT: %.41: = complete_type_witness %.40 [template] +// CHECK:STDOUT: %.42: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.43: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.44: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %.46: = bound_method %.42, %Convert.14 [template] +// CHECK:STDOUT: %.47: = specific_function %.46, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.48: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.49: = bound_method %.43, %Convert.14 [template] +// CHECK:STDOUT: %.50: = specific_function %.49, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.51: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct.4: %.39 = struct_value (%.48, %.51) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.4) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -137,17 +137,17 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc5_36.2: type = value_of_initializer %int.make_type_signed.loc5_32 [template = constants.%i32] // CHECK:STDOUT: %.loc5_36.3: type = converted %int.make_type_signed.loc5_32, %.loc5_36.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_36.4: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%.28] +// CHECK:STDOUT: %.loc5_37: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%.32] // CHECK:STDOUT: %.loc5_44.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc5_44: init type = call constants.%Int(%.loc5_44.1) [template = constants.%i32] // CHECK:STDOUT: %.loc5_44.2: type = value_of_initializer %int.make_type_signed.loc5_44 [template = constants.%i32] // CHECK:STDOUT: %.loc5_44.3: type = converted %int.make_type_signed.loc5_44, %.loc5_44.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.28, .d: %i32} [template = constants.%.29] -// CHECK:STDOUT: %b_ref.var: ref %.29 = var b_ref -// CHECK:STDOUT: %b_ref: ref %.29 = bind_name b_ref, %b_ref.var +// CHECK:STDOUT: %.loc5_47: type = struct_type {.a: %.32, .d: %i32} [template = constants.%.33] +// CHECK:STDOUT: %b_ref.var: ref %.33 = var b_ref +// CHECK:STDOUT: %b_ref: ref %.33 = bind_name b_ref, %b_ref.var // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.1] { -// CHECK:STDOUT: %S.patt.loc8_9.1: %.35 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] -// CHECK:STDOUT: %S.param_patt: %.35 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.patt.loc8_9.1: %.39 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: %S.param_patt: %.39 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc8_18.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc8_18: init type = call constants.%Int(%.loc8_18.1) [template = constants.%i32] @@ -157,46 +157,46 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int.make_type_signed.loc8_27: init type = call constants.%Int(%.loc8_27.1) [template = constants.%i32] // CHECK:STDOUT: %.loc8_27.2: type = value_of_initializer %int.make_type_signed.loc8_27 [template = constants.%i32] // CHECK:STDOUT: %.loc8_27.3: type = converted %int.make_type_signed.loc8_27, %.loc8_27.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_30: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.35] -// CHECK:STDOUT: %S.param: %.35 = value_param runtime_param -// CHECK:STDOUT: %S.loc8_9.1: %.35 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] +// CHECK:STDOUT: %.loc8_30: type = struct_type {.a: %i32, .b: %i32} [template = constants.%.39] +// CHECK:STDOUT: %S.param: %.39 = value_param runtime_param +// CHECK:STDOUT: %S.loc8_9.1: %.39 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %C.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_19: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_27: Core.IntLiteral = int_value 2 [template = constants.%.39] -// CHECK:STDOUT: %.loc9_28.1: %.40 = struct_literal (%.loc9_19, %.loc9_27) -// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_28.3: = bound_method %.loc9_19, %.loc9_28.2 [template = constants.%.42] -// CHECK:STDOUT: %.loc9_28.4: = specific_function %.loc9_28.3, @Convert.2(constants.%.1) [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %.loc9_28.4(%.loc9_19) [template = constants.%.44] -// CHECK:STDOUT: %.loc9_28.5: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%.44] -// CHECK:STDOUT: %.loc9_28.6: %i32 = converted %.loc9_19, %.loc9_28.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc9_28.7: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_28.8: = bound_method %.loc9_27, %.loc9_28.7 [template = constants.%.45] -// CHECK:STDOUT: %.loc9_28.9: = specific_function %.loc9_28.8, @Convert.2(constants.%.1) [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %.loc9_28.9(%.loc9_27) [template = constants.%.47] -// CHECK:STDOUT: %.loc9_28.10: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%.47] -// CHECK:STDOUT: %.loc9_28.11: %i32 = converted %.loc9_27, %.loc9_28.10 [template = constants.%.47] -// CHECK:STDOUT: %struct: %.35 = struct_value (%.loc9_28.6, %.loc9_28.11) [template = constants.%struct.4] -// CHECK:STDOUT: %.loc9_12: %.35 = converted %.loc9_28.1, %struct [template = constants.%struct.4] +// CHECK:STDOUT: %.loc9_19: Core.IntLiteral = int_value 1 [template = constants.%.42] +// CHECK:STDOUT: %.loc9_27: Core.IntLiteral = int_value 2 [template = constants.%.43] +// CHECK:STDOUT: %.loc9_28.1: %.44 = struct_literal (%.loc9_19, %.loc9_27) +// CHECK:STDOUT: %.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_28.3: = bound_method %.loc9_19, %.loc9_28.2 [template = constants.%.46] +// CHECK:STDOUT: %.loc9_28.4: = specific_function %.loc9_28.3, @Convert.2(constants.%.1) [template = constants.%.47] +// CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %.loc9_28.4(%.loc9_19) [template = constants.%.48] +// CHECK:STDOUT: %.loc9_28.5: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%.48] +// CHECK:STDOUT: %.loc9_28.6: %i32 = converted %.loc9_19, %.loc9_28.5 [template = constants.%.48] +// CHECK:STDOUT: %.loc9_28.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_28.8: = bound_method %.loc9_27, %.loc9_28.7 [template = constants.%.49] +// CHECK:STDOUT: %.loc9_28.9: = specific_function %.loc9_28.8, @Convert.2(constants.%.1) [template = constants.%.50] +// CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %.loc9_28.9(%.loc9_27) [template = constants.%.51] +// CHECK:STDOUT: %.loc9_28.10: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%.51] +// CHECK:STDOUT: %.loc9_28.11: %i32 = converted %.loc9_27, %.loc9_28.10 [template = constants.%.51] +// CHECK:STDOUT: %struct: %.39 = struct_value (%.loc9_28.6, %.loc9_28.11) [template = constants.%struct.4] +// CHECK:STDOUT: %.loc9_12: %.39 = converted %.loc9_28.1, %struct [template = constants.%struct.4] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.3] // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %.35) { -// CHECK:STDOUT: %S.loc8_9.2: %.35 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)] -// CHECK:STDOUT: %S.patt.loc8_9.2: %.35 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(%S.loc8_9.1: %.39) { +// CHECK:STDOUT: %S.loc8_9.2: %.39 = bind_symbolic_name S, 0 [symbolic = %S.loc8_9.2 (constants.%S)] +// CHECK:STDOUT: %S.patt.loc8_9.2: %.39 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc8_34: = complete_type_witness %.36 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_34: = complete_type_witness %.40 [template = constants.%.41] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -209,48 +209,48 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_30: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc4_31.1: %.4 = struct_literal (%.loc4_30) -// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_31.3: = bound_method %.loc4_30, %.loc4_31.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc4_31.4: = specific_function %.loc4_31.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_31.4(%.loc4_30) [template = constants.%.27] -// CHECK:STDOUT: %.loc4_31.5: init %i32 = converted %.loc4_30, %int.convert_checked.loc4 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_31.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_31.3: = bound_method %.loc4_30, %.loc4_31.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_31.4: = specific_function %.loc4_31.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_31.4(%.loc4_30) [template = constants.%.31] +// CHECK:STDOUT: %.loc4_31.5: init %i32 = converted %.loc4_30, %int.convert_checked.loc4 [template = constants.%.31] // CHECK:STDOUT: %.loc4_31.6: init %.2 = struct_init (%.loc4_31.5) to file.%a_ref.var [template = constants.%struct.1] // CHECK:STDOUT: %.loc4_32: init %.2 = converted %.loc4_31.1, %.loc4_31.6 [template = constants.%struct.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_32 // CHECK:STDOUT: %.loc6_17: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc6_26: Core.IntLiteral = int_value 0 [template = constants.%.3] // CHECK:STDOUT: %.loc6_28.1: %tuple.type.3 = tuple_literal (%.loc6_26) -// CHECK:STDOUT: %.loc6_29.1: %.33 = struct_literal (%.loc6_17, %.loc6_28.1) +// CHECK:STDOUT: %.loc6_29.1: %.37 = struct_literal (%.loc6_17, %.loc6_28.1) // CHECK:STDOUT: %.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc6_38.1: %.34 = struct_literal (%.loc6_29.1, %.loc6_37) -// CHECK:STDOUT: %.loc6_29.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_29.3: = bound_method %.loc6_17, %.loc6_29.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_29.4: = specific_function %.loc6_29.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %.loc6_29.4(%.loc6_17) [template = constants.%.27] -// CHECK:STDOUT: %.loc6_29.5: init %i32 = converted %.loc6_17, %int.convert_checked.loc6_29 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_38.2: ref %.28 = struct_access file.%b_ref.var, element0 +// CHECK:STDOUT: %.loc6_38.1: %.38 = struct_literal (%.loc6_29.1, %.loc6_37) +// CHECK:STDOUT: %.loc6_29.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_29.3: = bound_method %.loc6_17, %.loc6_29.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_29.4: = specific_function %.loc6_29.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %.loc6_29.4(%.loc6_17) [template = constants.%.31] +// CHECK:STDOUT: %.loc6_29.5: init %i32 = converted %.loc6_17, %int.convert_checked.loc6_29 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_38.2: ref %.32 = struct_access file.%b_ref.var, element0 // CHECK:STDOUT: %.loc6_29.6: ref %i32 = struct_access %.loc6_38.2, element0 -// CHECK:STDOUT: %.loc6_29.7: init %i32 = initialize_from %.loc6_29.5 to %.loc6_29.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_26, %.loc6_28.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_26) [template = constants.%.27] -// CHECK:STDOUT: %.loc6_28.5: init %i32 = converted %.loc6_26, %int.convert_checked.loc6_28 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_29.7: init %i32 = initialize_from %.loc6_29.5 to %.loc6_29.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_28.3: = bound_method %.loc6_26, %.loc6_28.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_28.4: = specific_function %.loc6_28.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_26) [template = constants.%.31] +// CHECK:STDOUT: %.loc6_28.5: init %i32 = converted %.loc6_26, %int.convert_checked.loc6_28 [template = constants.%.31] // CHECK:STDOUT: %.loc6_29.8: ref %tuple.type.2 = struct_access %.loc6_38.2, element1 // CHECK:STDOUT: %.loc6_28.6: init %tuple.type.2 = tuple_init (%.loc6_28.5) to %.loc6_29.8 [template = constants.%tuple] // CHECK:STDOUT: %.loc6_29.9: init %tuple.type.2 = converted %.loc6_28.1, %.loc6_28.6 [template = constants.%tuple] // CHECK:STDOUT: %.loc6_29.10: init %tuple.type.2 = initialize_from %.loc6_29.9 to %.loc6_29.8 [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_29.11: init %.28 = struct_init (%.loc6_29.7, %.loc6_29.10) to %.loc6_38.2 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc6_38.3: init %.28 = converted %.loc6_29.1, %.loc6_29.11 [template = constants.%struct.2] -// CHECK:STDOUT: %.loc6_38.4: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_38.5: = bound_method %.loc6_37, %.loc6_38.4 [template = constants.%.25] -// CHECK:STDOUT: %.loc6_38.6: = specific_function %.loc6_38.5, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %.loc6_38.6(%.loc6_37) [template = constants.%.27] -// CHECK:STDOUT: %.loc6_38.7: init %i32 = converted %.loc6_37, %int.convert_checked.loc6_38 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_29.11: init %.32 = struct_init (%.loc6_29.7, %.loc6_29.10) to %.loc6_38.2 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc6_38.3: init %.32 = converted %.loc6_29.1, %.loc6_29.11 [template = constants.%struct.2] +// CHECK:STDOUT: %.loc6_38.4: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_38.5: = bound_method %.loc6_37, %.loc6_38.4 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_38.6: = specific_function %.loc6_38.5, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %.loc6_38.6(%.loc6_37) [template = constants.%.31] +// CHECK:STDOUT: %.loc6_38.7: init %i32 = converted %.loc6_37, %int.convert_checked.loc6_38 [template = constants.%.31] // CHECK:STDOUT: %.loc6_38.8: ref %i32 = struct_access file.%b_ref.var, element1 -// CHECK:STDOUT: %.loc6_38.9: init %i32 = initialize_from %.loc6_38.7 to %.loc6_38.8 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_38.10: init %.29 = struct_init (%.loc6_38.3, %.loc6_38.9) to file.%b_ref.var [template = constants.%struct.3] -// CHECK:STDOUT: %.loc6_39: init %.29 = converted %.loc6_38.1, %.loc6_38.10 [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_38.9: init %i32 = initialize_from %.loc6_38.7 to %.loc6_38.8 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_38.10: init %.33 = struct_init (%.loc6_38.3, %.loc6_38.9) to file.%b_ref.var [template = constants.%struct.3] +// CHECK:STDOUT: %.loc6_39: init %.33 = converted %.loc6_38.1, %.loc6_38.10 [template = constants.%struct.3] // CHECK:STDOUT: assign file.%b_ref.var, %.loc6_39 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -279,96 +279,100 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.17: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.17 [template] -// CHECK:STDOUT: %.18: type = struct_type {.a: %i32} [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] +// CHECK:STDOUT: %.22: type = struct_type {.a: %i32} [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %.19: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] -// CHECK:STDOUT: %.20: type = struct_type {.a: %.19, .d: %i32} [template] +// CHECK:STDOUT: %.23: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] +// CHECK:STDOUT: %.24: type = struct_type {.a: %.23, .d: %i32} [template] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.26: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.26 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.26 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.29: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %.30: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %.30 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %.30 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.32: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.33: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.31: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.32: %.31 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.33: %.1 = assoc_entity element0, imports.%import_ref.42 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.17) [template] +// CHECK:STDOUT: %.35: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %.36: %.35 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.37: %.2 = assoc_entity element0, imports.%import_ref.42 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.21) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.34: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.35: = bound_method %.27, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.17) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.38: = bound_method %.28, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.17) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.26 = struct_value (%.37, %.40) [template] +// CHECK:STDOUT: %.38: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.39: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.21) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.42: = bound_method %.32, %Convert.14 [template] +// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.21) [template] +// CHECK:STDOUT: %.44: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.30 = struct_value (%.41, %.44) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { -// CHECK:STDOUT: %import_ref.1: ref %.18 = import_ref Implicit//default, inst+24, loaded -// CHECK:STDOUT: %import_ref.2: ref %.20 = import_ref Implicit//default, inst+393, loaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+452, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+496, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.1: ref %.22 = import_ref Implicit//default, inst+24, loaded +// CHECK:STDOUT: %import_ref.2: ref %.24 = import_ref Implicit//default, inst+399, loaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+458, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+502, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.39 // CHECK:STDOUT: .ImplicitAs = %import_ref.41 @@ -376,38 +380,38 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+42, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.1) = import_ref Implicit//default, inst+43, loaded [symbolic = @ImplicitAs.%.2 (constants.%.33)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+43, loaded [symbolic = @ImplicitAs.%.2 (constants.%.37)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+44, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+86, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+87, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+88, loaded [symbolic = @impl.1.%.1 (constants.%.3)] -// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+59, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+116, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+117, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+118, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+145, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+146, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+147, unloaded -// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+177, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+178, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+179, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+209, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+210, unloaded -// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+211, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+217, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+218, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+219, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+234, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+271, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+272, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+273, unloaded -// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+300, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+301, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+302, unloaded -// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+332, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+333, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+334, unloaded -// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+457, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+89, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+90, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+91, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+60, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+119, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+120, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+121, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+148, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+149, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+150, unloaded +// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+180, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+181, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+182, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+212, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+213, unloaded +// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+214, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+220, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+221, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+222, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+238, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+277, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+278, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+279, unloaded +// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+306, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+307, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+308, unloaded +// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+338, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+339, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+340, unloaded +// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+463, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -424,49 +428,49 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_13.1: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_13.1) [template = constants.%i32] // CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_13.3: type = converted %int.make_type_signed.loc4, %.loc4_13.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: %i32} [template = constants.%.18] -// CHECK:STDOUT: %a.var: ref %.18 = var a -// CHECK:STDOUT: %a: ref %.18 = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_18.1: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_16: type = struct_type {.a: %i32} [template = constants.%.22] +// CHECK:STDOUT: %a.var: ref %.22 = var a +// CHECK:STDOUT: %a: ref %.22 = bind_name a, %a.var +// CHECK:STDOUT: %.loc5_18.1: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%.loc5_18.1) [template = constants.%i32] // CHECK:STDOUT: %.loc5_18.2: type = value_of_initializer %int.make_type_signed.loc5_18 [template = constants.%i32] // CHECK:STDOUT: %.loc5_18.3: type = converted %int.make_type_signed.loc5_18, %.loc5_18.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_28: init type = call constants.%Int(%.loc5_28) [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_28) // CHECK:STDOUT: %.loc5_32.2: type = value_of_initializer %int.make_type_signed.loc5_28 [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.3: type = converted %int.make_type_signed.loc5_28, %.loc5_32.2 [template = constants.%i32] // CHECK:STDOUT: %.loc5_32.4: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%.19] -// CHECK:STDOUT: %.loc5_40.1: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc5_33: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%.23] +// CHECK:STDOUT: %.loc5_40.1: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_40: init type = call constants.%Int(%.loc5_40.1) [template = constants.%i32] // CHECK:STDOUT: %.loc5_40.2: type = value_of_initializer %int.make_type_signed.loc5_40 [template = constants.%i32] // CHECK:STDOUT: %.loc5_40.3: type = converted %int.make_type_signed.loc5_40, %.loc5_40.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.19, .d: %i32} [template = constants.%.20] -// CHECK:STDOUT: %b.var: ref %.20 = var b -// CHECK:STDOUT: %b: ref %.20 = bind_name b, %b.var +// CHECK:STDOUT: %.loc5_43: type = struct_type {.a: %.23, .d: %i32} [template = constants.%.24] +// CHECK:STDOUT: %b.var: ref %.24 = var b +// CHECK:STDOUT: %b: ref %.24 = bind_name b, %b.var // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_16: Core.IntLiteral = int_value 1 [template = constants.%.27] -// CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 2 [template = constants.%.28] -// CHECK:STDOUT: %.loc6_25.1: %.29 = struct_literal (%.loc6_16, %.loc6_24) -// CHECK:STDOUT: %.loc6_25.2: %Convert.type.13 = interface_witness_access constants.%.34, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_25.3: = bound_method %.loc6_16, %.loc6_25.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc6_25.4: = specific_function %.loc6_25.3, @Convert.2(constants.%.17) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %.loc6_25.4(%.loc6_16) [template = constants.%.37] -// CHECK:STDOUT: %.loc6_25.5: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc6_25.6: %i32 = converted %.loc6_16, %.loc6_25.5 [template = constants.%.37] -// CHECK:STDOUT: %.loc6_25.7: %Convert.type.13 = interface_witness_access constants.%.34, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_25.8: = bound_method %.loc6_24, %.loc6_25.7 [template = constants.%.38] -// CHECK:STDOUT: %.loc6_25.9: = specific_function %.loc6_25.8, @Convert.2(constants.%.17) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %.loc6_25.9(%.loc6_24) [template = constants.%.40] -// CHECK:STDOUT: %.loc6_25.10: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%.40] -// CHECK:STDOUT: %.loc6_25.11: %i32 = converted %.loc6_24, %.loc6_25.10 [template = constants.%.40] -// CHECK:STDOUT: %struct: %.26 = struct_value (%.loc6_25.6, %.loc6_25.11) [template = constants.%struct] -// CHECK:STDOUT: %.loc6_9: %.26 = converted %.loc6_25.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc6_16: Core.IntLiteral = int_value 1 [template = constants.%.31] +// CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 2 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_25.1: %.33 = struct_literal (%.loc6_16, %.loc6_24) +// CHECK:STDOUT: %.loc6_25.2: %Convert.type.13 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_25.3: = bound_method %.loc6_16, %.loc6_25.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc6_25.4: = specific_function %.loc6_25.3, @Convert.2(constants.%.21) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %.loc6_25.4(%.loc6_16) [template = constants.%.41] +// CHECK:STDOUT: %.loc6_25.5: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%.41] +// CHECK:STDOUT: %.loc6_25.6: %i32 = converted %.loc6_16, %.loc6_25.5 [template = constants.%.41] +// CHECK:STDOUT: %.loc6_25.7: %Convert.type.13 = interface_witness_access constants.%.38, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_25.8: = bound_method %.loc6_24, %.loc6_25.7 [template = constants.%.42] +// CHECK:STDOUT: %.loc6_25.9: = specific_function %.loc6_25.8, @Convert.2(constants.%.21) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %.loc6_25.9(%.loc6_24) [template = constants.%.44] +// CHECK:STDOUT: %.loc6_25.10: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%.44] +// CHECK:STDOUT: %.loc6_25.11: %i32 = converted %.loc6_24, %.loc6_25.10 [template = constants.%.44] +// CHECK:STDOUT: %struct: %.30 = struct_value (%.loc6_25.6, %.loc6_25.11) [template = constants.%struct] +// CHECK:STDOUT: %.loc6_9: %.30 = converted %.loc6_25.1, %struct [template = constants.%struct] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var @@ -481,8 +485,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -501,8 +505,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -521,7 +525,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -538,7 +542,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -554,7 +558,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -570,7 +574,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -587,7 +591,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -604,7 +608,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -620,7 +624,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -636,7 +640,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -644,9 +648,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.26) { -// CHECK:STDOUT: %S: %.26 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.26 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %.30) { +// CHECK:STDOUT: %S: %.30 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %.30 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -660,8 +664,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -704,8 +709,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -748,17 +754,17 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a_ref.ref: ref %.18 = name_ref a_ref, imports.%import_ref.1 +// CHECK:STDOUT: %a_ref.ref: ref %.22 = name_ref a_ref, imports.%import_ref.1 // CHECK:STDOUT: %.loc4_20.1: ref %i32 = struct_access %a_ref.ref, element0 // CHECK:STDOUT: %.loc4_20.2: %i32 = bind_value %.loc4_20.1 -// CHECK:STDOUT: %.loc4_20.3: init %.18 = struct_init (%.loc4_20.2) to file.%a.var -// CHECK:STDOUT: %.loc4_25: init %.18 = converted %a_ref.ref, %.loc4_20.3 +// CHECK:STDOUT: %.loc4_20.3: init %.22 = struct_init (%.loc4_20.2) to file.%a.var +// CHECK:STDOUT: %.loc4_25: init %.22 = converted %a_ref.ref, %.loc4_20.3 // CHECK:STDOUT: assign file.%a.var, %.loc4_25 -// CHECK:STDOUT: %b_ref.ref: ref %.20 = name_ref b_ref, imports.%import_ref.2 -// CHECK:STDOUT: %.loc5_47.1: ref %.19 = struct_access %b_ref.ref, element0 +// CHECK:STDOUT: %b_ref.ref: ref %.24 = name_ref b_ref, imports.%import_ref.2 +// CHECK:STDOUT: %.loc5_47.1: ref %.23 = struct_access %b_ref.ref, element0 // CHECK:STDOUT: %.loc5_47.2: ref %i32 = struct_access %.loc5_47.1, element0 // CHECK:STDOUT: %.loc5_47.3: %i32 = bind_value %.loc5_47.2 -// CHECK:STDOUT: %.loc5_47.4: ref %.19 = struct_access file.%b.var, element0 +// CHECK:STDOUT: %.loc5_47.4: ref %.23 = struct_access file.%b.var, element0 // CHECK:STDOUT: %.loc5_47.5: ref %i32 = struct_access %.loc5_47.4, element0 // CHECK:STDOUT: %.loc5_47.6: init %i32 = initialize_from %.loc5_47.3 to %.loc5_47.5 // CHECK:STDOUT: %.loc5_47.7: ref %tuple.type.2 = struct_access %.loc5_47.1, element1 @@ -768,14 +774,14 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc5_47.11: init %tuple.type.2 = tuple_init (%.loc5_47.9) to %.loc5_47.10 // CHECK:STDOUT: %.loc5_47.12: init %tuple.type.2 = converted %.loc5_47.7, %.loc5_47.11 // CHECK:STDOUT: %.loc5_47.13: init %tuple.type.2 = initialize_from %.loc5_47.12 to %.loc5_47.10 -// CHECK:STDOUT: %.loc5_47.14: init %.19 = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4 -// CHECK:STDOUT: %.loc5_47.15: init %.19 = converted %.loc5_47.1, %.loc5_47.14 +// CHECK:STDOUT: %.loc5_47.14: init %.23 = struct_init (%.loc5_47.6, %.loc5_47.13) to %.loc5_47.4 +// CHECK:STDOUT: %.loc5_47.15: init %.23 = converted %.loc5_47.1, %.loc5_47.14 // CHECK:STDOUT: %.loc5_47.16: ref %i32 = struct_access %b_ref.ref, element1 // CHECK:STDOUT: %.loc5_47.17: %i32 = bind_value %.loc5_47.16 // CHECK:STDOUT: %.loc5_47.18: ref %i32 = struct_access file.%b.var, element1 // CHECK:STDOUT: %.loc5_47.19: init %i32 = initialize_from %.loc5_47.17 to %.loc5_47.18 -// CHECK:STDOUT: %.loc5_47.20: init %.20 = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var -// CHECK:STDOUT: %.loc5_52: init %.20 = converted %b_ref.ref, %.loc5_47.20 +// CHECK:STDOUT: %.loc5_47.20: init %.24 = struct_init (%.loc5_47.15, %.loc5_47.19) to file.%b.var +// CHECK:STDOUT: %.loc5_52: init %.24 = converted %b_ref.ref, %.loc5_47.20 // CHECK:STDOUT: assign file.%b.var, %.loc5_52 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] // CHECK:STDOUT: %.loc6: ref %C.3 = splice_block file.%c.var {} @@ -827,6 +833,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -872,8 +879,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -953,6 +960,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -998,8 +1006,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1050,24 +1058,24 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.31 -// CHECK:STDOUT: %.2 => constants.%.32 +// CHECK:STDOUT: %.1 => constants.%.35 +// CHECK:STDOUT: %.2 => constants.%.36 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.17) { -// CHECK:STDOUT: %N => constants.%.17 -// CHECK:STDOUT: %N.patt => constants.%.17 +// CHECK:STDOUT: specific @impl.1(constants.%.21) { +// CHECK:STDOUT: %N => constants.%.21 +// CHECK:STDOUT: %N.patt => constants.%.21 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.34 +// CHECK:STDOUT: %.1 => constants.%.38 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.17) { -// CHECK:STDOUT: %N => constants.%.17 +// CHECK:STDOUT: specific @Convert.2(constants.%.21) { +// CHECK:STDOUT: %N => constants.%.21 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1094,76 +1102,80 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.19: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.19 [template] -// CHECK:STDOUT: %.20: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.20 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.20 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.22: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.23: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] +// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] +// CHECK:STDOUT: %.24: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.27: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.25: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.26: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %.20 = struct_value (%.26, %.25) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %.24 = struct_value (%.30, %.29) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+24, unloaded -// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+393, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+452, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+496, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+399, unloaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+458, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+502, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -1171,36 +1183,36 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+42, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Implicit//default, inst+43, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+44, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+86, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+87, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10 = import_ref Implicit//default, inst+88, unloaded -// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+59, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+116, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+117, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+118, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+145, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+146, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+147, unloaded -// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+177, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+178, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+179, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+209, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+210, unloaded -// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+211, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+217, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+218, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+219, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+234, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+271, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+272, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+273, unloaded -// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+300, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+301, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+302, unloaded -// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+332, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+333, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+334, unloaded -// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+457, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+89, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+90, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.10 = import_ref Implicit//default, inst+91, unloaded +// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+60, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+119, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+120, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+121, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+148, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+149, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+150, unloaded +// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+180, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+181, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+182, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+212, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+213, unloaded +// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+214, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+220, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+221, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+222, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+238, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+277, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+278, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+279, unloaded +// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+306, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+307, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+308, unloaded +// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+338, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+339, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+340, unloaded +// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+463, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1216,9 +1228,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.21] -// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 2 [template = constants.%.22] -// CHECK:STDOUT: %.loc11_29: %.23 = struct_literal (%.loc11_20, %.loc11_28) +// CHECK:STDOUT: %.loc11_20: Core.IntLiteral = int_value 1 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 2 [template = constants.%.26] +// CHECK:STDOUT: %.loc11_29: %.27 = struct_literal (%.loc11_20, %.loc11_28) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -1232,8 +1244,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1252,8 +1264,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1272,7 +1284,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -1289,7 +1301,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -1305,7 +1317,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -1321,7 +1333,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -1338,7 +1350,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -1355,7 +1367,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -1371,7 +1383,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -1387,7 +1399,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -1395,9 +1407,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.20) { -// CHECK:STDOUT: %S: %.20 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.20 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %.24) { +// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -1411,8 +1423,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -1455,8 +1468,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -1549,6 +1563,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -1594,8 +1609,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -1675,6 +1690,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1720,8 +1736,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1784,136 +1800,140 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.19: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.19 [template] -// CHECK:STDOUT: %.20: type = struct_type {.a: %i32, .b: %i32} [template] -// CHECK:STDOUT: %S: %.20 = bind_symbolic_name S, 0 [symbolic] -// CHECK:STDOUT: %S.patt: %.20 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.22: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %.23: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] +// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] +// CHECK:STDOUT: %.24: type = struct_type {.a: %i32, .b: %i32} [template] +// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic] +// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic] +// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.27: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.25: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.27: %.1 = assoc_entity element0, imports.%import_ref.41 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.19) [template] +// CHECK:STDOUT: %.29: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.31: %.2 = assoc_entity element0, imports.%import_ref.41 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.23) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.21, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.19) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.32: = bound_method %.22, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.19) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct.1: %.20 = struct_value (%.31, %.34) [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.25, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.23) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.36: = bound_method %.26, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.23) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct.1: %.24 = struct_value (%.35, %.38) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%struct.1) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.37: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct.2: %.20 = struct_value (%.37, %.36) [template] +// CHECK:STDOUT: %.40: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.41: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct.2: %.24 = struct_value (%.41, %.40) [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%struct.2) [template] // CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.3)> [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.38: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] -// CHECK:STDOUT: %.39: %.38 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.42: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] +// CHECK:STDOUT: %.43: %.42 = assoc_entity element0, imports.%import_ref.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+24, unloaded -// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+393, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+452, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+496, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+399, unloaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+458, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+502, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.40 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+42, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.1) = import_ref Implicit//default, inst+43, loaded [symbolic = @ImplicitAs.%.2 (constants.%.27)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+43, loaded [symbolic = @ImplicitAs.%.2 (constants.%.31)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+44, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+86, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+87, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+88, loaded [symbolic = @impl.1.%.1 (constants.%.3)] -// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+59, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+116, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+117, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+118, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+145, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+146, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+147, unloaded -// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+177, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+178, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+179, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+209, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+210, unloaded -// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+211, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+217, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+218, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+219, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+234, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+271, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+272, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+273, unloaded -// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+300, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+301, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+302, unloaded -// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+332, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+333, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+334, unloaded -// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+457, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+89, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+90, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+91, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+60, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+119, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+120, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+121, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+148, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+149, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+150, unloaded +// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+180, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+181, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+182, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+212, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+213, unloaded +// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+214, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+220, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+221, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+222, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+238, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+277, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+278, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+279, unloaded +// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+306, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+307, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+308, unloaded +// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+338, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+339, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+340, unloaded +// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+463, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1929,23 +1949,23 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_20: Core.IntLiteral = int_value 3 [template = constants.%.21] -// CHECK:STDOUT: %.loc9_28: Core.IntLiteral = int_value 4 [template = constants.%.22] -// CHECK:STDOUT: %.loc9_29.1: %.23 = struct_literal (%.loc9_20, %.loc9_28) -// CHECK:STDOUT: %.loc9_29.2: %Convert.type.13 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_29.3: = bound_method %.loc9_20, %.loc9_29.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_29.4: = specific_function %.loc9_29.3, @Convert.2(constants.%.19) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %.loc9_29.4(%.loc9_20) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_29.5: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_29.6: %i32 = converted %.loc9_20, %.loc9_29.5 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_29.7: %Convert.type.13 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_29.8: = bound_method %.loc9_28, %.loc9_29.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_29.9: = specific_function %.loc9_29.8, @Convert.2(constants.%.19) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %.loc9_29.9(%.loc9_28) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_29.10: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_29.11: %i32 = converted %.loc9_28, %.loc9_29.10 [template = constants.%.34] -// CHECK:STDOUT: %struct: %.20 = struct_value (%.loc9_29.6, %.loc9_29.11) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_13: %.20 = converted %.loc9_29.1, %struct [template = constants.%struct.1] +// CHECK:STDOUT: %.loc9_20: Core.IntLiteral = int_value 3 [template = constants.%.25] +// CHECK:STDOUT: %.loc9_28: Core.IntLiteral = int_value 4 [template = constants.%.26] +// CHECK:STDOUT: %.loc9_29.1: %.27 = struct_literal (%.loc9_20, %.loc9_28) +// CHECK:STDOUT: %.loc9_29.2: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_29.3: = bound_method %.loc9_20, %.loc9_29.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_29.4: = specific_function %.loc9_29.3, @Convert.2(constants.%.23) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %.loc9_29.4(%.loc9_20) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_29.5: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_29.6: %i32 = converted %.loc9_20, %.loc9_29.5 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_29.7: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_29.8: = bound_method %.loc9_28, %.loc9_29.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_29.9: = specific_function %.loc9_29.8, @Convert.2(constants.%.23) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %.loc9_29.9(%.loc9_28) [template = constants.%.38] +// CHECK:STDOUT: %.loc9_29.10: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_29.11: %i32 = converted %.loc9_28, %.loc9_29.10 [template = constants.%.38] +// CHECK:STDOUT: %struct: %.24 = struct_value (%.loc9_29.6, %.loc9_29.11) [template = constants.%struct.1] +// CHECK:STDOUT: %.loc9_13: %.24 = converted %.loc9_29.1, %struct [template = constants.%struct.1] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var @@ -1960,8 +1980,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1980,8 +2000,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2000,7 +2020,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -2017,7 +2037,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -2033,7 +2053,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -2049,7 +2069,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -2066,7 +2086,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -2083,7 +2103,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -2099,7 +2119,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -2115,7 +2135,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -2123,9 +2143,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: generic class @C(constants.%S: %.20) { -// CHECK:STDOUT: %S: %.20 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] -// CHECK:STDOUT: %S.patt: %.20 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] +// CHECK:STDOUT: generic class @C(constants.%S: %.24) { +// CHECK:STDOUT: %S: %.24 = bind_symbolic_name S, 0 [symbolic = %S (constants.%S)] +// CHECK:STDOUT: %S.patt: %.24 = symbolic_binding_pattern S, 0 [symbolic = %S.patt (constants.%S.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: @@ -2139,8 +2159,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -2183,8 +2204,9 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -2278,6 +2300,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -2323,8 +2346,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -2404,6 +2427,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -2449,8 +2473,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -2501,24 +2525,24 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.25 -// CHECK:STDOUT: %.2 => constants.%.26 +// CHECK:STDOUT: %.1 => constants.%.29 +// CHECK:STDOUT: %.2 => constants.%.30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.19) { -// CHECK:STDOUT: %N => constants.%.19 -// CHECK:STDOUT: %N.patt => constants.%.19 +// CHECK:STDOUT: specific @impl.1(constants.%.23) { +// CHECK:STDOUT: %N => constants.%.23 +// CHECK:STDOUT: %N.patt => constants.%.23 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.28 +// CHECK:STDOUT: %.1 => constants.%.32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.19) { -// CHECK:STDOUT: %N => constants.%.19 +// CHECK:STDOUT: specific @Convert.2(constants.%.23) { +// CHECK:STDOUT: %N => constants.%.23 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2547,7 +2571,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.15 // CHECK:STDOUT: %Convert => constants.%Convert.15 -// CHECK:STDOUT: %.1 => constants.%.38 -// CHECK:STDOUT: %.2 => constants.%.39 +// CHECK:STDOUT: %.1 => constants.%.42 +// CHECK:STDOUT: %.2 => constants.%.43 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index df9024e444dc..99ab023533a5 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -29,11 +29,11 @@ var z: i32 = y; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.2) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.27: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.28: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.2) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 1 [template] -// CHECK:STDOUT: %struct: %.3 = struct_value (%.5, %.30) [template] +// CHECK:STDOUT: %.31: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.32: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.2) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] +// CHECK:STDOUT: %struct: %.3 = struct_value (%.5, %.34) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -86,13 +86,13 @@ var z: i32 = y; // CHECK:STDOUT: %.loc11_46.1: %.7 = struct_literal (%.loc11_35, %.loc11_45) // CHECK:STDOUT: %.loc11_46.2: ref f64 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %.loc11_35 to %.loc11_46.2 [template = constants.%.5] -// CHECK:STDOUT: %.loc11_46.4: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_46.5: = bound_method %.loc11_45, %.loc11_46.4 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_46.6: = specific_function %.loc11_46.5, @Convert.2(constants.%.2) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_46.6(%.loc11_45) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_46.7: init %i32 = converted %.loc11_45, %int.convert_checked [template = constants.%.30] +// CHECK:STDOUT: %.loc11_46.4: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_46.5: = bound_method %.loc11_45, %.loc11_46.4 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_46.6: = specific_function %.loc11_46.5, @Convert.2(constants.%.2) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_46.6(%.loc11_45) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_46.7: init %i32 = converted %.loc11_45, %int.convert_checked [template = constants.%.34] // CHECK:STDOUT: %.loc11_46.8: ref %i32 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_46.9: init %i32 = initialize_from %.loc11_46.7 to %.loc11_46.8 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_46.9: init %i32 = initialize_from %.loc11_46.7 to %.loc11_46.8 [template = constants.%.34] // CHECK:STDOUT: %.loc11_46.10: init %.3 = struct_init (%.loc11_46.3, %.loc11_46.9) to file.%x.var [template = constants.%struct] // CHECK:STDOUT: %.loc11_47: init %.3 = converted %.loc11_46.1, %.loc11_46.10 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_47 diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 90278e00d026..d7d237ab487e 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -24,11 +24,11 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 4 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.27) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 4 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.31) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -67,11 +67,11 @@ var y: {.a: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 4 [template = constants.%.3] // CHECK:STDOUT: %.loc11_27.1: %.4 = struct_literal (%.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_26, %.loc11_27.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.4(%.loc11_26) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_26, %int.convert_checked [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_26, %.loc11_27.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_27.4(%.loc11_26) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_26, %int.convert_checked [template = constants.%.31] // CHECK:STDOUT: %.loc11_27.6: init %.2 = struct_init (%.loc11_27.5) to file.%x.var [template = constants.%struct] // CHECK:STDOUT: %.loc11_28: init %.2 = converted %.loc11_27.1, %.loc11_27.6 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc11_28 diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index f077d82b97e4..a1bc0474fa7b 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -28,15 +28,15 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.32) [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.29, %tuple) [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.36) [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -89,18 +89,18 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %.loc11_47: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.3 = tuple_literal (%.loc11_47) // CHECK:STDOUT: %.loc11_50.1: %.6 = struct_literal (%.loc11_38, %.loc11_49.1) -// CHECK:STDOUT: %.loc11_50.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_50.3: = bound_method %.loc11_38, %.loc11_50.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_50.4: = specific_function %.loc11_50.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_50: init %i32 = call %.loc11_50.4(%.loc11_38) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_50.5: init %i32 = converted %.loc11_38, %int.convert_checked.loc11_50 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_50.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_50.3: = bound_method %.loc11_38, %.loc11_50.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_50.4: = specific_function %.loc11_50.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_50: init %i32 = call %.loc11_50.4(%.loc11_38) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_50.5: init %i32 = converted %.loc11_38, %int.convert_checked.loc11_50 [template = constants.%.33] // CHECK:STDOUT: %.loc11_50.6: ref %i32 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc11_50.7: init %i32 = initialize_from %.loc11_50.5 to %.loc11_50.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_49.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_49.3: = bound_method %.loc11_47, %.loc11_49.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_49.4: = specific_function %.loc11_49.3, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc11_49: init %i32 = call %.loc11_49.4(%.loc11_47) [template = constants.%.32] -// CHECK:STDOUT: %.loc11_49.5: init %i32 = converted %.loc11_47, %int.convert_checked.loc11_49 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_50.7: init %i32 = initialize_from %.loc11_50.5 to %.loc11_50.6 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_49.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_49.3: = bound_method %.loc11_47, %.loc11_49.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_49.4: = specific_function %.loc11_49.3, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc11_49: init %i32 = call %.loc11_49.4(%.loc11_47) [template = constants.%.36] +// CHECK:STDOUT: %.loc11_49.5: init %i32 = converted %.loc11_47, %int.convert_checked.loc11_49 [template = constants.%.36] // CHECK:STDOUT: %.loc11_50.8: ref %tuple.type.2 = struct_access file.%x.var, element1 // CHECK:STDOUT: %.loc11_49.6: init %tuple.type.2 = tuple_init (%.loc11_49.5) to %.loc11_50.8 [template = constants.%tuple] // CHECK:STDOUT: %.loc11_50.9: init %tuple.type.2 = converted %.loc11_49.1, %.loc11_49.6 [template = constants.%tuple] diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index c718e9bd3e5a..9ff9d3a3a09b 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -28,14 +28,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] -// CHECK:STDOUT: %struct: %.2 = struct_value (%.29, %.32) [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] +// CHECK:STDOUT: %struct: %.2 = struct_value (%.33, %.36) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -103,18 +103,18 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc11_35: Core.IntLiteral = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc11_43: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc11_44.1: %.6 = struct_literal (%.loc11_35, %.loc11_43) -// CHECK:STDOUT: %.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_44.3: = bound_method %.loc11_35, %.loc11_44.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_44.4: = specific_function %.loc11_44.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %.loc11_44.4(%.loc11_35) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_44.5: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_44.6: %i32 = converted %.loc11_35, %.loc11_44.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_44.7: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_44.8: = bound_method %.loc11_43, %.loc11_44.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_44.9: = specific_function %.loc11_44.8, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc11_44.2: init %i32 = call %.loc11_44.9(%.loc11_43) [template = constants.%.32] -// CHECK:STDOUT: %.loc11_44.10: %i32 = value_of_initializer %int.convert_checked.loc11_44.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc11_44.11: %i32 = converted %.loc11_43, %.loc11_44.10 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_44.3: = bound_method %.loc11_35, %.loc11_44.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_44.4: = specific_function %.loc11_44.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %.loc11_44.4(%.loc11_35) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_44.5: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_44.6: %i32 = converted %.loc11_35, %.loc11_44.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_44.7: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_44.8: = bound_method %.loc11_43, %.loc11_44.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_44.9: = specific_function %.loc11_44.8, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc11_44.2: init %i32 = call %.loc11_44.9(%.loc11_43) [template = constants.%.36] +// CHECK:STDOUT: %.loc11_44.10: %i32 = value_of_initializer %int.convert_checked.loc11_44.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc11_44.11: %i32 = converted %.loc11_43, %.loc11_44.10 [template = constants.%.36] // CHECK:STDOUT: %struct: %.2 = struct_value (%.loc11_44.6, %.loc11_44.11) [template = constants.%struct] // CHECK:STDOUT: %.loc11_45: %.2 = converted %.loc11_44.1, %struct [template = constants.%struct] // CHECK:STDOUT: %v: %.2 = bind_name v, %.loc11_45 @@ -123,20 +123,20 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%.4] // CHECK:STDOUT: %.loc14_43: Core.IntLiteral = int_value 2 [template = constants.%.5] // CHECK:STDOUT: %.loc14_44.1: %.6 = struct_literal (%.loc14_35, %.loc14_43) -// CHECK:STDOUT: %.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_44.3: = bound_method %.loc14_35, %.loc14_44.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_44.4: = specific_function %.loc14_44.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %.loc14_44.4(%.loc14_35) [template = constants.%.29] -// CHECK:STDOUT: %.loc14_44.5: init %i32 = converted %.loc14_35, %int.convert_checked.loc14_44.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_44.3: = bound_method %.loc14_35, %.loc14_44.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_44.4: = specific_function %.loc14_44.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %.loc14_44.4(%.loc14_35) [template = constants.%.33] +// CHECK:STDOUT: %.loc14_44.5: init %i32 = converted %.loc14_35, %int.convert_checked.loc14_44.1 [template = constants.%.33] // CHECK:STDOUT: %.loc14_44.6: ref %i32 = struct_access file.%x.var, element0 -// CHECK:STDOUT: %.loc14_44.7: init %i32 = initialize_from %.loc14_44.5 to %.loc14_44.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc14_44.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_44.9: = bound_method %.loc14_43, %.loc14_44.8 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_44.10: = specific_function %.loc14_44.9, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %.loc14_44.10(%.loc14_43) [template = constants.%.32] -// CHECK:STDOUT: %.loc14_44.11: init %i32 = converted %.loc14_43, %int.convert_checked.loc14_44.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_44.7: init %i32 = initialize_from %.loc14_44.5 to %.loc14_44.6 [template = constants.%.33] +// CHECK:STDOUT: %.loc14_44.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_44.9: = bound_method %.loc14_43, %.loc14_44.8 [template = constants.%.34] +// CHECK:STDOUT: %.loc14_44.10: = specific_function %.loc14_44.9, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %.loc14_44.10(%.loc14_43) [template = constants.%.36] +// CHECK:STDOUT: %.loc14_44.11: init %i32 = converted %.loc14_43, %int.convert_checked.loc14_44.2 [template = constants.%.36] // CHECK:STDOUT: %.loc14_44.12: ref %i32 = struct_access file.%x.var, element1 -// CHECK:STDOUT: %.loc14_44.13: init %i32 = initialize_from %.loc14_44.11 to %.loc14_44.12 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_44.13: init %i32 = initialize_from %.loc14_44.11 to %.loc14_44.12 [template = constants.%.36] // CHECK:STDOUT: %.loc14_44.14: init %.2 = struct_init (%.loc14_44.7, %.loc14_44.13) to file.%x.var [template = constants.%struct] // CHECK:STDOUT: %.loc14_45: init %.2 = converted %.loc14_44.1, %.loc14_44.14 [template = constants.%struct] // CHECK:STDOUT: assign file.%x.var, %.loc14_45 diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index c90b76fd6305..310f4dfc3f73 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -26,12 +26,12 @@ var c: i32 = b.0; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 12 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.25) [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,11 +79,11 @@ var c: i32 = b.0; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 12 [template = constants.%.2] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_21.3: = bound_method %.loc11_18, %.loc11_21.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_21.4: = specific_function %.loc11_21.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_21.4(%.loc11_18) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_21.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc11_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_21.3: = bound_method %.loc11_18, %.loc11_21.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_21.4: = specific_function %.loc11_21.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_21.4(%.loc11_18) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_21.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: %.loc11_21.6: init %tuple.type.2 = tuple_init (%.loc11_21.5) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_22 @@ -94,7 +94,7 @@ var c: i32 = b.0; // CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.3 // CHECK:STDOUT: assign file.%b.var, %.loc12_18 // CHECK:STDOUT: %b.ref: ref %tuple.type.2 = name_ref b, file.%b -// CHECK:STDOUT: %.loc13_16: Core.IntLiteral = int_value 0 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_16: Core.IntLiteral = int_value 0 [template = constants.%.30] // CHECK:STDOUT: %.loc13_15.1: ref %i32 = tuple_access %b.ref, element0 // CHECK:STDOUT: %.loc13_15.2: %i32 = bind_value %.loc13_15.1 // CHECK:STDOUT: assign file.%c.var, %.loc13_15.2 diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index c42387ffc233..4ad6051b9194 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -29,14 +29,14 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,20 +80,20 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index 98c986a00a10..c6fdf70bd053 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -34,13 +34,13 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 12 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.25) [template] -// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 2147483647 [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] +// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2147483647 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -95,11 +95,11 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 12 [template = constants.%.2] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_21.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_21.3: = bound_method %.loc11_18, %.loc11_21.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_21.4: = specific_function %.loc11_21.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_21.4(%.loc11_18) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_21.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc11_21.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_21.3: = bound_method %.loc11_18, %.loc11_21.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_21.4: = specific_function %.loc11_21.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_21.4(%.loc11_18) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_21.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: %.loc11_21.6: init %tuple.type.2 = tuple_init (%.loc11_21.5) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_22: init %tuple.type.2 = converted %.loc11_21.1, %.loc11_21.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_22 @@ -110,10 +110,10 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: %.loc12_18: init %tuple.type.2 = converted %a.ref, %.loc12_17.3 // CHECK:STDOUT: assign file.%b.var, %.loc12_18 // CHECK:STDOUT: %b.ref.loc17: ref %tuple.type.2 = name_ref b, file.%b -// CHECK:STDOUT: %.loc17: Core.IntLiteral = int_value 1 [template = constants.%.26] +// CHECK:STDOUT: %.loc17: Core.IntLiteral = int_value 1 [template = constants.%.30] // CHECK:STDOUT: assign file.%c.var, // CHECK:STDOUT: %b.ref.loc21: ref %tuple.type.2 = name_ref b, file.%b -// CHECK:STDOUT: %.loc21: Core.IntLiteral = int_value 2147483647 [template = constants.%.27] +// CHECK:STDOUT: %.loc21: Core.IntLiteral = int_value 2147483647 [template = constants.%.31] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index 9bcde9b52c72..e5d3aa06b952 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -29,15 +29,15 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 10 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 10 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -82,25 +82,25 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 10 [template = constants.%.31] +// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 10 [template = constants.%.35] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index 035c2f0bb922..3e540d9401ed 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -30,18 +30,18 @@ var c: i32 = a.(b); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %.32: = bound_method %.31, %Convert.14 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] // CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 0 [template] +// CHECK:STDOUT: %.34: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 0 [template] +// CHECK:STDOUT: %.36: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -92,29 +92,29 @@ var c: i32 = a.(b); // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 3 [template = constants.%.4] // CHECK:STDOUT: %.loc11_26.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_25) -// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_22, %.loc11_26.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_26.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.3: = bound_method %.loc11_22, %.loc11_26.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_26.4: = specific_function %.loc11_26.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %.loc11_26.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_26.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_26.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_26.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_26.7: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_26.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_26.9: = bound_method %.loc11_25, %.loc11_26.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_26.10: = specific_function %.loc11_26.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.10(%.loc11_25) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_26.11: init %i32 = converted %.loc11_25, %int.convert_checked.loc11_26.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_26.7: init %i32 = initialize_from %.loc11_26.5 to %.loc11_26.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_26.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_26.9: = bound_method %.loc11_25, %.loc11_26.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_26.10: = specific_function %.loc11_26.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %.loc11_26.10(%.loc11_25) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_26.11: init %i32 = converted %.loc11_25, %int.convert_checked.loc11_26.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_26.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_26.13: init %i32 = initialize_from %.loc11_26.11 to %.loc11_26.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_26.13: init %i32 = initialize_from %.loc11_26.11 to %.loc11_26.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_26.14: init %tuple.type.2 = tuple_init (%.loc11_26.7, %.loc11_26.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_27: init %tuple.type.2 = converted %.loc11_26.1, %.loc11_26.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 -// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 0 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_15.1: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc12_15.2: = bound_method %.loc12_14, %.loc12_15.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_15.3: = specific_function %.loc12_15.2, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_15.3(%.loc12_14) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_15.4: init %i32 = converted %.loc12_14, %int.convert_checked.loc12 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_14: Core.IntLiteral = int_value 0 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_15.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc12_15.2: = bound_method %.loc12_14, %.loc12_15.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_15.3: = specific_function %.loc12_15.2, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_15.3(%.loc12_14) [template = constants.%.38] +// CHECK:STDOUT: %.loc12_15.4: init %i32 = converted %.loc12_14, %int.convert_checked.loc12 [template = constants.%.38] // CHECK:STDOUT: assign file.%b.var, %.loc12_15.4 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %b.ref: ref %i32 = name_ref b, file.%b diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index 46447c05f5cd..be427ecbbb2f 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -32,15 +32,15 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: f64 = float_literal 2.6000000000000001 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: f64 = float_literal 2.6000000000000001 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -84,25 +84,25 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.31] +// CHECK:STDOUT: %.loc18_17.1: f64 = float_literal 2.6000000000000001 [template = constants.%.35] // CHECK:STDOUT: %.loc18_17.2: Core.IntLiteral = converted %.loc18_17.1, [template = ] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon index dd4e5f3a7abd..896bb3204a7e 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -29,22 +29,22 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %.2: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.5: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.7: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.5 [template] -// CHECK:STDOUT: %.6: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.7: type = array_type %.6, %i32 [template] -// CHECK:STDOUT: %.9: Core.IntLiteral = int_value 5 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.7 [template] +// CHECK:STDOUT: %.8: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.9: type = array_type %.8, %i32 [template] +// CHECK:STDOUT: %.11: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.5) [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.7) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.29: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.30: = bound_method %.9, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.5) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 5 [template] -// CHECK:STDOUT: %array: %.7 = tuple_value (%.32, %.32) [template] +// CHECK:STDOUT: %.35: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.36: = bound_method %.11, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.7) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 5 [template] +// CHECK:STDOUT: %array: %.9 = tuple_value (%.38, %.38) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,43 +70,43 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc16_3: Core.IntLiteral = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %.loc16_5: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc18_19.1: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc18: init type = call constants.%Int(%.loc18_19.1) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 2 [template = constants.%.6] +// CHECK:STDOUT: %.loc18_24: Core.IntLiteral = int_value 2 [template = constants.%.8] // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %int.make_type_signed.loc18 [template = constants.%i32] // CHECK:STDOUT: %.loc18_19.3: type = converted %int.make_type_signed.loc18, %.loc18_19.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_25: type = array_type %.loc18_24, %i32 [template = constants.%.7] -// CHECK:STDOUT: %non_tuple.var: ref %.7 = var non_tuple -// CHECK:STDOUT: %non_tuple: ref %.7 = bind_name non_tuple, %non_tuple.var -// CHECK:STDOUT: %.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%.9] -// CHECK:STDOUT: %.loc18_33: Core.IntLiteral = int_value 5 [template = constants.%.9] +// CHECK:STDOUT: %.loc18_25: type = array_type %.loc18_24, %i32 [template = constants.%.9] +// CHECK:STDOUT: %non_tuple.var: ref %.9 = var non_tuple +// CHECK:STDOUT: %non_tuple: ref %.9 = bind_name non_tuple, %non_tuple.var +// CHECK:STDOUT: %.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%.11] +// CHECK:STDOUT: %.loc18_33: Core.IntLiteral = int_value 5 [template = constants.%.11] // CHECK:STDOUT: %.loc18_34.1: %tuple.type = tuple_literal (%.loc18_30, %.loc18_33) -// CHECK:STDOUT: %.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_34.3: = bound_method %.loc18_30, %.loc18_34.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_34.4: = specific_function %.loc18_34.3, @Convert.2(constants.%.5) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc18_34.1: init %i32 = call %.loc18_34.4(%.loc18_30) [template = constants.%.32] -// CHECK:STDOUT: %.loc18_34.5: init %i32 = converted %.loc18_30, %int.convert_checked.loc18_34.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_34.3: = bound_method %.loc18_30, %.loc18_34.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc18_34.4: = specific_function %.loc18_34.3, @Convert.2(constants.%.7) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc18_34.1: init %i32 = call %.loc18_34.4(%.loc18_30) [template = constants.%.38] +// CHECK:STDOUT: %.loc18_34.5: init %i32 = converted %.loc18_30, %int.convert_checked.loc18_34.1 [template = constants.%.38] // CHECK:STDOUT: %.loc18_34.6: Core.IntLiteral = int_value 0 [template = constants.%.1] // CHECK:STDOUT: %.loc18_34.7: ref %i32 = array_index %non_tuple.var, %.loc18_34.6 -// CHECK:STDOUT: %.loc18_34.8: init %i32 = initialize_from %.loc18_34.5 to %.loc18_34.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc18_34.9: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_34.10: = bound_method %.loc18_33, %.loc18_34.9 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_34.11: = specific_function %.loc18_34.10, @Convert.2(constants.%.5) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc18_34.2: init %i32 = call %.loc18_34.11(%.loc18_33) [template = constants.%.32] -// CHECK:STDOUT: %.loc18_34.12: init %i32 = converted %.loc18_33, %int.convert_checked.loc18_34.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_34.8: init %i32 = initialize_from %.loc18_34.5 to %.loc18_34.7 [template = constants.%.38] +// CHECK:STDOUT: %.loc18_34.9: %Convert.type.2 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_34.10: = bound_method %.loc18_33, %.loc18_34.9 [template = constants.%.36] +// CHECK:STDOUT: %.loc18_34.11: = specific_function %.loc18_34.10, @Convert.2(constants.%.7) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc18_34.2: init %i32 = call %.loc18_34.11(%.loc18_33) [template = constants.%.38] +// CHECK:STDOUT: %.loc18_34.12: init %i32 = converted %.loc18_33, %int.convert_checked.loc18_34.2 [template = constants.%.38] // CHECK:STDOUT: %.loc18_34.13: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc18_34.14: ref %i32 = array_index %non_tuple.var, %.loc18_34.13 -// CHECK:STDOUT: %.loc18_34.15: init %i32 = initialize_from %.loc18_34.12 to %.loc18_34.14 [template = constants.%.32] -// CHECK:STDOUT: %.loc18_34.16: init %.7 = array_init (%.loc18_34.8, %.loc18_34.15) to %non_tuple.var [template = constants.%array] -// CHECK:STDOUT: %.loc18_35: init %.7 = converted %.loc18_34.1, %.loc18_34.16 [template = constants.%array] +// CHECK:STDOUT: %.loc18_34.15: init %i32 = initialize_from %.loc18_34.12 to %.loc18_34.14 [template = constants.%.38] +// CHECK:STDOUT: %.loc18_34.16: init %.9 = array_init (%.loc18_34.8, %.loc18_34.15) to %non_tuple.var [template = constants.%array] +// CHECK:STDOUT: %.loc18_35: init %.9 = converted %.loc18_34.1, %.loc18_34.16 [template = constants.%array] // CHECK:STDOUT: assign %non_tuple.var, %.loc18_35 -// CHECK:STDOUT: %.loc22_14.1: Core.IntLiteral = int_value 32 [template = constants.%.5] +// CHECK:STDOUT: %.loc22_14.1: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc22: init type = call constants.%Int(%.loc22_14.1) [template = constants.%i32] // CHECK:STDOUT: %.loc22_14.2: type = value_of_initializer %int.make_type_signed.loc22 [template = constants.%i32] // CHECK:STDOUT: %.loc22_14.3: type = converted %int.make_type_signed.loc22, %.loc22_14.2 [template = constants.%i32] // CHECK:STDOUT: %first.var: ref %i32 = var first // CHECK:STDOUT: %first: ref %i32 = bind_name first, %first.var -// CHECK:STDOUT: %non_tuple.ref: ref %.7 = name_ref non_tuple, %non_tuple +// CHECK:STDOUT: %non_tuple.ref: ref %.9 = name_ref non_tuple, %non_tuple // CHECK:STDOUT: %.loc22_30: Core.IntLiteral = int_value 0 [template = constants.%.1] // CHECK:STDOUT: assign %first.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon index 8d74cb14c3a2..3d6d0acc70b8 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon @@ -29,15 +29,15 @@ var b: i32 = a.2; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,25 +81,25 @@ var b: i32 = a.2; // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 6 [template = constants.%.4] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.3: = bound_method %.loc11_22, %.loc11_27.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_27.4: = specific_function %.loc11_27.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %.loc11_27.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_27.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_27.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_27.9: = bound_method %.loc11_26, %.loc11_27.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_27.10: = specific_function %.loc11_27.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %.loc11_27.10(%.loc11_26) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_27.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_27.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_27.13: init %i32 = initialize_from %.loc11_27.11 to %.loc11_27.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_27.14: init %tuple.type.2 = tuple_init (%.loc11_27.7, %.loc11_27.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_28: init %tuple.type.2 = converted %.loc11_27.1, %.loc11_27.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 2 [template = constants.%.31] +// CHECK:STDOUT: %.loc15: Core.IntLiteral = int_value 2 [template = constants.%.35] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index fd907632cdac..428992c0f9db 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon @@ -29,17 +29,17 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 34 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.32: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.32 = struct_value (%.31) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 34 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.36: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %.36 = struct_value (%.35) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -83,29 +83,29 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 34 [template = constants.%.4] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_28.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_28.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_28.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_28.7: init %i32 = initialize_from %.loc11_28.5 to %.loc11_28.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.9: = bound_method %.loc11_26, %.loc11_28.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_28.10: = specific_function %.loc11_28.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.10(%.loc11_26) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_28.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_28.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_28.7: init %i32 = initialize_from %.loc11_28.5 to %.loc11_28.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_28.9: = bound_method %.loc11_26, %.loc11_28.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_28.10: = specific_function %.loc11_28.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.10(%.loc11_26) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_28.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_28.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_28.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_28.13: init %i32 = initialize_from %.loc11_28.11 to %.loc11_28.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_28.13: init %i32 = initialize_from %.loc11_28.11 to %.loc11_28.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_28.14: init %tuple.type.2 = tuple_init (%.loc11_28.7, %.loc11_28.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_29 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 2 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_28.1: %.32 = struct_literal (%.loc15_27) -// CHECK:STDOUT: %struct: %.32 = struct_value (%.loc15_27) [template = constants.%struct] -// CHECK:STDOUT: %.loc15_28.2: %.32 = converted %.loc15_28.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc15_29: Core.IntLiteral = struct_access %.loc15_28.2, element0 [template = constants.%.31] +// CHECK:STDOUT: %.loc15_27: Core.IntLiteral = int_value 2 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_28.1: %.36 = struct_literal (%.loc15_27) +// CHECK:STDOUT: %struct: %.36 = struct_value (%.loc15_27) [template = constants.%struct] +// CHECK:STDOUT: %.loc15_28.2: %.36 = converted %.loc15_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc15_29: Core.IntLiteral = struct_access %.loc15_28.2, element0 [template = constants.%.35] // CHECK:STDOUT: assign file.%b.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index ef7c9d196c50..e35c00798e86 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -26,17 +26,17 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 34 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.32: type = struct_type {.index: Core.IntLiteral} [template] -// CHECK:STDOUT: %struct: %.32 = struct_value (%.31) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 34 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.36: type = struct_type {.index: Core.IntLiteral} [template] +// CHECK:STDOUT: %struct: %.36 = struct_value (%.35) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -80,29 +80,29 @@ var b: i32 = a.({.index = 1}.index); // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 12 [template = constants.%.3] // CHECK:STDOUT: %.loc11_26: Core.IntLiteral = int_value 34 [template = constants.%.4] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_26) -// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_28.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.5: init %i32 = converted %.loc11_22, %int.convert_checked.loc11_28.1 [template = constants.%.31] // CHECK:STDOUT: %.loc11_28.6: ref %i32 = tuple_access file.%a.var, element0 -// CHECK:STDOUT: %.loc11_28.7: init %i32 = initialize_from %.loc11_28.5 to %.loc11_28.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.9: = bound_method %.loc11_26, %.loc11_28.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_28.10: = specific_function %.loc11_28.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.10(%.loc11_26) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_28.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_28.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_28.7: init %i32 = initialize_from %.loc11_28.5 to %.loc11_28.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_28.9: = bound_method %.loc11_26, %.loc11_28.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_28.10: = specific_function %.loc11_28.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.10(%.loc11_26) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_28.11: init %i32 = converted %.loc11_26, %int.convert_checked.loc11_28.2 [template = constants.%.34] // CHECK:STDOUT: %.loc11_28.12: ref %i32 = tuple_access file.%a.var, element1 -// CHECK:STDOUT: %.loc11_28.13: init %i32 = initialize_from %.loc11_28.11 to %.loc11_28.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_28.13: init %i32 = initialize_from %.loc11_28.11 to %.loc11_28.12 [template = constants.%.34] // CHECK:STDOUT: %.loc11_28.14: init %tuple.type.2 = tuple_init (%.loc11_28.7, %.loc11_28.13) to file.%a.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_29: init %tuple.type.2 = converted %.loc11_28.1, %.loc11_28.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_29 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a -// CHECK:STDOUT: %.loc12_27: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.1: %.32 = struct_literal (%.loc12_27) -// CHECK:STDOUT: %struct: %.32 = struct_value (%.loc12_27) [template = constants.%struct] -// CHECK:STDOUT: %.loc12_28.2: %.32 = converted %.loc12_28.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = struct_access %.loc12_28.2, element0 [template = constants.%.31] +// CHECK:STDOUT: %.loc12_27: Core.IntLiteral = int_value 1 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_28.1: %.36 = struct_literal (%.loc12_27) +// CHECK:STDOUT: %struct: %.36 = struct_value (%.loc12_27) [template = constants.%struct] +// CHECK:STDOUT: %.loc12_28.2: %.36 = converted %.loc12_28.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc12_29: Core.IntLiteral = struct_access %.loc12_28.2, element0 [template = constants.%.35] // CHECK:STDOUT: %.loc12_15.1: ref %i32 = tuple_access %a.ref, element1 // CHECK:STDOUT: %.loc12_15.2: %i32 = bind_value %.loc12_15.1 // CHECK:STDOUT: assign file.%b.var, %.loc12_15.2 diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index 30d7d80577f9..73d5f72ee3bd 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -30,11 +30,11 @@ fn Run() -> i32 { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.25) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: } @@ -85,12 +85,12 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%.loc11_28) -// CHECK:STDOUT: %.loc11_30.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_30.3: = bound_method %.loc11_28, %.loc11_30.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_30.4: = specific_function %.loc11_30.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_30.4(%.loc11_28) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.25] -// CHECK:STDOUT: %.loc11_30.6: %i32 = converted %.loc11_28, %.loc11_30.5 [template = constants.%.25] +// CHECK:STDOUT: %.loc11_30.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_30.3: = bound_method %.loc11_28, %.loc11_30.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_30.4: = specific_function %.loc11_30.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_30.4(%.loc11_28) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_30.5: %i32 = value_of_initializer %int.convert_checked [template = constants.%.29] +// CHECK:STDOUT: %.loc11_30.6: %i32 = converted %.loc11_28, %.loc11_30.5 [template = constants.%.29] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_30.6) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_31: %tuple.type.2 = converted %.loc11_30.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: return %.loc11_31 diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index e8ebf885a20e..79d50225b7dc 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -31,10 +31,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -71,13 +71,13 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %.loc17_22: Core.IntLiteral = int_value 2 [template = constants.%.3] // CHECK:STDOUT: %.loc17_25: f64 = float_literal 65.890000000000001 [template = constants.%.4] // CHECK:STDOUT: %.loc17_30.1: %tuple.type.3 = tuple_literal (%.loc17_22, %.loc17_25) -// CHECK:STDOUT: %.loc17_30.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc17_30.3: = bound_method %.loc17_22, %.loc17_30.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc17_30.4: = specific_function %.loc17_30.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_30.4(%.loc17_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc17_30.5: init %i32 = converted %.loc17_22, %int.convert_checked [template = constants.%.27] +// CHECK:STDOUT: %.loc17_30.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc17_30.3: = bound_method %.loc17_22, %.loc17_30.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc17_30.4: = specific_function %.loc17_30.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_30.4(%.loc17_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc17_30.5: init %i32 = converted %.loc17_22, %int.convert_checked [template = constants.%.31] // CHECK:STDOUT: %.loc17_30.6: ref %i32 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc17_30.7: init %i32 = initialize_from %.loc17_30.5 to %.loc17_30.6 [template = constants.%.27] +// CHECK:STDOUT: %.loc17_30.7: init %i32 = initialize_from %.loc17_30.5 to %.loc17_30.6 [template = constants.%.31] // CHECK:STDOUT: %.loc17_30.8: %i32 = converted %.loc17_25, [template = ] // CHECK:STDOUT: assign file.%x.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 3583f44d95d2..12f4e649f9f1 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -45,10 +45,10 @@ var c_bad: C((1, 2, 3)) = F(); impl package Implicit; -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C()` to `C()` [ImplicitAsConversionFailure] +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C()` to `C()` [ImplicitAsConversionFailure] // CHECK:STDERR: var c_bad: C((3, 4)) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C()` does not implement interface `ImplicitAs(C())` [MissingImplInMemberAccessNote] +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C()` does not implement interface `ImplicitAs(C())` [MissingImplInMemberAccessNote] // CHECK:STDERR: var c_bad: C((3, 4)) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ var c_bad: C((3, 4)) = F(); @@ -67,43 +67,43 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 0 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.25) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 0 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%.29) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (%tuple.type.4, %tuple.type.5) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.2, %i32) [template] // CHECK:STDOUT: %tuple.type.8: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.9: type = tuple_type (%tuple.type.7, %tuple.type.8) [template] -// CHECK:STDOUT: %.29: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.33: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type.11: type = tuple_type (%tuple.type.3, Core.IntLiteral) [template] -// CHECK:STDOUT: %.30: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.31: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.34: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.35: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.12: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple.type.13: type = tuple_type (%tuple.type.11, %tuple.type.12) [template] -// CHECK:STDOUT: %.32: = bound_method %.29, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.7 = tuple_value (%tuple.1, %.34) [template] -// CHECK:STDOUT: %.35: = bound_method %.30, %Convert.14 [template] -// CHECK:STDOUT: %.36: = specific_function %.35, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.37: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.38: = bound_method %.31, %Convert.14 [template] -// CHECK:STDOUT: %.39: = specific_function %.38, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.40: %i32 = int_value 3 [template] -// CHECK:STDOUT: %tuple.3: %tuple.type.8 = tuple_value (%.37, %.40) [template] +// CHECK:STDOUT: %.36: = bound_method %.33, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.7 = tuple_value (%tuple.1, %.38) [template] +// CHECK:STDOUT: %.39: = bound_method %.34, %Convert.14 [template] +// CHECK:STDOUT: %.40: = specific_function %.39, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.41: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.42: = bound_method %.35, %Convert.14 [template] +// CHECK:STDOUT: %.43: = specific_function %.42, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.44: %i32 = int_value 3 [template] +// CHECK:STDOUT: %tuple.3: %tuple.type.8 = tuple_value (%.41, %.44) [template] // CHECK:STDOUT: %tuple.4: %tuple.type.9 = tuple_value (%tuple.2, %tuple.3) [template] // CHECK:STDOUT: %X: %tuple.type.8 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.8 = symbolic_binding_pattern X, 0 [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [symbolic] -// CHECK:STDOUT: %.41: type = struct_type {} [template] -// CHECK:STDOUT: %.42: = complete_type_witness %.41 [template] -// CHECK:STDOUT: %tuple.5: %tuple.type.8 = tuple_value (%.34, %.37) [template] +// CHECK:STDOUT: %.45: type = struct_type {} [template] +// CHECK:STDOUT: %.46: = complete_type_witness %.45 [template] +// CHECK:STDOUT: %tuple.5: %tuple.type.8 = tuple_value (%.38, %.41) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.5) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -183,21 +183,21 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %return.param_patt: %C.3 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] -// CHECK:STDOUT: %.loc9_14: Core.IntLiteral = int_value 1 [template = constants.%.29] -// CHECK:STDOUT: %.loc9_17: Core.IntLiteral = int_value 2 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_14: Core.IntLiteral = int_value 1 [template = constants.%.33] +// CHECK:STDOUT: %.loc9_17: Core.IntLiteral = int_value 2 [template = constants.%.34] // CHECK:STDOUT: %.loc9_18.1: %tuple.type.12 = tuple_literal (%.loc9_14, %.loc9_17) -// CHECK:STDOUT: %.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_18.3: = bound_method %.loc9_14, %.loc9_18.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_18.4: = specific_function %.loc9_18.3, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %.loc9_18.4(%.loc9_14) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_18.5: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_18.6: %i32 = converted %.loc9_14, %.loc9_18.5 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_18.7: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_18.8: = bound_method %.loc9_17, %.loc9_18.7 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_18.9: = specific_function %.loc9_18.8, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc9_18.2: init %i32 = call %.loc9_18.9(%.loc9_17) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_18.10: %i32 = value_of_initializer %int.convert_checked.loc9_18.2 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_18.11: %i32 = converted %.loc9_17, %.loc9_18.10 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_18.3: = bound_method %.loc9_14, %.loc9_18.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_18.4: = specific_function %.loc9_18.3, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %.loc9_18.4(%.loc9_14) [template = constants.%.38] +// CHECK:STDOUT: %.loc9_18.5: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_18.6: %i32 = converted %.loc9_14, %.loc9_18.5 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_18.7: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_18.8: = bound_method %.loc9_17, %.loc9_18.7 [template = constants.%.39] +// CHECK:STDOUT: %.loc9_18.9: = specific_function %.loc9_18.8, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc9_18.2: init %i32 = call %.loc9_18.9(%.loc9_17) [template = constants.%.41] +// CHECK:STDOUT: %.loc9_18.10: %i32 = value_of_initializer %int.convert_checked.loc9_18.2 [template = constants.%.41] +// CHECK:STDOUT: %.loc9_18.11: %i32 = converted %.loc9_17, %.loc9_18.10 [template = constants.%.41] // CHECK:STDOUT: %tuple: %tuple.type.8 = tuple_value (%.loc9_18.6, %.loc9_18.11) [template = constants.%tuple.5] // CHECK:STDOUT: %.loc9_12: %tuple.type.8 = converted %.loc9_18.1, %tuple [template = constants.%tuple.5] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.5) [template = constants.%C.3] @@ -213,7 +213,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %.loc7_26: = complete_type_witness %.41 [template = constants.%.42] +// CHECK:STDOUT: %.loc7_26: = complete_type_witness %.45 [template = constants.%.46] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 @@ -226,56 +226,56 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc4_22: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc4_24.1: %tuple.type.3 = tuple_literal (%.loc4_22) -// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_22, %.loc4_24.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_24.4(%.loc4_22) [template = constants.%.25] -// CHECK:STDOUT: %.loc4_24.5: init %i32 = converted %.loc4_22, %int.convert_checked.loc4 [template = constants.%.25] +// CHECK:STDOUT: %.loc4_24.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_24.3: = bound_method %.loc4_22, %.loc4_24.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc4_24.4: = specific_function %.loc4_24.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_24.4(%.loc4_22) [template = constants.%.29] +// CHECK:STDOUT: %.loc4_24.5: init %i32 = converted %.loc4_22, %int.convert_checked.loc4 [template = constants.%.29] // CHECK:STDOUT: %.loc4_24.6: init %tuple.type.2 = tuple_init (%.loc4_24.5) to file.%a_ref.var [template = constants.%tuple.1] // CHECK:STDOUT: %.loc4_25: init %tuple.type.2 = converted %.loc4_24.1, %.loc4_24.6 [template = constants.%tuple.1] // CHECK:STDOUT: assign file.%a_ref.var, %.loc4_25 // CHECK:STDOUT: %.loc5_45: Core.IntLiteral = int_value 0 [template = constants.%.2] // CHECK:STDOUT: %.loc5_47.1: %tuple.type.3 = tuple_literal (%.loc5_45) -// CHECK:STDOUT: %.loc5_50: Core.IntLiteral = int_value 1 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_50: Core.IntLiteral = int_value 1 [template = constants.%.33] // CHECK:STDOUT: %.loc5_51.1: %tuple.type.11 = tuple_literal (%.loc5_47.1, %.loc5_50) -// CHECK:STDOUT: %.loc5_55: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_58: Core.IntLiteral = int_value 3 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_55: Core.IntLiteral = int_value 2 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_58: Core.IntLiteral = int_value 3 [template = constants.%.35] // CHECK:STDOUT: %.loc5_59.1: %tuple.type.12 = tuple_literal (%.loc5_55, %.loc5_58) // CHECK:STDOUT: %.loc5_60.1: %tuple.type.13 = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %.loc5_47.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_47.3: = bound_method %.loc5_45, %.loc5_47.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc5_47.4: = specific_function %.loc5_47.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked.loc5_47: init %i32 = call %.loc5_47.4(%.loc5_45) [template = constants.%.25] -// CHECK:STDOUT: %.loc5_47.5: init %i32 = converted %.loc5_45, %int.convert_checked.loc5_47 [template = constants.%.25] +// CHECK:STDOUT: %.loc5_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_47.3: = bound_method %.loc5_45, %.loc5_47.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc5_47.4: = specific_function %.loc5_47.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked.loc5_47: init %i32 = call %.loc5_47.4(%.loc5_45) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_47.5: init %i32 = converted %.loc5_45, %int.convert_checked.loc5_47 [template = constants.%.29] // CHECK:STDOUT: %.loc5_60.2: ref %tuple.type.7 = tuple_access file.%b_ref.var, element0 // CHECK:STDOUT: %.loc5_51.2: ref %tuple.type.2 = tuple_access %.loc5_60.2, element0 // CHECK:STDOUT: %.loc5_47.6: init %tuple.type.2 = tuple_init (%.loc5_47.5) to %.loc5_51.2 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.3: init %tuple.type.2 = converted %.loc5_47.1, %.loc5_47.6 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.4: init %tuple.type.2 = initialize_from %.loc5_51.3 to %.loc5_51.2 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc5_51.5: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_51.6: = bound_method %.loc5_50, %.loc5_51.5 [template = constants.%.32] -// CHECK:STDOUT: %.loc5_51.7: = specific_function %.loc5_51.6, @Convert.2(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc5_51: init %i32 = call %.loc5_51.7(%.loc5_50) [template = constants.%.34] -// CHECK:STDOUT: %.loc5_51.8: init %i32 = converted %.loc5_50, %int.convert_checked.loc5_51 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_51.5: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_51.6: = bound_method %.loc5_50, %.loc5_51.5 [template = constants.%.36] +// CHECK:STDOUT: %.loc5_51.7: = specific_function %.loc5_51.6, @Convert.2(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc5_51: init %i32 = call %.loc5_51.7(%.loc5_50) [template = constants.%.38] +// CHECK:STDOUT: %.loc5_51.8: init %i32 = converted %.loc5_50, %int.convert_checked.loc5_51 [template = constants.%.38] // CHECK:STDOUT: %.loc5_51.9: ref %i32 = tuple_access %.loc5_60.2, element1 -// CHECK:STDOUT: %.loc5_51.10: init %i32 = initialize_from %.loc5_51.8 to %.loc5_51.9 [template = constants.%.34] +// CHECK:STDOUT: %.loc5_51.10: init %i32 = initialize_from %.loc5_51.8 to %.loc5_51.9 [template = constants.%.38] // CHECK:STDOUT: %.loc5_51.11: init %tuple.type.7 = tuple_init (%.loc5_51.4, %.loc5_51.10) to %.loc5_60.2 [template = constants.%tuple.2] // CHECK:STDOUT: %.loc5_60.3: init %tuple.type.7 = converted %.loc5_51.1, %.loc5_51.11 [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_59.3: = bound_method %.loc5_55, %.loc5_59.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc5_59.4: = specific_function %.loc5_59.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc5_59.1: init %i32 = call %.loc5_59.4(%.loc5_55) [template = constants.%.37] -// CHECK:STDOUT: %.loc5_59.5: init %i32 = converted %.loc5_55, %int.convert_checked.loc5_59.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_59.3: = bound_method %.loc5_55, %.loc5_59.2 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_59.4: = specific_function %.loc5_59.3, @Convert.2(constants.%.1) [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc5_59.1: init %i32 = call %.loc5_59.4(%.loc5_55) [template = constants.%.41] +// CHECK:STDOUT: %.loc5_59.5: init %i32 = converted %.loc5_55, %int.convert_checked.loc5_59.1 [template = constants.%.41] // CHECK:STDOUT: %.loc5_60.4: ref %tuple.type.8 = tuple_access file.%b_ref.var, element1 // CHECK:STDOUT: %.loc5_59.6: ref %i32 = tuple_access %.loc5_60.4, element0 -// CHECK:STDOUT: %.loc5_59.7: init %i32 = initialize_from %.loc5_59.5 to %.loc5_59.6 [template = constants.%.37] -// CHECK:STDOUT: %.loc5_59.8: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc5_59.9: = bound_method %.loc5_58, %.loc5_59.8 [template = constants.%.38] -// CHECK:STDOUT: %.loc5_59.10: = specific_function %.loc5_59.9, @Convert.2(constants.%.1) [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc5_59.2: init %i32 = call %.loc5_59.10(%.loc5_58) [template = constants.%.40] -// CHECK:STDOUT: %.loc5_59.11: init %i32 = converted %.loc5_58, %int.convert_checked.loc5_59.2 [template = constants.%.40] +// CHECK:STDOUT: %.loc5_59.7: init %i32 = initialize_from %.loc5_59.5 to %.loc5_59.6 [template = constants.%.41] +// CHECK:STDOUT: %.loc5_59.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc5_59.9: = bound_method %.loc5_58, %.loc5_59.8 [template = constants.%.42] +// CHECK:STDOUT: %.loc5_59.10: = specific_function %.loc5_59.9, @Convert.2(constants.%.1) [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc5_59.2: init %i32 = call %.loc5_59.10(%.loc5_58) [template = constants.%.44] +// CHECK:STDOUT: %.loc5_59.11: init %i32 = converted %.loc5_58, %int.convert_checked.loc5_59.2 [template = constants.%.44] // CHECK:STDOUT: %.loc5_59.12: ref %i32 = tuple_access %.loc5_60.4, element1 -// CHECK:STDOUT: %.loc5_59.13: init %i32 = initialize_from %.loc5_59.11 to %.loc5_59.12 [template = constants.%.40] +// CHECK:STDOUT: %.loc5_59.13: init %i32 = initialize_from %.loc5_59.11 to %.loc5_59.12 [template = constants.%.44] // CHECK:STDOUT: %.loc5_59.14: init %tuple.type.8 = tuple_init (%.loc5_59.7, %.loc5_59.13) to %.loc5_60.4 [template = constants.%tuple.3] // CHECK:STDOUT: %.loc5_60.5: init %tuple.type.8 = converted %.loc5_59.1, %.loc5_59.14 [template = constants.%tuple.3] // CHECK:STDOUT: %.loc5_60.6: init %tuple.type.9 = tuple_init (%.loc5_60.3, %.loc5_60.5) to file.%b_ref.var [template = constants.%tuple.4] @@ -308,57 +308,61 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] -// CHECK:STDOUT: %.17: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.17 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.21 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, type) [template] @@ -371,25 +375,25 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] // CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.27: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.28: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.10: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.25: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.26: %.25 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.27: %.1 = assoc_entity element0, imports.%import_ref.42 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.17) [template] +// CHECK:STDOUT: %.29: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %.30: %.29 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.31: %.2 = assoc_entity element0, imports.%import_ref.42 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.21) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.29: = bound_method %.23, %Convert.14 [template] -// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.17) [template] -// CHECK:STDOUT: %.31: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.32: = bound_method %.24, %Convert.14 [template] -// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.17) [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.31, %.34) [template] +// CHECK:STDOUT: %.32: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.33: = bound_method %.27, %Convert.14 [template] +// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.21) [template] +// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.36: = bound_method %.28, %Convert.14 [template] +// CHECK:STDOUT: %.37: = specific_function %.36, @Convert.2(%.21) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] +// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.35, %.38) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] @@ -397,9 +401,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: ref %tuple.type.2 = import_ref Implicit//default, inst+26, loaded -// CHECK:STDOUT: %import_ref.2: ref %tuple.type.8 = import_ref Implicit//default, inst+406, loaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+489, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+523, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2: ref %tuple.type.8 = import_ref Implicit//default, inst+412, loaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+495, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+529, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.39 // CHECK:STDOUT: .ImplicitAs = %import_ref.41 @@ -407,38 +411,38 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+44, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.1) = import_ref Implicit//default, inst+45, loaded [symbolic = @ImplicitAs.%.2 (constants.%.27)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+45, loaded [symbolic = @ImplicitAs.%.2 (constants.%.31)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+46, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+88, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+89, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+90, loaded [symbolic = @impl.1.%.1 (constants.%.3)] -// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+61, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+118, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+119, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+120, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+147, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+148, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+149, unloaded -// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+179, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+180, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+181, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+211, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+212, unloaded -// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+213, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+219, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+220, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+221, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+236, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+273, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+274, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+275, unloaded -// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+302, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+303, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+304, unloaded -// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+334, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+335, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+336, unloaded -// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+494, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+91, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+92, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+93, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+62, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+121, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+122, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+123, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+150, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+151, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+152, unloaded +// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+182, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+183, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+184, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+214, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+215, unloaded +// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+216, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+222, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+223, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+224, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+240, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+279, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+280, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+281, unloaded +// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+308, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+309, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+310, unloaded +// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+340, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+341, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+342, unloaded +// CHECK:STDOUT: %import_ref.40 = import_ref Implicit//default, inst+500, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -455,7 +459,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_9) [template = constants.%i32] // CHECK:STDOUT: %.loc4_13.1: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc4) // CHECK:STDOUT: %.loc4_13.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] @@ -463,15 +467,15 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc4_13.4: type = converted %.loc4_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_11: init type = call constants.%Int(%.loc5_11) [template = constants.%i32] // CHECK:STDOUT: %.loc5_15: %tuple.type.1 = tuple_literal (%int.make_type_signed.loc5_11) -// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_18: init type = call constants.%Int(%.loc5_18) [template = constants.%i32] // CHECK:STDOUT: %.loc5_21: %tuple.type.3 = tuple_literal (%.loc5_15, %int.make_type_signed.loc5_18) -// CHECK:STDOUT: %.loc5_25: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc5_25: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_25: init type = call constants.%Int(%.loc5_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%.17] +// CHECK:STDOUT: %.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%.21] // CHECK:STDOUT: %int.make_type_signed.loc5_30: init type = call constants.%Int(%.loc5_30) [template = constants.%i32] // CHECK:STDOUT: %.loc5_33: %tuple.type.4 = tuple_literal (%int.make_type_signed.loc5_25, %int.make_type_signed.loc5_30) // CHECK:STDOUT: %.loc5_34.1: %tuple.type.5 = tuple_literal (%.loc5_21, %.loc5_33) @@ -490,21 +494,21 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %b.var: ref %tuple.type.8 = var b // CHECK:STDOUT: %b: ref %tuple.type.8 = bind_name b, %b.var // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc6_11: Core.IntLiteral = int_value 1 [template = constants.%.23] -// CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 2 [template = constants.%.24] +// CHECK:STDOUT: %.loc6_11: Core.IntLiteral = int_value 1 [template = constants.%.27] +// CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 2 [template = constants.%.28] // CHECK:STDOUT: %.loc6_15.1: %tuple.type.10 = tuple_literal (%.loc6_11, %.loc6_14) -// CHECK:STDOUT: %.loc6_15.2: %Convert.type.13 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_15.3: = bound_method %.loc6_11, %.loc6_15.2 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_15.4: = specific_function %.loc6_15.3, @Convert.2(constants.%.17) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %.loc6_15.4(%.loc6_11) [template = constants.%.31] -// CHECK:STDOUT: %.loc6_15.5: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_15.6: %i32 = converted %.loc6_11, %.loc6_15.5 [template = constants.%.31] -// CHECK:STDOUT: %.loc6_15.7: %Convert.type.13 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_15.8: = bound_method %.loc6_14, %.loc6_15.7 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_15.9: = specific_function %.loc6_15.8, @Convert.2(constants.%.17) [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc6_15.2: init %i32 = call %.loc6_15.9(%.loc6_14) [template = constants.%.34] -// CHECK:STDOUT: %.loc6_15.10: %i32 = value_of_initializer %int.convert_checked.loc6_15.2 [template = constants.%.34] -// CHECK:STDOUT: %.loc6_15.11: %i32 = converted %.loc6_14, %.loc6_15.10 [template = constants.%.34] +// CHECK:STDOUT: %.loc6_15.2: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_15.3: = bound_method %.loc6_11, %.loc6_15.2 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_15.4: = specific_function %.loc6_15.3, @Convert.2(constants.%.21) [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %.loc6_15.4(%.loc6_11) [template = constants.%.35] +// CHECK:STDOUT: %.loc6_15.5: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc6_15.6: %i32 = converted %.loc6_11, %.loc6_15.5 [template = constants.%.35] +// CHECK:STDOUT: %.loc6_15.7: %Convert.type.13 = interface_witness_access constants.%.32, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_15.8: = bound_method %.loc6_14, %.loc6_15.7 [template = constants.%.36] +// CHECK:STDOUT: %.loc6_15.9: = specific_function %.loc6_15.8, @Convert.2(constants.%.21) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc6_15.2: init %i32 = call %.loc6_15.9(%.loc6_14) [template = constants.%.38] +// CHECK:STDOUT: %.loc6_15.10: %i32 = value_of_initializer %int.convert_checked.loc6_15.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc6_15.11: %i32 = converted %.loc6_14, %.loc6_15.10 [template = constants.%.38] // CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc6_15.6, %.loc6_15.11) [template = constants.%tuple] // CHECK:STDOUT: %.loc6_9: %tuple.type.7 = converted %.loc6_15.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple) [template = constants.%C.3] @@ -521,8 +525,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -541,8 +545,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -561,7 +565,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -578,7 +582,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -594,7 +598,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -610,7 +614,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -627,7 +631,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -644,7 +648,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -660,7 +664,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -676,7 +680,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -700,8 +704,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -744,8 +749,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -875,6 +881,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -920,8 +927,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -1001,6 +1008,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1046,8 +1054,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1098,24 +1106,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.25 -// CHECK:STDOUT: %.2 => constants.%.26 +// CHECK:STDOUT: %.1 => constants.%.29 +// CHECK:STDOUT: %.2 => constants.%.30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.17) { -// CHECK:STDOUT: %N => constants.%.17 -// CHECK:STDOUT: %N.patt => constants.%.17 +// CHECK:STDOUT: specific @impl.1(constants.%.21) { +// CHECK:STDOUT: %N => constants.%.21 +// CHECK:STDOUT: %N.patt => constants.%.21 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.28 +// CHECK:STDOUT: %.1 => constants.%.32 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.17) { -// CHECK:STDOUT: %N => constants.%.17 +// CHECK:STDOUT: specific @Convert.2(constants.%.21) { +// CHECK:STDOUT: %N => constants.%.21 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -1142,77 +1150,81 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.19: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.19 [template] +// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.20: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %.22: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 1 [template] +// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 2 [template] +// CHECK:STDOUT: %.26: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.24: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.25: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.25, %.24) [template] +// CHECK:STDOUT: %.28: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.29, %.28) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+26, unloaded -// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+406, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+489, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+523, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+412, unloaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+495, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+529, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... @@ -1220,36 +1232,36 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+44, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Implicit//default, inst+45, unloaded // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+46, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+88, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+89, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10 = import_ref Implicit//default, inst+90, unloaded -// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+61, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+118, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+119, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+120, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+147, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+148, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+149, unloaded -// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+179, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+180, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+181, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+211, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+212, unloaded -// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+213, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+219, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+220, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+221, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+236, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+273, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+274, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+275, unloaded -// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+302, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+303, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+304, unloaded -// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+334, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+335, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+336, unloaded -// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+494, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+91, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+92, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.10 = import_ref Implicit//default, inst+93, unloaded +// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+62, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+121, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+122, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+123, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+150, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+151, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+152, unloaded +// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+182, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+183, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+184, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+214, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+215, unloaded +// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+216, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+222, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+223, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+224, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+240, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+279, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+280, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+281, unloaded +// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+308, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+309, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+310, unloaded +// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+340, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+341, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+342, unloaded +// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+500, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1265,9 +1277,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc12_15: Core.IntLiteral = int_value 1 [template = constants.%.20] -// CHECK:STDOUT: %.loc12_18: Core.IntLiteral = int_value 2 [template = constants.%.21] -// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 3 [template = constants.%.22] +// CHECK:STDOUT: %.loc12_15: Core.IntLiteral = int_value 1 [template = constants.%.24] +// CHECK:STDOUT: %.loc12_18: Core.IntLiteral = int_value 2 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_21: Core.IntLiteral = int_value 3 [template = constants.%.26] // CHECK:STDOUT: %.loc12_22: %tuple.type.2 = tuple_literal (%.loc12_15, %.loc12_18, %.loc12_21) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var @@ -1282,8 +1294,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1302,8 +1314,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -1322,7 +1334,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -1339,7 +1351,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -1355,7 +1367,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -1371,7 +1383,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -1388,7 +1400,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -1405,7 +1417,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -1421,7 +1433,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -1437,7 +1449,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -1461,8 +1473,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -1505,8 +1518,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -1599,6 +1613,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -1644,8 +1659,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -1725,6 +1740,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -1770,8 +1786,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -1834,136 +1850,140 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self.2: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.1: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic] // CHECK:STDOUT: %Convert.1: %Convert.type.1 = struct_value () [symbolic] -// CHECK:STDOUT: %.1: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] -// CHECK:STDOUT: %.2: %.1 = assoc_entity element0, imports.%import_ref.11 [symbolic] +// CHECK:STDOUT: %.1: type = facet_access_type %Self.2 [symbolic] +// CHECK:STDOUT: %.2: type = assoc_entity_type %ImplicitAs.type.2, %Convert.type.1 [symbolic] +// CHECK:STDOUT: %.3: %.2 = assoc_entity element0, imports.%import_ref.11 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.2, @impl.1(%N) [symbolic] // CHECK:STDOUT: %Convert.2: %Convert.type.2 = struct_value () [symbolic] -// CHECK:STDOUT: %.3: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.4: = interface_witness (%Convert.2) [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %Self.1 [symbolic] // CHECK:STDOUT: %uN: type = int_type unsigned, %N [symbolic] // CHECK:STDOUT: %ImplicitAs.type.4: type = facet_type <@ImplicitAs, @ImplicitAs(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.3: type = fn_type @Convert.3, @impl.2(%N) [symbolic] // CHECK:STDOUT: %Convert.3: %Convert.type.3 = struct_value () [symbolic] -// CHECK:STDOUT: %.4: = interface_witness (%Convert.3) [symbolic] +// CHECK:STDOUT: %.6: = interface_witness (%Convert.3) [symbolic] // CHECK:STDOUT: %ImplicitAs.type.5: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.4: type = fn_type @Convert.4, @impl.3(%N) [symbolic] // CHECK:STDOUT: %Convert.4: %Convert.type.4 = struct_value () [symbolic] -// CHECK:STDOUT: %.5: = interface_witness (%Convert.4) [symbolic] +// CHECK:STDOUT: %.7: = interface_witness (%Convert.4) [symbolic] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] -// CHECK:STDOUT: %.6: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] -// CHECK:STDOUT: %.7: %.6 = assoc_entity element0, imports.%import_ref.18 [template] +// CHECK:STDOUT: %.8: type = assoc_entity_type %ImplicitAs.type.5, %Convert.type.5 [template] +// CHECK:STDOUT: %.9: %.8 = assoc_entity element0, imports.%import_ref.18 [template] // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.5, @impl.4(%N) [symbolic] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [symbolic] -// CHECK:STDOUT: %.8: = interface_witness (%Convert.6) [symbolic] +// CHECK:STDOUT: %.10: = interface_witness (%Convert.6) [symbolic] // CHECK:STDOUT: %As.type.2: type = facet_type <@As, @As(%Dest)> [symbolic] // CHECK:STDOUT: %Self.3: @As.%As.type (%As.type.2) = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %As.type.3: type = facet_type <@As, @As(%iN)> [symbolic] // CHECK:STDOUT: %Self.4: %As.type.2 = bind_symbolic_name Self, 1 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.6, @As(%Dest) [symbolic] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [symbolic] -// CHECK:STDOUT: %.9: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] -// CHECK:STDOUT: %.10: %.9 = assoc_entity element0, imports.%import_ref.28 [symbolic] +// CHECK:STDOUT: %.11: type = facet_access_type %Self.4 [symbolic] +// CHECK:STDOUT: %.12: type = assoc_entity_type %As.type.2, %Convert.type.7 [symbolic] +// CHECK:STDOUT: %.13: %.12 = assoc_entity element0, imports.%import_ref.28 [symbolic] // CHECK:STDOUT: %Convert.type.8: type = fn_type @Convert.7, @impl.5(%N) [symbolic] // CHECK:STDOUT: %Convert.8: %Convert.type.8 = struct_value () [symbolic] -// CHECK:STDOUT: %.11: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.14: = interface_witness (%Convert.8) [symbolic] +// CHECK:STDOUT: %.15: type = facet_access_type %Self.3 [symbolic] // CHECK:STDOUT: %As.type.4: type = facet_type <@As, @As(%uN)> [symbolic] // CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.8, @impl.6(%N) [symbolic] // CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [symbolic] -// CHECK:STDOUT: %.12: = interface_witness (%Convert.9) [symbolic] +// CHECK:STDOUT: %.16: = interface_witness (%Convert.9) [symbolic] // CHECK:STDOUT: %As.type.5: type = facet_type <@As, @As(Core.IntLiteral)> [template] // CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.9, @impl.7(%N) [symbolic] // CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [symbolic] -// CHECK:STDOUT: %.13: = interface_witness (%Convert.10) [symbolic] +// CHECK:STDOUT: %.17: = interface_witness (%Convert.10) [symbolic] // CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.6, @As(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %.14: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] -// CHECK:STDOUT: %.15: %.14 = assoc_entity element0, imports.%import_ref.35 [template] +// CHECK:STDOUT: %.18: type = assoc_entity_type %As.type.5, %Convert.type.11 [template] +// CHECK:STDOUT: %.19: %.18 = assoc_entity element0, imports.%import_ref.35 [template] // CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.10, @impl.8(%N) [symbolic] // CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [symbolic] -// CHECK:STDOUT: %.16: = interface_witness (%Convert.12) [symbolic] +// CHECK:STDOUT: %.20: = interface_witness (%Convert.12) [symbolic] // CHECK:STDOUT: %C.type: type = generic_class_type @C [template] // CHECK:STDOUT: %C.1: %C.type = struct_value () [template] -// CHECK:STDOUT: %.19: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = int_type signed, %.19 [template] +// CHECK:STDOUT: %.23: Core.IntLiteral = int_value 32 [template] +// CHECK:STDOUT: %i32: type = int_type signed, %.23 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %.20: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %.21: Core.IntLiteral = int_value 4 [template] +// CHECK:STDOUT: %.24: Core.IntLiteral = int_value 3 [template] +// CHECK:STDOUT: %.25: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %ImplicitAs.type.6: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [template] // CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %.23: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] -// CHECK:STDOUT: %.24: %.23 = assoc_entity element0, imports.%import_ref.11 [template] -// CHECK:STDOUT: %.25: %.1 = assoc_entity element0, imports.%import_ref.41 [symbolic] -// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.19) [template] +// CHECK:STDOUT: %.27: type = assoc_entity_type %ImplicitAs.type.6, %Convert.type.13 [template] +// CHECK:STDOUT: %.28: %.27 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.29: %.2 = assoc_entity element0, imports.%import_ref.41 [symbolic] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.23) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.20, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.19) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 3 [template] -// CHECK:STDOUT: %.30: = bound_method %.21, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.19) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 4 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%.29, %.32) [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.24, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.23) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 3 [template] +// CHECK:STDOUT: %.34: = bound_method %.25, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.23) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 4 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%.33, %.36) [template] // CHECK:STDOUT: %C.3: type = class_type @C, @C(%tuple.1) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.34: %i32 = int_value 2 [template] -// CHECK:STDOUT: %.35: %i32 = int_value 1 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%.35, %.34) [template] +// CHECK:STDOUT: %.38: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.39: %i32 = int_value 1 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%.39, %.38) [template] // CHECK:STDOUT: %C.4: type = class_type @C, @C(%tuple.2) [template] // CHECK:STDOUT: %ImplicitAs.type.7: type = facet_type <@ImplicitAs, @ImplicitAs(%C.3)> [template] // CHECK:STDOUT: %Convert.type.15: type = fn_type @Convert.1, @ImplicitAs(%C.3) [template] // CHECK:STDOUT: %Convert.15: %Convert.type.15 = struct_value () [template] -// CHECK:STDOUT: %.36: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] -// CHECK:STDOUT: %.37: %.36 = assoc_entity element0, imports.%import_ref.11 [template] +// CHECK:STDOUT: %.40: type = assoc_entity_type %ImplicitAs.type.7, %Convert.type.15 [template] +// CHECK:STDOUT: %.41: %.40 = assoc_entity element0, imports.%import_ref.11 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, inst+26, unloaded -// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+406, unloaded -// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+489, loaded [template = constants.%C.1] -// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+523, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.2 = import_ref Implicit//default, inst+412, unloaded +// CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, inst+495, loaded [template = constants.%C.1] +// CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, inst+529, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.40 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.5 = import_ref Implicit//default, inst+44, unloaded -// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.1) = import_ref Implicit//default, inst+45, loaded [symbolic = @ImplicitAs.%.2 (constants.%.25)] +// CHECK:STDOUT: %import_ref.6: @ImplicitAs.%.1 (%.2) = import_ref Implicit//default, inst+45, loaded [symbolic = @ImplicitAs.%.2 (constants.%.29)] // CHECK:STDOUT: %import_ref.7 = import_ref Implicit//default, inst+46, unloaded -// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+88, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+89, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] -// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+90, loaded [symbolic = @impl.1.%.1 (constants.%.3)] -// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+61, unloaded -// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+118, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+119, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] -// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+120, unloaded -// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+147, loaded [symbolic = @impl.3.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+148, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+149, unloaded -// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+179, loaded [symbolic = @impl.4.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+180, loaded [template = constants.%ImplicitAs.type.5] -// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+181, unloaded -// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+211, unloaded -// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+212, unloaded -// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+213, unloaded -// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+219, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+220, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] -// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+221, unloaded -// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+236, unloaded -// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+273, loaded [template = Core.IntLiteral] -// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+274, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] -// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+275, unloaded -// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+302, loaded [symbolic = @impl.7.%iN (constants.%iN)] -// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+303, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+304, unloaded -// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+334, loaded [symbolic = @impl.8.%uN (constants.%uN)] -// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+335, loaded [template = constants.%As.type.5] -// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+336, unloaded -// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+494, unloaded +// CHECK:STDOUT: %import_ref.8: type = import_ref Implicit//default, inst+91, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.9: type = import_ref Implicit//default, inst+92, loaded [symbolic = @impl.1.%ImplicitAs.type (constants.%ImplicitAs.type.3)] +// CHECK:STDOUT: %import_ref.10: = import_ref Implicit//default, inst+93, loaded [symbolic = @impl.1.%.1 (constants.%.4)] +// CHECK:STDOUT: %import_ref.11 = import_ref Implicit//default, inst+62, unloaded +// CHECK:STDOUT: %import_ref.12: type = import_ref Implicit//default, inst+121, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.13: type = import_ref Implicit//default, inst+122, loaded [symbolic = @impl.2.%ImplicitAs.type (constants.%ImplicitAs.type.4)] +// CHECK:STDOUT: %import_ref.14 = import_ref Implicit//default, inst+123, unloaded +// CHECK:STDOUT: %import_ref.15: type = import_ref Implicit//default, inst+150, loaded [symbolic = @impl.3.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.16: type = import_ref Implicit//default, inst+151, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.17 = import_ref Implicit//default, inst+152, unloaded +// CHECK:STDOUT: %import_ref.19: type = import_ref Implicit//default, inst+182, loaded [symbolic = @impl.4.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.20: type = import_ref Implicit//default, inst+183, loaded [template = constants.%ImplicitAs.type.5] +// CHECK:STDOUT: %import_ref.21 = import_ref Implicit//default, inst+184, unloaded +// CHECK:STDOUT: %import_ref.22 = import_ref Implicit//default, inst+214, unloaded +// CHECK:STDOUT: %import_ref.23 = import_ref Implicit//default, inst+215, unloaded +// CHECK:STDOUT: %import_ref.24 = import_ref Implicit//default, inst+216, unloaded +// CHECK:STDOUT: %import_ref.25: type = import_ref Implicit//default, inst+222, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.26: type = import_ref Implicit//default, inst+223, loaded [symbolic = @impl.5.%As.type (constants.%As.type.3)] +// CHECK:STDOUT: %import_ref.27 = import_ref Implicit//default, inst+224, unloaded +// CHECK:STDOUT: %import_ref.28 = import_ref Implicit//default, inst+240, unloaded +// CHECK:STDOUT: %import_ref.29: type = import_ref Implicit//default, inst+279, loaded [template = Core.IntLiteral] +// CHECK:STDOUT: %import_ref.30: type = import_ref Implicit//default, inst+280, loaded [symbolic = @impl.6.%As.type (constants.%As.type.4)] +// CHECK:STDOUT: %import_ref.31 = import_ref Implicit//default, inst+281, unloaded +// CHECK:STDOUT: %import_ref.32: type = import_ref Implicit//default, inst+308, loaded [symbolic = @impl.7.%iN (constants.%iN)] +// CHECK:STDOUT: %import_ref.33: type = import_ref Implicit//default, inst+309, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.34 = import_ref Implicit//default, inst+310, unloaded +// CHECK:STDOUT: %import_ref.36: type = import_ref Implicit//default, inst+340, loaded [symbolic = @impl.8.%uN (constants.%uN)] +// CHECK:STDOUT: %import_ref.37: type = import_ref Implicit//default, inst+341, loaded [template = constants.%As.type.5] +// CHECK:STDOUT: %import_ref.38 = import_ref Implicit//default, inst+342, unloaded +// CHECK:STDOUT: %import_ref.39 = import_ref Implicit//default, inst+500, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -1979,21 +1999,21 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.1] -// CHECK:STDOUT: %.loc10_15: Core.IntLiteral = int_value 3 [template = constants.%.20] -// CHECK:STDOUT: %.loc10_18: Core.IntLiteral = int_value 4 [template = constants.%.21] +// CHECK:STDOUT: %.loc10_15: Core.IntLiteral = int_value 3 [template = constants.%.24] +// CHECK:STDOUT: %.loc10_18: Core.IntLiteral = int_value 4 [template = constants.%.25] // CHECK:STDOUT: %.loc10_19.1: %tuple.type.2 = tuple_literal (%.loc10_15, %.loc10_18) -// CHECK:STDOUT: %.loc10_19.2: %Convert.type.13 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_19.3: = bound_method %.loc10_15, %.loc10_19.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc10_19.4: = specific_function %.loc10_19.3, @Convert.2(constants.%.19) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc10_19.1: init %i32 = call %.loc10_19.4(%.loc10_15) [template = constants.%.29] -// CHECK:STDOUT: %.loc10_19.5: %i32 = value_of_initializer %int.convert_checked.loc10_19.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_19.6: %i32 = converted %.loc10_15, %.loc10_19.5 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_19.7: %Convert.type.13 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_19.8: = bound_method %.loc10_18, %.loc10_19.7 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_19.9: = specific_function %.loc10_19.8, @Convert.2(constants.%.19) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc10_19.2: init %i32 = call %.loc10_19.9(%.loc10_18) [template = constants.%.32] -// CHECK:STDOUT: %.loc10_19.10: %i32 = value_of_initializer %int.convert_checked.loc10_19.2 [template = constants.%.32] -// CHECK:STDOUT: %.loc10_19.11: %i32 = converted %.loc10_18, %.loc10_19.10 [template = constants.%.32] +// CHECK:STDOUT: %.loc10_19.2: %Convert.type.13 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_19.3: = bound_method %.loc10_15, %.loc10_19.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_19.4: = specific_function %.loc10_19.3, @Convert.2(constants.%.23) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc10_19.1: init %i32 = call %.loc10_19.4(%.loc10_15) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_19.5: %i32 = value_of_initializer %int.convert_checked.loc10_19.1 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_19.6: %i32 = converted %.loc10_15, %.loc10_19.5 [template = constants.%.33] +// CHECK:STDOUT: %.loc10_19.7: %Convert.type.13 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_19.8: = bound_method %.loc10_18, %.loc10_19.7 [template = constants.%.34] +// CHECK:STDOUT: %.loc10_19.9: = specific_function %.loc10_19.8, @Convert.2(constants.%.23) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc10_19.2: init %i32 = call %.loc10_19.9(%.loc10_18) [template = constants.%.36] +// CHECK:STDOUT: %.loc10_19.10: %i32 = value_of_initializer %int.convert_checked.loc10_19.2 [template = constants.%.36] +// CHECK:STDOUT: %.loc10_19.11: %i32 = converted %.loc10_18, %.loc10_19.10 [template = constants.%.36] // CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc10_19.6, %.loc10_19.11) [template = constants.%tuple.1] // CHECK:STDOUT: %.loc10_13: %tuple.type.1 = converted %.loc10_19.1, %tuple [template = constants.%tuple.1] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.1) [template = constants.%C.3] @@ -2010,8 +2030,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @ImplicitAs(%Dest) [symbolic = %Convert.type (constants.%Convert.type.1)] // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.1) = struct_value () [symbolic = %Convert (constants.%Convert.1)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.1)] -// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.1) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.2)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.2), @ImplicitAs.%Convert.type (%Convert.type.1) [symbolic = %.1 (constants.%.2)] +// CHECK:STDOUT: %.2: @ImplicitAs.%.1 (%.2) = assoc_entity element0, imports.%import_ref.11 [symbolic = %.2 (constants.%.3)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2030,8 +2050,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.6, @As(%Dest) [symbolic = %Convert.type (constants.%Convert.type.7)] // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.7) = struct_value () [symbolic = %Convert (constants.%Convert.7)] -// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.9)] -// CHECK:STDOUT: %.2: @As.%.1 (%.9) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.10)] +// CHECK:STDOUT: %.1: type = assoc_entity_type @As.%As.type (%As.type.2), @As.%Convert.type (%Convert.type.7) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.2: @As.%.1 (%.12) = assoc_entity element0, imports.%import_ref.28 [symbolic = %.2 (constants.%.13)] // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: !members: @@ -2050,7 +2070,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @impl.1(%N) [symbolic = %Convert.type (constants.%Convert.type.2)] // CHECK:STDOUT: %Convert: @impl.1.%Convert.type (%Convert.type.2) = struct_value () [symbolic = %Convert (constants.%Convert.2)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.3)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.8 as imports.%import_ref.9 { // CHECK:STDOUT: !members: @@ -2067,7 +2087,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.3, @impl.2(%N) [symbolic = %Convert.type (constants.%Convert.type.3)] // CHECK:STDOUT: %Convert: @impl.2.%Convert.type (%Convert.type.3) = struct_value () [symbolic = %Convert (constants.%Convert.3)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.4)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.6)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.12 as imports.%import_ref.13 { // CHECK:STDOUT: !members: @@ -2083,7 +2103,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.4, @impl.3(%N) [symbolic = %Convert.type (constants.%Convert.type.4)] // CHECK:STDOUT: %Convert: @impl.3.%Convert.type (%Convert.type.4) = struct_value () [symbolic = %Convert (constants.%Convert.4)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.5)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.15 as imports.%import_ref.16 { // CHECK:STDOUT: !members: @@ -2099,7 +2119,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.5, @impl.4(%N) [symbolic = %Convert.type (constants.%Convert.type.6)] // CHECK:STDOUT: %Convert: @impl.4.%Convert.type (%Convert.type.6) = struct_value () [symbolic = %Convert (constants.%Convert.6)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.8)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.10)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.19 as imports.%import_ref.20 { // CHECK:STDOUT: !members: @@ -2116,7 +2136,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.7, @impl.5(%N) [symbolic = %Convert.type (constants.%Convert.type.8)] // CHECK:STDOUT: %Convert: @impl.5.%Convert.type (%Convert.type.8) = struct_value () [symbolic = %Convert (constants.%Convert.8)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.11)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.14)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.25 as imports.%import_ref.26 { // CHECK:STDOUT: !members: @@ -2133,7 +2153,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.8, @impl.6(%N) [symbolic = %Convert.type (constants.%Convert.type.9)] // CHECK:STDOUT: %Convert: @impl.6.%Convert.type (%Convert.type.9) = struct_value () [symbolic = %Convert (constants.%Convert.9)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.12)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.29 as imports.%import_ref.30 { // CHECK:STDOUT: !members: @@ -2149,7 +2169,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.9, @impl.7(%N) [symbolic = %Convert.type (constants.%Convert.type.10)] // CHECK:STDOUT: %Convert: @impl.7.%Convert.type (%Convert.type.10) = struct_value () [symbolic = %Convert (constants.%Convert.10)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.13)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.17)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.32 as imports.%import_ref.33 { // CHECK:STDOUT: !members: @@ -2165,7 +2185,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.10, @impl.8(%N) [symbolic = %Convert.type (constants.%Convert.type.12)] // CHECK:STDOUT: %Convert: @impl.8.%Convert.type (%Convert.type.12) = struct_value () [symbolic = %Convert (constants.%Convert.12)] -// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.16)] +// CHECK:STDOUT: %.1: = interface_witness (%Convert) [symbolic = %.1 (constants.%.20)] // CHECK:STDOUT: // CHECK:STDOUT: impl: imports.%import_ref.36 as imports.%import_ref.37 { // CHECK:STDOUT: !members: @@ -2189,8 +2209,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%Dest)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.2)] // CHECK:STDOUT: %Self: %ImplicitAs.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%Self (%Self.2)]() -> @Convert.1.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.1.%.1 (%.1)]() -> @Convert.1.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.2(constants.%N: Core.IntLiteral) { @@ -2233,8 +2254,9 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest: type = bind_symbolic_name Dest, 0 [symbolic = %Dest (constants.%Dest)] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%Dest)> [symbolic = %As.type (constants.%As.type.2)] // CHECK:STDOUT: %Self: %As.type.2 = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.4)] +// CHECK:STDOUT: %.1: type = facet_access_type %Self [symbolic = %.1 (constants.%.11)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%Self (%Self.4)]() -> @Convert.6.%Dest (%Dest); +// CHECK:STDOUT: fn[%self.param_patt: @Convert.6.%.1 (%.11)]() -> @Convert.6.%Dest (%Dest); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Convert.7(constants.%N: Core.IntLiteral) { @@ -2328,6 +2350,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2 // CHECK:STDOUT: %Self => constants.%Self.1 +// CHECK:STDOUT: %.1 => constants.%.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.2(constants.%N) { @@ -2373,8 +2396,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.5 // CHECK:STDOUT: %Convert => constants.%Convert.5 -// CHECK:STDOUT: %.1 => constants.%.6 -// CHECK:STDOUT: %.2 => constants.%.7 +// CHECK:STDOUT: %.1 => constants.%.8 +// CHECK:STDOUT: %.2 => constants.%.9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.3(constants.%N) { @@ -2454,6 +2477,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Dest => constants.%Dest // CHECK:STDOUT: %As.type => constants.%As.type.2 // CHECK:STDOUT: %Self => constants.%Self.3 +// CHECK:STDOUT: %.1 => constants.%.15 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Convert.7(constants.%N) { @@ -2499,8 +2523,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.4 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.11 // CHECK:STDOUT: %Convert => constants.%Convert.11 -// CHECK:STDOUT: %.1 => constants.%.14 -// CHECK:STDOUT: %.2 => constants.%.15 +// CHECK:STDOUT: %.1 => constants.%.18 +// CHECK:STDOUT: %.2 => constants.%.19 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @impl.7(constants.%N) { @@ -2551,24 +2575,24 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.13 // CHECK:STDOUT: %Convert => constants.%Convert.13 -// CHECK:STDOUT: %.1 => constants.%.23 -// CHECK:STDOUT: %.2 => constants.%.24 +// CHECK:STDOUT: %.1 => constants.%.27 +// CHECK:STDOUT: %.2 => constants.%.28 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @impl.1(constants.%.19) { -// CHECK:STDOUT: %N => constants.%.19 -// CHECK:STDOUT: %N.patt => constants.%.19 +// CHECK:STDOUT: specific @impl.1(constants.%.23) { +// CHECK:STDOUT: %N => constants.%.23 +// CHECK:STDOUT: %N.patt => constants.%.23 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.6 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Convert.type => constants.%Convert.type.14 // CHECK:STDOUT: %Convert => constants.%Convert.14 -// CHECK:STDOUT: %.1 => constants.%.26 +// CHECK:STDOUT: %.1 => constants.%.30 // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: specific @Convert.2(constants.%.19) { -// CHECK:STDOUT: %N => constants.%.19 +// CHECK:STDOUT: specific @Convert.2(constants.%.23) { +// CHECK:STDOUT: %N => constants.%.23 // CHECK:STDOUT: %iN => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -2597,7 +2621,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Self => constants.%Self.2 // CHECK:STDOUT: %Convert.type => constants.%Convert.type.15 // CHECK:STDOUT: %Convert => constants.%Convert.15 -// CHECK:STDOUT: %.1 => constants.%.36 -// CHECK:STDOUT: %.2 => constants.%.37 +// CHECK:STDOUT: %.1 => constants.%.40 +// CHECK:STDOUT: %.2 => constants.%.41 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index 68b3fd427231..a09d0c1f6199 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -29,18 +29,18 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 12 [template] -// CHECK:STDOUT: %.30: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 76 [template] -// CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%.29, %.32) [template] -// CHECK:STDOUT: %.33: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.34: = specific_function %.33, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.35: %i32 = int_value 6 [template] -// CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %.35) [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 12 [template] +// CHECK:STDOUT: %.34: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 76 [template] +// CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%.33, %.36) [template] +// CHECK:STDOUT: %.37: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.38: = specific_function %.37, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.39: %i32 = int_value 6 [template] +// CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %.39) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,30 +85,30 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.1: %tuple.type.6 = tuple_literal (%.loc11_30, %.loc11_34) // CHECK:STDOUT: %.loc11_39: Core.IntLiteral = int_value 6 [template = constants.%.6] // CHECK:STDOUT: %.loc11_40.1: %tuple.type.7 = tuple_literal (%.loc11_36.1, %.loc11_39) -// CHECK:STDOUT: %.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_36.3: = bound_method %.loc11_30, %.loc11_36.2 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_36.4: = specific_function %.loc11_36.3, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc11_36.1: init %i32 = call %.loc11_36.4(%.loc11_30) [template = constants.%.29] -// CHECK:STDOUT: %.loc11_36.5: init %i32 = converted %.loc11_30, %int.convert_checked.loc11_36.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_36.3: = bound_method %.loc11_30, %.loc11_36.2 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_36.4: = specific_function %.loc11_36.3, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc11_36.1: init %i32 = call %.loc11_36.4(%.loc11_30) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_36.5: init %i32 = converted %.loc11_30, %int.convert_checked.loc11_36.1 [template = constants.%.33] // CHECK:STDOUT: %.loc11_40.2: ref %tuple.type.3 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_36.6: ref %i32 = tuple_access %.loc11_40.2, element0 -// CHECK:STDOUT: %.loc11_36.7: init %i32 = initialize_from %.loc11_36.5 to %.loc11_36.6 [template = constants.%.29] -// CHECK:STDOUT: %.loc11_36.8: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_36.9: = bound_method %.loc11_34, %.loc11_36.8 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_36.10: = specific_function %.loc11_36.9, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc11_36.2: init %i32 = call %.loc11_36.10(%.loc11_34) [template = constants.%.32] -// CHECK:STDOUT: %.loc11_36.11: init %i32 = converted %.loc11_34, %int.convert_checked.loc11_36.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_36.7: init %i32 = initialize_from %.loc11_36.5 to %.loc11_36.6 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_36.8: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_36.9: = bound_method %.loc11_34, %.loc11_36.8 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_36.10: = specific_function %.loc11_36.9, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc11_36.2: init %i32 = call %.loc11_36.10(%.loc11_34) [template = constants.%.36] +// CHECK:STDOUT: %.loc11_36.11: init %i32 = converted %.loc11_34, %int.convert_checked.loc11_36.2 [template = constants.%.36] // CHECK:STDOUT: %.loc11_36.12: ref %i32 = tuple_access %.loc11_40.2, element1 -// CHECK:STDOUT: %.loc11_36.13: init %i32 = initialize_from %.loc11_36.11 to %.loc11_36.12 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_36.13: init %i32 = initialize_from %.loc11_36.11 to %.loc11_36.12 [template = constants.%.36] // CHECK:STDOUT: %.loc11_36.14: init %tuple.type.3 = tuple_init (%.loc11_36.7, %.loc11_36.13) to %.loc11_40.2 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_40.3: init %tuple.type.3 = converted %.loc11_36.1, %.loc11_36.14 [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc11_40.4: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_40.5: = bound_method %.loc11_39, %.loc11_40.4 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_40.6: = specific_function %.loc11_40.5, @Convert.2(constants.%.1) [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc11_40: init %i32 = call %.loc11_40.6(%.loc11_39) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_40.7: init %i32 = converted %.loc11_39, %int.convert_checked.loc11_40 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_40.4: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_40.5: = bound_method %.loc11_39, %.loc11_40.4 [template = constants.%.37] +// CHECK:STDOUT: %.loc11_40.6: = specific_function %.loc11_40.5, @Convert.2(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc11_40: init %i32 = call %.loc11_40.6(%.loc11_39) [template = constants.%.39] +// CHECK:STDOUT: %.loc11_40.7: init %i32 = converted %.loc11_39, %int.convert_checked.loc11_40 [template = constants.%.39] // CHECK:STDOUT: %.loc11_40.8: ref %i32 = tuple_access file.%x.var, element1 -// CHECK:STDOUT: %.loc11_40.9: init %i32 = initialize_from %.loc11_40.7 to %.loc11_40.8 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_40.9: init %i32 = initialize_from %.loc11_40.7 to %.loc11_40.8 [template = constants.%.39] // CHECK:STDOUT: %.loc11_40.10: init %tuple.type.4 = tuple_init (%.loc11_40.3, %.loc11_40.9) to file.%x.var [template = constants.%tuple.2] // CHECK:STDOUT: %.loc11_41: init %tuple.type.4 = converted %.loc11_40.1, %.loc11_40.10 [template = constants.%tuple.2] // CHECK:STDOUT: assign file.%x.var, %.loc11_41 diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 508e3f86325d..7676cfc55594 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -43,13 +43,13 @@ fn H() { // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.27: = bound_method %.5, %Convert.14 [template] -// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.29: %i32 = int_value 1 [template] -// CHECK:STDOUT: %.30: = bound_method %.6, %Convert.14 [template] -// CHECK:STDOUT: %.31: = specific_function %.30, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.32: %i32 = int_value 2 [template] +// CHECK:STDOUT: %.30: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.31: = bound_method %.5, %Convert.14 [template] +// CHECK:STDOUT: %.32: = specific_function %.31, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.33: %i32 = int_value 1 [template] +// CHECK:STDOUT: %.34: = bound_method %.6, %Convert.14 [template] +// CHECK:STDOUT: %.35: = specific_function %.34, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.36: %i32 = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -177,20 +177,20 @@ fn H() { // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() to %.loc18_50.1 // CHECK:STDOUT: %.loc18_49: Core.IntLiteral = int_value 2 [template = constants.%.6] // CHECK:STDOUT: %.loc18_50.2: %tuple.type.9 = tuple_literal (%.loc18_41, %F.call, %.loc18_49) -// CHECK:STDOUT: %.loc18_50.3: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_50.4: = bound_method %.loc18_41, %.loc18_50.3 [template = constants.%.27] -// CHECK:STDOUT: %.loc18_50.5: = specific_function %.loc18_50.4, @Convert.2(constants.%.1) [template = constants.%.28] -// CHECK:STDOUT: %int.convert_checked.loc18_50.1: init %i32 = call %.loc18_50.5(%.loc18_41) [template = constants.%.29] -// CHECK:STDOUT: %.loc18_50.6: init %i32 = converted %.loc18_41, %int.convert_checked.loc18_50.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc18_50.3: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_50.4: = bound_method %.loc18_41, %.loc18_50.3 [template = constants.%.31] +// CHECK:STDOUT: %.loc18_50.5: = specific_function %.loc18_50.4, @Convert.2(constants.%.1) [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc18_50.1: init %i32 = call %.loc18_50.5(%.loc18_41) [template = constants.%.33] +// CHECK:STDOUT: %.loc18_50.6: init %i32 = converted %.loc18_41, %int.convert_checked.loc18_50.1 [template = constants.%.33] // CHECK:STDOUT: %.loc18_50.7: ref %i32 = tuple_access %v.var, element0 -// CHECK:STDOUT: %.loc18_50.8: init %i32 = initialize_from %.loc18_50.6 to %.loc18_50.7 [template = constants.%.29] -// CHECK:STDOUT: %.loc18_50.9: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc18_50.10: = bound_method %.loc18_49, %.loc18_50.9 [template = constants.%.30] -// CHECK:STDOUT: %.loc18_50.11: = specific_function %.loc18_50.10, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc18_50.2: init %i32 = call %.loc18_50.11(%.loc18_49) [template = constants.%.32] -// CHECK:STDOUT: %.loc18_50.12: init %i32 = converted %.loc18_49, %int.convert_checked.loc18_50.2 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_50.8: init %i32 = initialize_from %.loc18_50.6 to %.loc18_50.7 [template = constants.%.33] +// CHECK:STDOUT: %.loc18_50.9: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc18_50.10: = bound_method %.loc18_49, %.loc18_50.9 [template = constants.%.34] +// CHECK:STDOUT: %.loc18_50.11: = specific_function %.loc18_50.10, @Convert.2(constants.%.1) [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc18_50.2: init %i32 = call %.loc18_50.11(%.loc18_49) [template = constants.%.36] +// CHECK:STDOUT: %.loc18_50.12: init %i32 = converted %.loc18_49, %int.convert_checked.loc18_50.2 [template = constants.%.36] // CHECK:STDOUT: %.loc18_50.13: ref %i32 = tuple_access %v.var, element2 -// CHECK:STDOUT: %.loc18_50.14: init %i32 = initialize_from %.loc18_50.12 to %.loc18_50.13 [template = constants.%.32] +// CHECK:STDOUT: %.loc18_50.14: init %i32 = initialize_from %.loc18_50.12 to %.loc18_50.13 [template = constants.%.36] // CHECK:STDOUT: %.loc18_50.15: init %tuple.type.7 = tuple_init (%.loc18_50.8, %F.call, %.loc18_50.14) to %v.var // CHECK:STDOUT: %.loc18_51: init %tuple.type.7 = converted %.loc18_50.2, %.loc18_50.15 // CHECK:STDOUT: assign %v.var, %.loc18_51 diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index 70b40c35aef1..62d833e9503f 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -25,11 +25,11 @@ var y: (i32,) = x; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.22: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.23: = bound_method %.2, %Convert.14 [template] -// CHECK:STDOUT: %.24: = specific_function %.23, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.25: %i32 = int_value 4 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.25) [template] +// CHECK:STDOUT: %.26: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.27: = bound_method %.2, %Convert.14 [template] +// CHECK:STDOUT: %.28: = specific_function %.27, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.29: %i32 = int_value 4 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.29) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -70,11 +70,11 @@ var y: (i32,) = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_18: Core.IntLiteral = int_value 4 [template = constants.%.2] // CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%.loc11_18) -// CHECK:STDOUT: %.loc11_20.2: %Convert.type.2 = interface_witness_access constants.%.22, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_20.3: = bound_method %.loc11_18, %.loc11_20.2 [template = constants.%.23] -// CHECK:STDOUT: %.loc11_20.4: = specific_function %.loc11_20.3, @Convert.2(constants.%.1) [template = constants.%.24] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_20.4(%.loc11_18) [template = constants.%.25] -// CHECK:STDOUT: %.loc11_20.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.25] +// CHECK:STDOUT: %.loc11_20.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_20.3: = bound_method %.loc11_18, %.loc11_20.2 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_20.4: = specific_function %.loc11_20.3, @Convert.2(constants.%.1) [template = constants.%.28] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_20.4(%.loc11_18) [template = constants.%.29] +// CHECK:STDOUT: %.loc11_20.5: init %i32 = converted %.loc11_18, %int.convert_checked [template = constants.%.29] // CHECK:STDOUT: %.loc11_20.6: init %tuple.type.2 = tuple_init (%.loc11_20.5) to file.%x.var [template = constants.%tuple] // CHECK:STDOUT: %.loc11_21: init %tuple.type.2 = converted %.loc11_20.1, %.loc11_20.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%x.var, %.loc11_21 diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index 3c8e0698f381..324b8b2b4548 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -29,14 +29,14 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.2, @impl.1(%.1) [template] // CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] -// CHECK:STDOUT: %.24: = interface_witness (%Convert.14) [template] -// CHECK:STDOUT: %.25: = bound_method %.3, %Convert.14 [template] -// CHECK:STDOUT: %.26: = specific_function %.25, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.27: %i32 = int_value 4 [template] -// CHECK:STDOUT: %.28: = bound_method %.4, %Convert.14 [template] -// CHECK:STDOUT: %.29: = specific_function %.28, @Convert.2(%.1) [template] -// CHECK:STDOUT: %.30: %i32 = int_value 102 [template] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.27, %.30) [template] +// CHECK:STDOUT: %.28: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %.29: = bound_method %.3, %Convert.14 [template] +// CHECK:STDOUT: %.30: = specific_function %.29, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.31: %i32 = int_value 4 [template] +// CHECK:STDOUT: %.32: = bound_method %.4, %Convert.14 [template] +// CHECK:STDOUT: %.33: = specific_function %.32, @Convert.2(%.1) [template] +// CHECK:STDOUT: %.34: %i32 = int_value 102 [template] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.31, %.34) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -108,18 +108,18 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc11_22: Core.IntLiteral = int_value 4 [template = constants.%.3] // CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 102 [template = constants.%.4] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%.loc11_22, %.loc11_25) -// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.5: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.6: %i32 = converted %.loc11_22, %.loc11_28.5 [template = constants.%.27] -// CHECK:STDOUT: %.loc11_28.7: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc11_28.8: = bound_method %.loc11_25, %.loc11_28.7 [template = constants.%.28] -// CHECK:STDOUT: %.loc11_28.9: = specific_function %.loc11_28.8, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.9(%.loc11_25) [template = constants.%.30] -// CHECK:STDOUT: %.loc11_28.10: %i32 = value_of_initializer %int.convert_checked.loc11_28.2 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_28.11: %i32 = converted %.loc11_25, %.loc11_28.10 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_28.3: = bound_method %.loc11_22, %.loc11_28.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc11_28.4: = specific_function %.loc11_28.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %.loc11_28.4(%.loc11_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.5: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.6: %i32 = converted %.loc11_22, %.loc11_28.5 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_28.7: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc11_28.8: = bound_method %.loc11_25, %.loc11_28.7 [template = constants.%.32] +// CHECK:STDOUT: %.loc11_28.9: = specific_function %.loc11_28.8, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %.loc11_28.9(%.loc11_25) [template = constants.%.34] +// CHECK:STDOUT: %.loc11_28.10: %i32 = value_of_initializer %int.convert_checked.loc11_28.2 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_28.11: %i32 = converted %.loc11_25, %.loc11_28.10 [template = constants.%.34] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc11_28.6, %.loc11_28.11) [template = constants.%tuple] // CHECK:STDOUT: %.loc11_29: %tuple.type.2 = converted %.loc11_28.1, %tuple [template = constants.%tuple] // CHECK:STDOUT: %v: %tuple.type.2 = bind_name v, %.loc11_29 @@ -128,20 +128,20 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %.loc14_22: Core.IntLiteral = int_value 4 [template = constants.%.3] // CHECK:STDOUT: %.loc14_25: Core.IntLiteral = int_value 102 [template = constants.%.4] // CHECK:STDOUT: %.loc14_28.1: %tuple.type.3 = tuple_literal (%.loc14_22, %.loc14_25) -// CHECK:STDOUT: %.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_28.3: = bound_method %.loc14_22, %.loc14_28.2 [template = constants.%.25] -// CHECK:STDOUT: %.loc14_28.4: = specific_function %.loc14_28.3, @Convert.2(constants.%.1) [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked.loc14_28.1: init %i32 = call %.loc14_28.4(%.loc14_22) [template = constants.%.27] -// CHECK:STDOUT: %.loc14_28.5: init %i32 = converted %.loc14_22, %int.convert_checked.loc14_28.1 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_28.3: = bound_method %.loc14_22, %.loc14_28.2 [template = constants.%.29] +// CHECK:STDOUT: %.loc14_28.4: = specific_function %.loc14_28.3, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc14_28.1: init %i32 = call %.loc14_28.4(%.loc14_22) [template = constants.%.31] +// CHECK:STDOUT: %.loc14_28.5: init %i32 = converted %.loc14_22, %int.convert_checked.loc14_28.1 [template = constants.%.31] // CHECK:STDOUT: %.loc14_28.6: ref %i32 = tuple_access file.%x.var, element0 -// CHECK:STDOUT: %.loc14_28.7: init %i32 = initialize_from %.loc14_28.5 to %.loc14_28.6 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_28.8: %Convert.type.2 = interface_witness_access constants.%.24, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc14_28.9: = bound_method %.loc14_25, %.loc14_28.8 [template = constants.%.28] -// CHECK:STDOUT: %.loc14_28.10: = specific_function %.loc14_28.9, @Convert.2(constants.%.1) [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc14_28.2: init %i32 = call %.loc14_28.10(%.loc14_25) [template = constants.%.30] -// CHECK:STDOUT: %.loc14_28.11: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_28.2 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_28.7: init %i32 = initialize_from %.loc14_28.5 to %.loc14_28.6 [template = constants.%.31] +// CHECK:STDOUT: %.loc14_28.8: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc14_28.9: = bound_method %.loc14_25, %.loc14_28.8 [template = constants.%.32] +// CHECK:STDOUT: %.loc14_28.10: = specific_function %.loc14_28.9, @Convert.2(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc14_28.2: init %i32 = call %.loc14_28.10(%.loc14_25) [template = constants.%.34] +// CHECK:STDOUT: %.loc14_28.11: init %i32 = converted %.loc14_25, %int.convert_checked.loc14_28.2 [template = constants.%.34] // CHECK:STDOUT: %.loc14_28.12: ref %i32 = tuple_access file.%x.var, element1 -// CHECK:STDOUT: %.loc14_28.13: init %i32 = initialize_from %.loc14_28.11 to %.loc14_28.12 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_28.13: init %i32 = initialize_from %.loc14_28.11 to %.loc14_28.12 [template = constants.%.34] // CHECK:STDOUT: %.loc14_28.14: init %tuple.type.2 = tuple_init (%.loc14_28.7, %.loc14_28.13) to file.%x.var [template = constants.%tuple] // CHECK:STDOUT: %.loc14_29: init %tuple.type.2 = converted %.loc14_28.1, %.loc14_28.14 [template = constants.%tuple] // CHECK:STDOUT: assign file.%x.var, %.loc14_29 diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index daf60530c195..d2ae1c5db6be 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -194,11 +194,13 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %EqualEqual.type: type = fn_type @EqualEqual [template] // CHECK:STDOUT: %EqualEqual: %EqualEqual.type = struct_value () [template] // CHECK:STDOUT: %.Self.2: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic] +// CHECK:STDOUT: %.5: type = facet_access_type %.Self.2 [symbolic] // CHECK:STDOUT: %J.type.2: type = facet_type <@J where TODO> [template] // CHECK:STDOUT: %V: %J.type.2 = bind_symbolic_name V, 0 [symbolic] // CHECK:STDOUT: %V.patt: %J.type.2 = symbolic_binding_pattern V, 0 [symbolic] // CHECK:STDOUT: %Impls.type: type = fn_type @Impls [template] // CHECK:STDOUT: %Impls: %Impls.type = struct_value () [template] +// CHECK:STDOUT: %.6: type = facet_access_type %.Self.1 [symbolic] // CHECK:STDOUT: %I.type.3: type = facet_type <@I where TODO> [template] // CHECK:STDOUT: %W: %I.type.3 = bind_symbolic_name W, 0 [symbolic] // CHECK:STDOUT: %W.patt: %I.type.3 = symbolic_binding_pattern W, 0 [symbolic] @@ -247,8 +249,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: %J.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.2] // CHECK:STDOUT: %.Self.ref: %J.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.2] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type.1] -// CHECK:STDOUT: %.loc13_22.1: type = facet_type_access %.Self.ref [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.loc13_22.2: type = converted %.Self.ref, %.loc13_22.1 [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.loc13_22.1: type = facet_access_type %.Self.ref [symbolic = constants.%.5] +// CHECK:STDOUT: %.loc13_22.2: type = converted %.Self.ref, %.loc13_22.1 [symbolic = constants.%.5] // CHECK:STDOUT: %.loc13_16: type = where_expr %.Self [template = constants.%J.type.2] { // CHECK:STDOUT: requirement_impls %.loc13_22.2, %I.ref // CHECK:STDOUT: } @@ -263,8 +265,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %.Self: %I.type.1 = bind_symbolic_name .Self, 0 [symbolic = constants.%.Self.1] // CHECK:STDOUT: %.Self.ref.loc15_20: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] // CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type.1] -// CHECK:STDOUT: %.loc15_20.1: type = facet_type_access %.Self.ref.loc15_20 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc15_20.2: type = converted %.Self.ref.loc15_20, %.loc15_20.1 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.loc15_20.1: type = facet_access_type %.Self.ref.loc15_20 [symbolic = constants.%.6] +// CHECK:STDOUT: %.loc15_20.2: type = converted %.Self.ref.loc15_20, %.loc15_20.1 [symbolic = constants.%.6] // CHECK:STDOUT: %.Self.ref.loc15_38: %I.type.1 = name_ref .Self, %.Self [symbolic = constants.%.Self.1] // CHECK:STDOUT: %Member.ref: %.1 = name_ref Member, @I.%.loc7 [template = constants.%.2] // CHECK:STDOUT: %.loc15_50: %empty_tuple.type = tuple_literal () @@ -525,8 +527,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %import_ref.1 = import_ref Main//state_constraints, inst+3, unloaded // CHECK:STDOUT: %import_ref.2: type = import_ref Main//state_constraints, inst+7, loaded [template = constants.%I.type.1] // CHECK:STDOUT: %import_ref.3 = import_ref Main//state_constraints, inst+35, unloaded -// CHECK:STDOUT: %import_ref.4 = import_ref Main//state_constraints, inst+56, unloaded -// CHECK:STDOUT: %import_ref.5 = import_ref Main//state_constraints, inst+80, unloaded +// CHECK:STDOUT: %import_ref.4 = import_ref Main//state_constraints, inst+57, unloaded +// CHECK:STDOUT: %import_ref.5 = import_ref Main//state_constraints, inst+82, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.12 // CHECK:STDOUT: import Core//prelude @@ -783,8 +785,8 @@ let B: type where .Self impls A = D; // CHECK:STDOUT: %import_ref.1: type = import_ref Main//state_constraints, inst+3, loaded [template = constants.%J.type.1] // CHECK:STDOUT: %import_ref.2 = import_ref Main//state_constraints, inst+7, unloaded // CHECK:STDOUT: %import_ref.3 = import_ref Main//state_constraints, inst+35, unloaded -// CHECK:STDOUT: %import_ref.4: %Impls.type = import_ref Main//state_constraints, inst+56, loaded [template = constants.%Impls] -// CHECK:STDOUT: %import_ref.5 = import_ref Main//state_constraints, inst+80, unloaded +// CHECK:STDOUT: %import_ref.4: %Impls.type = import_ref Main//state_constraints, inst+57, loaded [template = constants.%Impls] +// CHECK:STDOUT: %import_ref.5 = import_ref Main//state_constraints, inst+82, unloaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.7 // CHECK:STDOUT: import Core//prelude diff --git a/toolchain/diagnostics/diagnostic_kind.def b/toolchain/diagnostics/diagnostic_kind.def index 697c7b73d613..fee0682b3eb4 100644 --- a/toolchain/diagnostics/diagnostic_kind.def +++ b/toolchain/diagnostics/diagnostic_kind.def @@ -175,6 +175,7 @@ CARBON_DIAGNOSTIC_KIND(RedeclParamListPrevious) CARBON_DIAGNOSTIC_KIND(RedeclParamCountDiffers) CARBON_DIAGNOSTIC_KIND(RedeclParamCountPrevious) CARBON_DIAGNOSTIC_KIND(RedeclParamDiffers) +CARBON_DIAGNOSTIC_KIND(RedeclParamDiffersType) CARBON_DIAGNOSTIC_KIND(RedeclParamPrevious) CARBON_DIAGNOSTIC_KIND(RedeclParamSyntaxDiffers) CARBON_DIAGNOSTIC_KIND(RedeclParamSyntaxPrevious) diff --git a/toolchain/lower/constant.cpp b/toolchain/lower/constant.cpp index f7dc290c4d00..855935665990 100644 --- a/toolchain/lower/constant.cpp +++ b/toolchain/lower/constant.cpp @@ -116,12 +116,19 @@ static auto EmitAsConstant(ConstantContext& /*context*/, InstT inst) // For constants that are always of type `type`, produce the trivial runtime // representation of type `type`. template - requires(InstT::Kind.is_type() == SemIR::InstIsType::Always) + requires(InstT::Kind.is_type() == SemIR::InstIsType::Always && + InstT::Kind.constant_kind() != SemIR::InstConstantKind::SymbolicOnly) static auto EmitAsConstant(ConstantContext& context, InstT /*inst*/) -> llvm::Constant* { return context.GetTypeAsValue(); } +// Represent facet values the same as types. +static auto EmitAsConstant(ConstantContext& context, SemIR::FacetValue /*inst*/) + -> llvm::Constant* { + return context.GetTypeAsValue(); +} + static auto EmitAsConstant(ConstantContext& context, SemIR::StructValue inst) -> llvm::Constant* { return EmitAggregateConstant( diff --git a/toolchain/lower/file_context.cpp b/toolchain/lower/file_context.cpp index 1d619f0b8471..6a1f14068cbb 100644 --- a/toolchain/lower/file_context.cpp +++ b/toolchain/lower/file_context.cpp @@ -592,9 +592,10 @@ static auto BuildTypeForInst(FileContext& context, InstT /*inst*/) template requires(InstT::Kind.template IsAnyOf< - SemIR::AssociatedEntityType, SemIR::FacetType, SemIR::FunctionType, - SemIR::GenericClassType, SemIR::GenericInterfaceType, - SemIR::UnboundElementType, SemIR::WhereExpr>()) + SemIR::AssociatedEntityType, SemIR::FacetAccessType, + SemIR::FacetType, SemIR::FunctionType, SemIR::GenericClassType, + SemIR::GenericInterfaceType, SemIR::UnboundElementType, + SemIR::WhereExpr>()) static auto BuildTypeForInst(FileContext& context, InstT /*inst*/) -> llvm::Type* { // Return an empty struct as a placeholder. diff --git a/toolchain/lower/handle.cpp b/toolchain/lower/handle.cpp index d7f3895d9890..ae71543d7260 100644 --- a/toolchain/lower/handle.cpp +++ b/toolchain/lower/handle.cpp @@ -157,7 +157,7 @@ auto HandleInst(FunctionContext& context, SemIR::InstId inst_id, } auto HandleInst(FunctionContext& context, SemIR::InstId inst_id, - SemIR::FacetTypeAccess /*inst*/) -> void { + SemIR::FacetAccessType /*inst*/) -> void { context.SetLocal(inst_id, context.GetTypeAsValue()); } diff --git a/toolchain/sem_ir/file.cpp b/toolchain/sem_ir/file.cpp index e58a82016ac0..a00e92d4ac23 100644 --- a/toolchain/sem_ir/file.cpp +++ b/toolchain/sem_ir/file.cpp @@ -260,8 +260,9 @@ auto GetExprCategory(const File& file, InstId inst_id) -> ExprCategory { case ClassType::Kind: case CompleteTypeWitness::Kind: case ConstType::Kind: + case FacetAccessType::Kind: case FacetType::Kind: - case FacetTypeAccess::Kind: + case FacetValue::Kind: case FloatLiteral::Kind: case FloatType::Kind: case FunctionType::Kind: diff --git a/toolchain/sem_ir/inst_kind.def b/toolchain/sem_ir/inst_kind.def index 4e151245ad37..b7b6c2d9b130 100644 --- a/toolchain/sem_ir/inst_kind.def +++ b/toolchain/sem_ir/inst_kind.def @@ -123,8 +123,9 @@ CARBON_SEM_IR_INST_KIND(CompleteTypeWitness) CARBON_SEM_IR_INST_KIND(ConstType) CARBON_SEM_IR_INST_KIND(Converted) CARBON_SEM_IR_INST_KIND(Deref) +CARBON_SEM_IR_INST_KIND(FacetAccessType) CARBON_SEM_IR_INST_KIND(FacetType) -CARBON_SEM_IR_INST_KIND(FacetTypeAccess) +CARBON_SEM_IR_INST_KIND(FacetValue) CARBON_SEM_IR_INST_KIND(FieldDecl) CARBON_SEM_IR_INST_KIND(FloatLiteral) CARBON_SEM_IR_INST_KIND(FloatType) diff --git a/toolchain/sem_ir/stringify_type.cpp b/toolchain/sem_ir/stringify_type.cpp index 98eafccf7569..1fb281eb182e 100644 --- a/toolchain/sem_ir/stringify_type.cpp +++ b/toolchain/sem_ir/stringify_type.cpp @@ -177,6 +177,11 @@ auto StringifyTypeExpr(const SemIR::File& outer_sem_ir, InstId outer_inst_id) } break; } + case CARBON_KIND(FacetAccessType inst): { + // Given `T:! I`, print `T as type` as simply `T`. + push_inst_id(inst.facet_value_inst_id); + break; + } case CARBON_KIND(FacetType inst): { const FacetTypeInfo& facet_type_info = sem_ir.facet_types().Get(inst.facet_type_id); @@ -202,9 +207,11 @@ auto StringifyTypeExpr(const SemIR::File& outer_sem_ir, InstId outer_inst_id) } break; } - case CARBON_KIND(FacetTypeAccess inst): { - // Print `T as type` as simply `T`. - push_inst_id(inst.facet_id); + case CARBON_KIND(FacetValue inst): { + // No need to output the witness. + push_inst_id(sem_ir.types().GetInstId(inst.type_id)); + push_string(" as "); + push_inst_id(inst.type_inst_id); break; } case CARBON_KIND(FloatType inst): { @@ -423,7 +430,8 @@ auto StringifyTypeExpr(const SemIR::File& outer_sem_ir, InstId outer_inst_id) // We don't need to handle stringification for instructions that don't // show up in errors, but make it clear what's going on so that it's // clearer when stringification is needed. - out << ""; + out << ""; break; } } diff --git a/toolchain/sem_ir/typed_insts.h b/toolchain/sem_ir/typed_insts.h index fab9f5653c47..b5b426844803 100644 --- a/toolchain/sem_ir/typed_insts.h +++ b/toolchain/sem_ir/typed_insts.h @@ -546,6 +546,21 @@ struct ExportDecl { InstId value_id; }; +// Represents accessing the `type` field in a facet value, which is notionally a +// pair of a type and a witness. +struct FacetAccessType { + static constexpr auto Kind = InstKind::FacetAccessType.Define( + {.ir_name = "facet_access_type", + .is_type = InstIsType::Always, + .constant_kind = InstConstantKind::SymbolicOnly}); + + TypeId type_id; + // An instruction that evaluates to a `FacetValue`. + InstId facet_value_inst_id; +}; + +// TODO: `FacetAccessWitness` + // A facet type value. struct FacetType { static constexpr auto Kind = InstKind::FacetType.Define( @@ -557,14 +572,20 @@ struct FacetType { FacetTypeId facet_type_id; }; -// Represents accessing the `type` field in a facet value, which is notionally a -// pair of a type and a witness. -struct FacetTypeAccess { - static constexpr auto Kind = InstKind::FacetTypeAccess.Define( - {.ir_name = "facet_type_access"}); +// A facet value, the value of a facet type. This consists of a type and a +// witness that it satisfies the facet type. +struct FacetValue { + static constexpr auto Kind = InstKind::FacetValue.Define( + {.ir_name = "facet_value", + .is_type = InstIsType::Never, + .constant_kind = InstConstantKind::Always}); + // A `FacetType`. TypeId type_id; - InstId facet_id; + // The type that you will get if you cast this value to `type`. + InstId type_inst_id; + // An `InterfaceWitness` instruction (TODO: `FacetTypeWitness`). + InstId witness_inst_id; }; // A field in a class, of the form `var field: field_type;`. The type of the