From 1e4a428faa49f3509eb95a4539d07485dc5ca99d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 19 Dec 2024 22:22:02 +0000 Subject: [PATCH 1/4] Add a builtin to perform runtime conversion between integer types. --- toolchain/check/eval.cpp | 26 +++++++ toolchain/lower/handle_call.cpp | 10 +++ toolchain/sem_ir/builtin_function_kind.cpp | 91 +++++++++++----------- toolchain/sem_ir/builtin_function_kind.def | 1 + 4 files changed, 84 insertions(+), 44 deletions(-) diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index aa25e17109603..674fb87094909 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -720,6 +720,26 @@ static auto ValidateFloatType(Context& context, SemIRLoc loc, return ValidateFloatBitWidth(context, loc, result.bit_width_id); } +// Performs a conversion between integer types, truncating if the value doesn't +// fit in the destination type. +static auto PerformIntConvert(Context& context, SemIR::InstId arg_id, + SemIR::TypeId dest_type_id) -> SemIR::ConstantId { + auto arg_val = + context.ints().Get(context.insts().GetAs(arg_id).int_id); + auto [dest_is_signed, bit_width_id] = + context.sem_ir().types().GetIntTypeInfo(dest_type_id); + if (bit_width_id.is_valid()) { + // TODO: If the value fits in the destination type, reuse the existing + // int_id rather than recomputing it. This is probably the most common case. + bool src_is_signed = context.sem_ir().types().IsSignedInt( + context.insts().Get(arg_id).type_id()); + unsigned width = context.ints().Get(bit_width_id).getZExtValue(); + arg_val = + src_is_signed ? arg_val.sextOrTrunc(width) : arg_val.zextOrTrunc(width); + } + return MakeIntResult(context, dest_type_id, dest_is_signed, arg_val); +} + // Performs a conversion between integer types, diagnosing if the value doesn't // fit in the destination type. static auto PerformCheckedIntConvert(Context& context, SemIRLoc loc, @@ -1283,6 +1303,12 @@ static auto MakeConstantForBuiltinCall(Context& context, SemIRLoc loc, } // Integer conversions. + case SemIR::BuiltinFunctionKind::IntConvert: { + if (phase == Phase::Symbolic) { + return MakeConstantResult(context, call, phase); + } + return PerformIntConvert(context, arg_ids[0], call.type_id); + } case SemIR::BuiltinFunctionKind::IntConvertChecked: { if (phase == Phase::Symbolic) { return MakeConstantResult(context, call, phase); diff --git a/toolchain/lower/handle_call.cpp b/toolchain/lower/handle_call.cpp index d246ed27455d5..74ea0c3b3f4cb 100644 --- a/toolchain/lower/handle_call.cpp +++ b/toolchain/lower/handle_call.cpp @@ -204,6 +204,16 @@ static auto HandleBuiltinCall(FunctionContext& context, SemIR::InstId inst_id, context.SetLocal(inst_id, context.GetTypeAsValue()); return; + case SemIR::BuiltinFunctionKind::IntConvert: { + context.SetLocal( + inst_id, + CreateZExtOrSExt( + context, context.GetValue(arg_ids[0]), + context.GetType(context.sem_ir().insts().Get(inst_id).type_id()), + IsSignedInt(context, arg_ids[0]))); + return; + } + case SemIR::BuiltinFunctionKind::IntSNegate: { // Lower `-x` as `0 - x`. auto* operand = context.GetValue(arg_ids[0]); diff --git a/toolchain/sem_ir/builtin_function_kind.cpp b/toolchain/sem_ir/builtin_function_kind.cpp index 875165cf6ef9f..3e5fb32ab128c 100644 --- a/toolchain/sem_ir/builtin_function_kind.cpp +++ b/toolchain/sem_ir/builtin_function_kind.cpp @@ -238,6 +238,10 @@ constexpr BuiltinInfo FloatMakeType = {"float.make_type", constexpr BuiltinInfo BoolMakeType = {"bool.make_type", ValidateSignatureType>}; +// Converts between integer types, truncating if necessary. +constexpr BuiltinInfo IntConvert = {"int.convert", + ValidateSignatureAnyInt>}; + // Converts between integer types, with a diagnostic if the value doesn't fit. constexpr BuiltinInfo IntConvertChecked = { "int.convert_checked", ValidateSignatureAnyInt>}; @@ -421,26 +425,54 @@ auto BuiltinFunctionKind::IsValidType(const File& sem_ir, return ValidateFns[AsInt()](sem_ir, arg_types, return_type); } +// Determines whether a builtin call involves an integer literal in its +// arguments or return type. If so, for many builtins we want to treat the call +// as being compile-time-only. This is because `Core.IntLiteral` has an empty +// runtime representation, and a value of that type isn't necessarily a +// compile-time constant, so an arbitrary runtime value of type +// `Core.IntLiteral` may not have a value available for the builtin to use. For +// example, given: +// +// var n: Core.IntLiteral() = 123; +// +// we would be unable to lower a runtime operation such as `(1 as i32) << n` +// because the runtime representation of `n` doesn't track its value at all. +// +// For now, we treat all operations involving `Core.IntLiteral` as being +// compile-time-only. +// +// TODO: We will need to accept things like `some_i32 << 5` eventually. We could +// allow builtin calls at runtime if all the IntLiteral arguments have constant +// values, or add logic to the prelude to promote the `IntLiteral` operand to a +// different type in such cases. +// +// TODO: For now, we also treat builtins *returning* `Core.IntLiteral` as being +// compile-time-only. This is mostly done for simplicity, but should probably be +// revisited. +static auto AnyIntLiteralTypes(const File& sem_ir, + llvm::ArrayRef arg_ids, + TypeId return_type_id) -> bool { + if (sem_ir.types().Is(return_type_id)) { + return true; + } + for (auto arg_id : arg_ids) { + if (sem_ir.types().Is( + sem_ir.insts().Get(arg_id).type_id())) { + return true; + } + } + return false; +} + auto BuiltinFunctionKind::IsCompTimeOnly(const File& sem_ir, llvm::ArrayRef arg_ids, TypeId return_type_id) const -> bool { - // Some builtin functions are unconditionally compile-time-only, or - // unconditionally usable at runtime. However, we need to take extra care for - // builtins operating on an arbitrary integer type, because `Core.IntLiteral` - // has an empty runtime representation and a value of that type isn't - // necessarily a compile-time constant. For example, given: - // - // var n: Core.IntLiteral() = 123; - // - // we would be unable to lower a runtime operation such as `(1 as i32) << n` - // because the runtime representation of `n` doesn't track its value at all. - // So we treat operations involving `Core.IntLiteral` as being - // compile-time-only. switch (*this) { case IntConvertChecked: // Checked integer conversions are compile-time only. return true; + case IntConvert: case IntSNegate: case IntComplement: case IntSAdd: @@ -451,46 +483,17 @@ auto BuiltinFunctionKind::IsCompTimeOnly(const File& sem_ir, case IntAnd: case IntOr: case IntXor: - // Integer builtins producing an IntLiteral are compile-time only. - // TODO: We could allow these at runtime and just produce an empty struct - // result. Should we? - return sem_ir.types().Is(return_type_id); - case IntLeftShift: case IntRightShift: - // Shifts by an integer literal amount are compile-time only. We don't - // have a value for the shift amount at runtime in general. - // TODO: Decide how shifting a non-literal by a literal amount should - // work. We could support these with a builtin in the case where the shift - // amount has a compile-time value, or we could perform a conversion in - // the prelude. - if (sem_ir.types().Is( - sem_ir.insts().Get(arg_ids[1]).type_id())) { - return true; - } - - // Integer builtins producing an IntLiteral are compile-time only. - // TODO: We could allow these at runtime and just produce an empty struct - // result. Should we? - return sem_ir.types().Is(return_type_id); - case IntEq: case IntNeq: case IntLess: case IntLessEq: case IntGreater: case IntGreaterEq: - // Comparisons involving an integer literal operand are compile-time only. - // We don't have a value for an integer literal operand argument at - // runtime in general. - // TODO: Figure out how mixed literal / non-literal comparisons should - // work. We could support these with builtins in the case where the - // operand has a compile-time value, or we could perform a conversion in - // the prelude. - return sem_ir.types().Is( - sem_ir.insts().Get(arg_ids[0]).type_id()) || - sem_ir.types().Is( - sem_ir.insts().Get(arg_ids[1]).type_id()); + // Integer operations are compile-time-only if they involve integer + // literal types. See AnyIntLiteralTypes comment for explanation. + return AnyIntLiteralTypes(sem_ir, arg_ids, return_type_id); default: // TODO: Should the sized MakeType functions be compile-time only? We diff --git a/toolchain/sem_ir/builtin_function_kind.def b/toolchain/sem_ir/builtin_function_kind.def index 0b643707cd976..8ae651d977b36 100644 --- a/toolchain/sem_ir/builtin_function_kind.def +++ b/toolchain/sem_ir/builtin_function_kind.def @@ -31,6 +31,7 @@ CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(FloatMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(BoolMakeType) // Integer conversion. +CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntConvert) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntConvertChecked) // Integer arithmetic. From 62cd2fca74efc789befe21a9b155a63ce3bcfc79 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 2 Jan 2025 21:08:59 +0000 Subject: [PATCH 2/4] Add explicit conversions between integer types to the prelude. --- core/prelude/types/int.carbon | 5 ++ core/prelude/types/uint.carbon | 16 +++++ .../testdata/array/array_vs_tuple.carbon | 24 ++++---- .../testdata/array/assign_return_value.carbon | 10 ++-- .../check/testdata/array/assign_var.carbon | 18 +++--- toolchain/check/testdata/array/base.carbon | 12 ++-- .../testdata/array/canonicalize_index.carbon | 18 +++--- .../fail_out_of_bound_non_literal.carbon | 20 +++---- .../testdata/array/fail_type_mismatch.carbon | 10 ++-- .../testdata/array/function_param.carbon | 20 +++---- .../testdata/array/index_not_literal.carbon | 20 +++---- .../check/testdata/array/nine_elements.carbon | 42 ++++++------- .../testdata/as/adapter_conversion.carbon | 46 +++++++------- toolchain/check/testdata/as/basic.carbon | 10 ++-- toolchain/check/testdata/as/overloaded.carbon | 10 ++-- .../testdata/basics/builtin_types.carbon | 12 ++-- .../fail_numeric_literal_overflow.carbon | 18 +++--- .../testdata/basics/numeric_literals.carbon | 26 ++++---- toolchain/check/testdata/basics/parens.carbon | 14 ++--- .../check/testdata/basics/run_i32.carbon | 10 ++-- .../testdata/builtins/float/make_type.carbon | 14 ++--- .../check/testdata/builtins/print/char.carbon | 20 +++---- .../check/testdata/builtins/print/int.carbon | 20 +++---- .../testdata/class/access_modifers.carbon | 48 +++++++-------- .../testdata/class/adapter/init_adapt.carbon | 28 ++++----- toolchain/check/testdata/class/base.carbon | 14 ++--- .../check/testdata/class/base_method.carbon | 10 ++-- toolchain/check/testdata/class/basic.carbon | 10 ++-- .../testdata/class/derived_to_base.carbon | 18 +++--- .../class/fail_field_modifiers.carbon | 14 ++--- .../check/testdata/class/fail_init.carbon | 10 ++-- .../class/fail_init_as_inplace.carbon | 14 ++--- .../check/testdata/class/fail_scope.carbon | 10 ++-- .../check/testdata/class/field_access.carbon | 14 ++--- .../class/field_access_in_value.carbon | 14 ++--- .../generic/complete_in_conversion.carbon | 26 ++++---- .../testdata/class/generic/import.carbon | 46 +++++++------- .../testdata/class/generic/stringify.carbon | 14 ++--- toolchain/check/testdata/class/import.carbon | 52 ++++++++-------- .../check/testdata/class/import_base.carbon | 18 +++--- .../testdata/class/inheritance_access.carbon | 26 ++++---- toolchain/check/testdata/class/init_as.carbon | 14 ++--- toolchain/check/testdata/class/method.carbon | 10 ++-- toolchain/check/testdata/class/reorder.carbon | 10 ++-- .../testdata/class/reorder_qualified.carbon | 22 +++---- toolchain/check/testdata/class/scope.carbon | 14 ++--- .../testdata/class/self_conversion.carbon | 10 ++-- .../class/syntactic_merge_literal.carbon | 24 ++++---- .../testdata/class/virtual_modifiers.carbon | 20 +++---- toolchain/check/testdata/deduce/array.carbon | 56 ++++++++--------- .../check/testdata/deduce/generic_type.carbon | 10 ++-- toolchain/check/testdata/deduce/tuple.carbon | 14 ++--- .../check/testdata/eval/aggregate.carbon | 28 ++++----- .../check/testdata/eval/fail_aggregate.carbon | 26 ++++---- .../check/testdata/eval/fail_symbolic.carbon | 8 +-- .../testdata/function/builtin/method.carbon | 2 +- .../check/testdata/function/call/i32.carbon | 10 ++-- .../function/call/more_param_ir.carbon | 14 ++--- .../testdata/function/call/params_one.carbon | 10 ++-- .../function/call/params_one_comma.carbon | 12 ++-- .../testdata/function/call/params_two.carbon | 14 ++--- .../function/call/params_two_comma.carbon | 18 +++--- .../call/prefer_unqualified_lookup.carbon | 10 ++-- .../function/declaration/import.carbon | 60 +++++++++---------- .../function/definition/import.carbon | 12 ++-- .../testdata/function/generic/deduce.carbon | 20 +++---- .../generic/fail_todo_param_in_type.carbon | 12 ++-- .../function/generic/undefined.carbon | 34 +++++------ .../check/testdata/global/simple_init.carbon | 10 ++-- .../testdata/global/simple_with_fun.carbon | 10 ++-- .../if/fail_reachable_fallthrough.carbon | 16 ++--- toolchain/check/testdata/if/fail_scope.carbon | 10 ++-- .../if/unreachable_fallthrough.carbon | 14 ++--- toolchain/check/testdata/if_expr/basic.carbon | 10 ++-- .../if_expr/constant_condition.carbon | 18 +++--- .../testdata/if_expr/control_flow.carbon | 16 ++--- .../if_expr/fail_not_in_function.carbon | 2 +- .../check/testdata/if_expr/nested.carbon | 22 +++---- .../check/testdata/if_expr/struct.carbon | 14 ++--- .../testdata/impl/extend_impl_generic.carbon | 10 ++-- .../index/array_element_access.carbon | 22 +++---- .../check/testdata/index/expr_category.carbon | 40 ++++++------- .../index/fail_array_large_index.carbon | 18 +++--- .../index/fail_array_non_int_indexing.carbon | 10 ++-- .../fail_array_out_of_bound_access.carbon | 14 ++--- .../testdata/index/fail_expr_category.carbon | 22 +++---- .../index/fail_negative_indexing.carbon | 22 +++---- .../fail_todo_assoc_const_default.carbon | 10 ++-- .../interface/todo_define_not_default.carbon | 10 ++-- .../ir/duplicate_name_same_line.carbon | 14 ++--- .../testdata/let/compile_time_bindings.carbon | 38 ++++++------ toolchain/check/testdata/let/convert.carbon | 18 +++--- .../testdata/let/fail_duplicate_decl.carbon | 14 ++--- .../check/testdata/let/fail_modifiers.carbon | 24 ++++---- toolchain/check/testdata/let/global.carbon | 10 ++-- .../check/testdata/let/shadowed_decl.carbon | 10 ++-- .../testdata/namespace/add_to_import.carbon | 10 ++-- .../check/testdata/namespace/alias.carbon | 10 ++-- .../namespace/fail_decl_in_alias.carbon | 10 ++-- .../check/testdata/namespace/shadow.carbon | 12 ++-- .../operators/builtin/assignment.carbon | 46 +++++++------- .../fail_assignment_to_non_assignable.carbon | 32 +++++----- .../fail_redundant_compound_access.carbon | 14 ++--- .../fail_type_mismatch_assignment.carbon | 10 ++-- .../overloaded/fail_error_recovery.carbon | 6 +- .../operators/overloaded/index.carbon | 18 +++--- .../check/testdata/package_expr/syntax.carbon | 24 ++++---- .../packages/implicit_imports_prelude.carbon | 12 ++-- .../testdata/pointer/address_of_deref.carbon | 10 ++-- .../testdata/pointer/address_of_lvalue.carbon | 18 +++--- toolchain/check/testdata/pointer/basic.carbon | 10 ++-- .../check/testdata/pointer/import.carbon | 12 ++-- .../return/code_after_return_value.carbon | 10 ++-- .../fail_return_with_returned_var.carbon | 18 +++--- .../return/fail_returned_var_shadow.carbon | 22 +++---- .../check/testdata/return/returned_var.carbon | 18 +++--- .../testdata/return/returned_var_scope.carbon | 22 +++---- toolchain/check/testdata/return/struct.carbon | 10 ++-- toolchain/check/testdata/return/tuple.carbon | 14 ++--- toolchain/check/testdata/return/value.carbon | 10 ++-- .../struct/fail_non_member_access.carbon | 10 ++-- toolchain/check/testdata/struct/import.carbon | 54 ++++++++--------- .../testdata/struct/member_access.carbon | 10 ++-- .../check/testdata/struct/one_entry.carbon | 10 ++-- .../testdata/struct/partially_const.carbon | 12 ++-- .../testdata/struct/tuple_as_element.carbon | 14 ++--- .../check/testdata/struct/two_entries.carbon | 18 +++--- .../tuple/access/element_access.carbon | 10 ++-- .../tuple/access/fail_access_error.carbon | 14 ++--- .../tuple/access/fail_large_index.carbon | 10 ++-- .../access/fail_negative_indexing.carbon | 20 +++---- .../access/fail_non_deterministic_type.carbon | 18 +++--- .../tuple/access/fail_non_int_indexing.carbon | 14 ++--- .../tuple/access/fail_non_tuple_access.carbon | 12 ++-- .../access/fail_out_of_bound_access.carbon | 14 ++--- .../fail_out_of_bound_not_literal.carbon | 14 ++--- .../tuple/access/index_not_literal.carbon | 42 ++++++------- .../tuple/access/return_value_access.carbon | 10 ++-- .../tuple/fail_element_type_mismatch.carbon | 10 ++-- toolchain/check/testdata/tuple/import.carbon | 58 +++++++++--------- .../check/testdata/tuple/nested_tuple.carbon | 18 +++--- .../tuple/nested_tuple_in_place.carbon | 14 ++--- .../check/testdata/tuple/one_element.carbon | 10 ++-- .../check/testdata/tuple/two_elements.carbon | 18 +++--- .../testdata/function/generic/call.carbon | 16 ++--- .../function/generic/call_method.carbon | 4 +- 146 files changed, 1298 insertions(+), 1277 deletions(-) diff --git a/core/prelude/types/int.carbon b/core/prelude/types/int.carbon index 27b42e59d7615..fa74eb712d3a3 100644 --- a/core/prelude/types/int.carbon +++ b/core/prelude/types/int.carbon @@ -32,6 +32,11 @@ impl forall [N:! IntLiteral()] Int(N) as As(IntLiteral()) { fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; } +// TODO: Allow as an implicit conversion if N > M. +impl forall [M:! IntLiteral(), N:! IntLiteral()] Int(M) as As(Int(N)) { + fn Convert[self: Self]() -> Int(N) = "int.convert"; +} + // Comparisons. impl forall [N:! IntLiteral()] Int(N) as Eq { diff --git a/core/prelude/types/uint.carbon b/core/prelude/types/uint.carbon index 8a706e47ccb99..540795f190b02 100644 --- a/core/prelude/types/uint.carbon +++ b/core/prelude/types/uint.carbon @@ -5,6 +5,7 @@ package Core library "prelude/types/uint"; import library "prelude/types/int_literal"; +import library "prelude/types/int"; import library "prelude/operators"; private fn MakeUInt(size: IntLiteral()) -> type = "int.make_type_unsigned"; @@ -32,6 +33,21 @@ impl forall [N:! IntLiteral()] UInt(N) as As(IntLiteral()) { fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked"; } +// TODO: Allow as an implicit conversion if N > M. +impl forall [M:! IntLiteral(), N:! IntLiteral()] UInt(M) as As(UInt(N)) { + fn Convert[self: Self]() -> UInt(N) = "int.convert"; +} + +// TODO: Allow as an implicit conversion if N > M. +impl forall [M:! IntLiteral(), N:! IntLiteral()] UInt(M) as As(Int(N)) { + fn Convert[self: Self]() -> Int(N) = "int.convert"; +} + +// Never implicit. +impl forall [M:! IntLiteral(), N:! IntLiteral()] Int(M) as As(UInt(N)) { + fn Convert[self: Self]() -> UInt(N) = "int.convert"; +} + // Comparisons. impl forall [N:! IntLiteral()] UInt(N) as Eq { diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index 39bf623805356..91fc9fbcd6705 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -28,16 +28,16 @@ fn G() { // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -71,7 +71,7 @@ fn G() { // CHECK:STDOUT: %int_2.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc13_29.1: %tuple.type.1 = tuple_literal (%int_1.loc13_22, %int_2.loc13_25, %int_3.loc13) -// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_29.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_29.1: = bound_method %int_1.loc13_22, %impl.elem0.loc13_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_29.1: = specific_function %Convert.bound.loc13_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_29.1: init %i32 = call %Convert.specific_fn.loc13_29.1(%int_1.loc13_22) [template = constants.%int_1.2] @@ -79,7 +79,7 @@ fn G() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc13_29.3: ref %i32 = array_index %a.var, %int_0 // CHECK:STDOUT: %.loc13_29.4: init %i32 = initialize_from %.loc13_29.2 to %.loc13_29.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_29.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_29.2: = bound_method %int_2.loc13_25, %impl.elem0.loc13_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_29.2: = specific_function %Convert.bound.loc13_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_29.2: init %i32 = call %Convert.specific_fn.loc13_29.2(%int_2.loc13_25) [template = constants.%int_2.2] @@ -87,7 +87,7 @@ fn G() { // CHECK:STDOUT: %int_1.loc13_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc13_29.6: ref %i32 = array_index %a.var, %int_1.loc13_29 // CHECK:STDOUT: %.loc13_29.7: init %i32 = initialize_from %.loc13_29.5 to %.loc13_29.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_29.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_29.3: = bound_method %int_3.loc13, %impl.elem0.loc13_29.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_29.3: = specific_function %Convert.bound.loc13_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_29.3: init %i32 = call %Convert.specific_fn.loc13_29.3(%int_3.loc13) [template = constants.%int_3.2] @@ -104,21 +104,21 @@ fn G() { // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc14: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc14_36.1: %tuple.type.1 = tuple_literal (%int_1.loc14, %int_2.loc14, %int_3.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_36.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_36.1: = bound_method %int_1.loc14, %impl.elem0.loc14_36.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_36.1: = specific_function %Convert.bound.loc14_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_36.1: init %i32 = call %Convert.specific_fn.loc14_36.1(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_36.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_36.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc14_36.3: init %i32 = initialize_from %.loc14_36.2 to %tuple.elem0 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_36.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_36.2: = bound_method %int_2.loc14, %impl.elem0.loc14_36.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_36.2: = specific_function %Convert.bound.loc14_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_36.2: init %i32 = call %Convert.specific_fn.loc14_36.2(%int_2.loc14) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc14_36.4: init %i32 = converted %int_2.loc14, %int.convert_checked.loc14_36.2 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access %b.var, element1 // CHECK:STDOUT: %.loc14_36.5: init %i32 = initialize_from %.loc14_36.4 to %tuple.elem1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_36.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_36.3: = bound_method %int_3.loc14, %impl.elem0.loc14_36.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc14_36.3: = specific_function %Convert.bound.loc14_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc14_36.3: init %i32 = call %Convert.specific_fn.loc14_36.3(%int_3.loc14) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index c9e634d7e0aff..0dda923c76d27 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -26,10 +26,10 @@ fn Run() { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] @@ -73,7 +73,7 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index 1fc27f9444a88..29194b6bc92ba 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -22,16 +22,16 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -67,21 +67,21 @@ var b: [i32; 3] = a; // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_34.1: %tuple.type.3 = tuple_literal (%int_1.loc11, %int_2.loc11, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_34.1: = bound_method %int_1.loc11, %impl.elem0.loc11_34.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_34.1: = specific_function %Convert.bound.loc11_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_34.1: init %i32 = call %Convert.specific_fn.loc11_34.1(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_34.2: init %i32 = converted %int_1.loc11, %int.convert_checked.loc11_34.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc11: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_34.3: init %i32 = initialize_from %.loc11_34.2 to %tuple.elem0.loc11 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_34.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_34.2: = bound_method %int_2.loc11, %impl.elem0.loc11_34.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_34.2: = specific_function %Convert.bound.loc11_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_34.2: init %i32 = call %Convert.specific_fn.loc11_34.2(%int_2.loc11) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc11_34.4: init %i32 = converted %int_2.loc11, %int.convert_checked.loc11_34.2 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem1.loc11: ref %i32 = tuple_access file.%a.var, element1 // CHECK:STDOUT: %.loc11_34.5: init %i32 = initialize_from %.loc11_34.4 to %tuple.elem1.loc11 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_34.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_34.3: = bound_method %int_3, %impl.elem0.loc11_34.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_34.3: = specific_function %Convert.bound.loc11_34.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_34.3: init %i32 = call %Convert.specific_fn.loc11_34.3(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 1bde258854861..ca681ad9861cc 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -23,10 +23,10 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %array.1: %array_type.1 = tuple_value (%int_1.2) [template] @@ -49,7 +49,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Float = %import_ref.229 +// CHECK:STDOUT: .Float = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -75,7 +75,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%int_1.loc11) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc11, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc11) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index d69cea13ec5a1..36a91bbf5957c 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -28,13 +28,13 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] @@ -43,7 +43,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.1) [template] // CHECK:STDOUT: } @@ -124,7 +124,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_2.loc14_31: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc14_35.1: %tuple.type = tuple_literal (%int_1.loc14_28, %int_2.loc14_31, %int_3) -// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_35.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_35.1: = bound_method %int_1.loc14_28, %impl.elem0.loc14_35.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_35.1: = specific_function %Convert.bound.loc14_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_35.1: init %i32 = call %Convert.specific_fn.loc14_35.1(%int_1.loc14_28) [template = constants.%int_1.2] @@ -132,7 +132,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc14_35.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc14_35.4: init %i32 = initialize_from %.loc14_35.2 to %.loc14_35.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_35.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_35.2: = bound_method %int_2.loc14_31, %impl.elem0.loc14_35.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_35.2: = specific_function %Convert.bound.loc14_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_35.2: init %i32 = call %Convert.specific_fn.loc14_35.2(%int_2.loc14_31) [template = constants.%int_2.2] @@ -140,7 +140,7 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int_1.loc14_35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_35.6: ref %i32 = array_index file.%a.var, %int_1.loc14_35 // CHECK:STDOUT: %.loc14_35.7: init %i32 = initialize_from %.loc14_35.5 to %.loc14_35.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_35.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_35.3: = bound_method %int_3, %impl.elem0.loc14_35.3 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc14_35.3: = specific_function %Convert.bound.loc14_35.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc14_35.3: init %i32 = call %Convert.specific_fn.loc14_35.3(%int_3) [template = constants.%int_3.1] 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 a6f4856615326..9b74c9f4174c2 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 @@ -26,16 +26,16 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -71,7 +71,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc11: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2] @@ -79,7 +79,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2] @@ -87,7 +87,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27 // CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.3: = bound_method %int_3.loc11, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3.loc11) [template = constants.%int_3.2] @@ -106,7 +106,7 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: %.loc15_28.1: Core.IntLiteral = struct_access %.loc15_27.2, element0 [template = constants.%int_3.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %.loc15_28.1, %impl.elem0.loc15 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%.loc15_28.1) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 8b370b1b337ab..8353cf8f2643b 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -52,10 +52,10 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, String, String) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, String, String) [template] @@ -104,7 +104,7 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %str.loc18_23: String = string_literal "Hello" [template = constants.%str.1] // CHECK:STDOUT: %str.loc18_32: String = string_literal "World" [template = constants.%str.2] // CHECK:STDOUT: %.loc18_39.1: %tuple.type.1 = tuple_literal (%int_1.loc18, %str.loc18_23, %str.loc18_32) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc18, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc18) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index 18a2f18cb790c..a5d66c0acb897 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -32,16 +32,16 @@ fn G() -> i32 { // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -121,7 +121,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc16_20.1: %tuple.type = tuple_literal (%int_1.loc16_13, %int_2.loc16_16, %int_3) // CHECK:STDOUT: %int_1.loc16_23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_20.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_20.1: = bound_method %int_1.loc16_13, %impl.elem0.loc16_20.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_20.1: = specific_function %Convert.bound.loc16_20.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_20.1: init %i32 = call %Convert.specific_fn.loc16_20.1(%int_1.loc16_13) [template = constants.%int_1.2] @@ -130,7 +130,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc16_20.4: ref %i32 = array_index %.loc16_20.3, %int_0 // CHECK:STDOUT: %.loc16_20.5: init %i32 = initialize_from %.loc16_20.2 to %.loc16_20.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_20.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_20.2: = bound_method %int_2.loc16_16, %impl.elem0.loc16_20.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16_20.2: = specific_function %Convert.bound.loc16_20.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16_20.2: init %i32 = call %Convert.specific_fn.loc16_20.2(%int_2.loc16_16) [template = constants.%int_2.2] @@ -138,7 +138,7 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1.loc16_20: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc16_20.7: ref %i32 = array_index %.loc16_20.3, %int_1.loc16_20 // CHECK:STDOUT: %.loc16_20.8: init %i32 = initialize_from %.loc16_20.6 to %.loc16_20.7 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_20.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_20.3: = bound_method %int_3, %impl.elem0.loc16_20.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc16_20.3: = specific_function %Convert.bound.loc16_20.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc16_20.3: init %i32 = call %Convert.specific_fn.loc16_20.3(%int_3) [template = constants.%int_3.2] @@ -150,7 +150,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc16_20.13: init %array_type = converted %.loc16_20.1, %.loc16_20.12 [template = constants.%array] // CHECK:STDOUT: %.loc16_20.14: ref %array_type = temporary %.loc16_20.3, %.loc16_20.13 // CHECK:STDOUT: %.loc16_20.15: %array_type = bind_value %.loc16_20.14 -// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_23: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_23: = bound_method %int_1.loc16_23, %impl.elem0.loc16_23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_23: = specific_function %Convert.bound.loc16_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_23: init %i32 = call %Convert.specific_fn.loc16_23(%int_1.loc16_23) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index c411019a07a9e..17f21ff47544e 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -23,16 +23,16 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -68,7 +68,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_2.loc11_23: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_1.loc11_20) [template = constants.%int_1.2] @@ -76,7 +76,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_27.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_27.4: init %i32 = initialize_from %.loc11_27.2 to %.loc11_27.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_2.loc11_23) [template = constants.%int_2.2] @@ -84,7 +84,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %int_1.loc11_27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_27.6: ref %i32 = array_index file.%a.var, %int_1.loc11_27 // CHECK:STDOUT: %.loc11_27.7: init %i32 = initialize_from %.loc11_27.5 to %.loc11_27.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.3: = bound_method %int_3, %impl.elem0.loc11_27.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.3: = specific_function %Convert.bound.loc11_27.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_27.3: init %i32 = call %Convert.specific_fn.loc11_27.3(%int_3) [template = constants.%int_3.2] @@ -103,7 +103,7 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: %.loc12_28.1: Core.IntLiteral = struct_access %.loc12_27.2, element0 [template = constants.%int_2.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %.loc12_28.1, %impl.elem0.loc12 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%.loc12_28.1) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index 469f2ca244eb2..82344fdc5ea32 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -28,34 +28,34 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_7.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_7.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.7: = specific_function %Convert.bound.7, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] -// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_8.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_8.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.8: = specific_function %Convert.bound.8, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template] -// CHECK:STDOUT: %Convert.bound.9: = bound_method %int_9.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.9: = bound_method %int_9.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.9: = specific_function %Convert.bound.9, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2, %int_4.2, %int_5.2, %int_6.2, %int_7.2, %int_8.2, %int_9.2) [template] @@ -92,7 +92,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_8.loc11_41: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] // CHECK:STDOUT: %.loc11_45.1: %tuple.type = tuple_literal (%int_1.loc11_20, %int_2.loc11_23, %int_3.loc11_26, %int_4.loc11_29, %int_5.loc11_32, %int_6.loc11_35, %int_7.loc11_38, %int_8.loc11_41, %int_9) -// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.1: = bound_method %int_1.loc11_20, %impl.elem0.loc11_45.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.1: = specific_function %Convert.bound.loc11_45.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_45.1: init %i32 = call %Convert.specific_fn.loc11_45.1(%int_1.loc11_20) [template = constants.%int_1.2] @@ -100,7 +100,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_45.3: ref %i32 = array_index file.%a.var, %int_0 // CHECK:STDOUT: %.loc11_45.4: init %i32 = initialize_from %.loc11_45.2 to %.loc11_45.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.2: = bound_method %int_2.loc11_23, %impl.elem0.loc11_45.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.2: = specific_function %Convert.bound.loc11_45.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_45.2: init %i32 = call %Convert.specific_fn.loc11_45.2(%int_2.loc11_23) [template = constants.%int_2.2] @@ -108,7 +108,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_1.loc11_45: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc11_45.6: ref %i32 = array_index file.%a.var, %int_1.loc11_45 // CHECK:STDOUT: %.loc11_45.7: init %i32 = initialize_from %.loc11_45.5 to %.loc11_45.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.3: = bound_method %int_3.loc11_26, %impl.elem0.loc11_45.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.3: = specific_function %Convert.bound.loc11_45.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_45.3: init %i32 = call %Convert.specific_fn.loc11_45.3(%int_3.loc11_26) [template = constants.%int_3.2] @@ -116,7 +116,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_2.loc11_45: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_45.9: ref %i32 = array_index file.%a.var, %int_2.loc11_45 // CHECK:STDOUT: %.loc11_45.10: init %i32 = initialize_from %.loc11_45.8 to %.loc11_45.9 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.4: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.4: = bound_method %int_4.loc11_29, %impl.elem0.loc11_45.4 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.4: = specific_function %Convert.bound.loc11_45.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc11_45.4: init %i32 = call %Convert.specific_fn.loc11_45.4(%int_4.loc11_29) [template = constants.%int_4.2] @@ -124,7 +124,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_3.loc11_45: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_45.12: ref %i32 = array_index file.%a.var, %int_3.loc11_45 // CHECK:STDOUT: %.loc11_45.13: init %i32 = initialize_from %.loc11_45.11 to %.loc11_45.12 [template = constants.%int_4.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.5: = bound_method %int_5.loc11_32, %impl.elem0.loc11_45.5 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.5: = specific_function %Convert.bound.loc11_45.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc11_45.5: init %i32 = call %Convert.specific_fn.loc11_45.5(%int_5.loc11_32) [template = constants.%int_5.2] @@ -132,7 +132,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_4.loc11_45: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_45.15: ref %i32 = array_index file.%a.var, %int_4.loc11_45 // CHECK:STDOUT: %.loc11_45.16: init %i32 = initialize_from %.loc11_45.14 to %.loc11_45.15 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.6: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.6: = bound_method %int_6.loc11_35, %impl.elem0.loc11_45.6 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.6: = specific_function %Convert.bound.loc11_45.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc11_45.6: init %i32 = call %Convert.specific_fn.loc11_45.6(%int_6.loc11_35) [template = constants.%int_6.2] @@ -140,7 +140,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_5.loc11_45: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc11_45.18: ref %i32 = array_index file.%a.var, %int_5.loc11_45 // CHECK:STDOUT: %.loc11_45.19: init %i32 = initialize_from %.loc11_45.17 to %.loc11_45.18 [template = constants.%int_6.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.7: = bound_method %int_7.loc11_38, %impl.elem0.loc11_45.7 [template = constants.%Convert.bound.7] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.7: = specific_function %Convert.bound.loc11_45.7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7] // CHECK:STDOUT: %int.convert_checked.loc11_45.7: init %i32 = call %Convert.specific_fn.loc11_45.7(%int_7.loc11_38) [template = constants.%int_7.2] @@ -148,7 +148,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_6.loc11_45: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_45.21: ref %i32 = array_index file.%a.var, %int_6.loc11_45 // CHECK:STDOUT: %.loc11_45.22: init %i32 = initialize_from %.loc11_45.20 to %.loc11_45.21 [template = constants.%int_7.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.8: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.8: = bound_method %int_8.loc11_41, %impl.elem0.loc11_45.8 [template = constants.%Convert.bound.8] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.8: = specific_function %Convert.bound.loc11_45.8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8] // CHECK:STDOUT: %int.convert_checked.loc11_45.8: init %i32 = call %Convert.specific_fn.loc11_45.8(%int_8.loc11_41) [template = constants.%int_8.2] @@ -156,7 +156,7 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: %int_7.loc11_45: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] // CHECK:STDOUT: %.loc11_45.24: ref %i32 = array_index file.%a.var, %int_7.loc11_45 // CHECK:STDOUT: %.loc11_45.25: init %i32 = initialize_from %.loc11_45.23 to %.loc11_45.24 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_45.9: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_45.9: = bound_method %int_9, %impl.elem0.loc11_45.9 [template = constants.%Convert.bound.9] // CHECK:STDOUT: %Convert.specific_fn.loc11_45.9: = specific_function %Convert.bound.loc11_45.9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.9] // CHECK:STDOUT: %int.convert_checked.loc11_45.9: init %i32 = call %Convert.specific_fn.loc11_45.9(%int_9) [template = constants.%int_9.2] diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 3bf811ac33f4a..17ca6ed589093 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -120,13 +120,13 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.x.y.2: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2, %int_2.2) [template] @@ -199,14 +199,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc9_27.1: %struct_type.x.y.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9_27.1: = bound_method %int_1, %impl.elem0.loc9_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9_27.1: = specific_function %Convert.bound.loc9_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9_27.1: init %i32 = call %Convert.specific_fn.loc9_27.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_27.2: init %i32 = converted %int_1, %int.convert_checked.loc9_27.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_27.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc9_27.4: init %i32 = initialize_from %.loc9_27.2 to %.loc9_27.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9_27.2: = bound_method %int_2, %impl.elem0.loc9_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_27.2: = specific_function %Convert.bound.loc9_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_27.2: init %i32 = call %Convert.specific_fn.loc9_27.2(%int_2) [template = constants.%int_2.2] @@ -223,14 +223,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc17_31.1: %struct_type.x.y.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_31.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17_31.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17_31.1: = bound_method %int_1, %impl.elem0.loc17_31.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc17_31.1: = specific_function %Convert.bound.loc17_31.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc17_31.1: init %i32 = call %Convert.specific_fn.loc17_31.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_31.2: init %i32 = converted %int_1, %int.convert_checked.loc17_31.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_31.3: ref %i32 = class_element_access file.%a_ref.var, element0 // CHECK:STDOUT: %.loc17_31.4: init %i32 = initialize_from %.loc17_31.2 to %.loc17_31.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17_31.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17_31.2: = bound_method %int_2, %impl.elem0.loc17_31.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_31.2: = specific_function %Convert.bound.loc17_31.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_31.2: init %i32 = call %Convert.specific_fn.loc17_31.2(%int_2) [template = constants.%int_2.2] @@ -275,10 +275,10 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -319,7 +319,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -439,13 +439,13 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.x.y.2: type = struct_type {.x: Core.IntLiteral, .y: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2, %int_2.2) [template] @@ -503,7 +503,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2.loc13: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_34.1: %struct_type.x.y.2 = struct_literal (%int_1.loc13, %int_2.loc13) // CHECK:STDOUT: %A.ref.loc13: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_34.1: = bound_method %int_1.loc13, %impl.elem0.loc13_34.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_34.1: = specific_function %Convert.bound.loc13_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_34.1: init %i32 = call %Convert.specific_fn.loc13_34.1(%int_1.loc13) [template = constants.%int_1.2] @@ -511,7 +511,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc13_34.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc13_34.4: ref %i32 = class_element_access %.loc13_34.3, element0 // CHECK:STDOUT: %.loc13_34.5: init %i32 = initialize_from %.loc13_34.2 to %.loc13_34.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_34.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_34.2: = bound_method %int_2.loc13, %impl.elem0.loc13_34.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_34.2: = specific_function %Convert.bound.loc13_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_34.2: init %i32 = call %Convert.specific_fn.loc13_34.2(%int_2.loc13) [template = constants.%int_2.2] @@ -530,7 +530,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %int_2.loc24: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc24_33.1: %struct_type.x.y.2 = struct_literal (%int_1.loc24, %int_2.loc24) // CHECK:STDOUT: %A.ref.loc24: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %impl.elem0.loc24_33.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24_33.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24_33.1: = bound_method %int_1.loc24, %impl.elem0.loc24_33.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc24_33.1: = specific_function %Convert.bound.loc24_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc24_33.1: init %i32 = call %Convert.specific_fn.loc24_33.1(%int_1.loc24) [template = constants.%int_1.2] @@ -538,7 +538,7 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %.loc24_33.3: ref %A = temporary_storage // CHECK:STDOUT: %.loc24_33.4: ref %i32 = class_element_access %.loc24_33.3, element0 // CHECK:STDOUT: %.loc24_33.5: init %i32 = initialize_from %.loc24_33.2 to %.loc24_33.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24_33.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24_33.2: = bound_method %int_2.loc24, %impl.elem0.loc24_33.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc24_33.2: = specific_function %Convert.bound.loc24_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc24_33.2: init %i32 = call %Convert.specific_fn.loc24_33.2(%int_2.loc24) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/as/basic.carbon b/toolchain/check/testdata/as/basic.carbon index 7ed50cd414321..96b3db932424c 100644 --- a/toolchain/check/testdata/as/basic.carbon +++ b/toolchain/check/testdata/as/basic.carbon @@ -21,10 +21,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -60,7 +60,7 @@ fn Main() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 4b3a88e359137..f1700f3e37301 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -44,10 +44,10 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %Convert.5: %Convert.type.5 = struct_value () [template] // CHECK:STDOUT: %interface.2: = interface_witness (%Convert.5) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.7, @impl.5(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.21: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.13 [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.7, @impl.5(%int_32) [template] +// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] +// CHECK:STDOUT: %interface.22: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.14 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.1, @Convert.7(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.2, %Convert.3 [template] @@ -170,7 +170,7 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_32.loc23_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc23_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc23_18: %Convert.type.4 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %impl.elem0.loc23_18: %Convert.type.4 = interface_witness_access constants.%interface.22, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %Convert.bound.loc23_18: = bound_method %int_4, %impl.elem0.loc23_18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound.loc23_18, @Convert.7(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 3937cb3a97156..6c002b89c09f0 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -20,10 +20,10 @@ var test_type: type = i32; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %float: f64 = float_literal 0.10000000000000001 [template] @@ -34,7 +34,7 @@ var test_type: type = i32; // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Float = %import_ref.229 +// CHECK:STDOUT: .Float = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -60,7 +60,7 @@ var test_type: type = i32; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index a5952ca460bac..13fb326035504 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -44,14 +44,14 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_39999999999999999993.1: Core.IntLiteral = int_value 39999999999999999993 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_39999999999999999993.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_39999999999999999993.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_39999999999999999993.2: %i32 = int_value 39999999999999999993 [template] // CHECK:STDOUT: %int_2147483648.1: Core.IntLiteral = int_value 2147483648 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483648.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483648.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483648.2: %i32 = int_value 2147483648 [template] // CHECK:STDOUT: } @@ -60,7 +60,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Float = %import_ref.229 +// CHECK:STDOUT: .Float = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -81,7 +81,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_39999999999999999993, %impl.elem0.loc15 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_39999999999999999993) [template = constants.%int_39999999999999999993.2] @@ -89,7 +89,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %.loc15_34.2: %i32 = converted %int_39999999999999999993, %.loc15_34.1 [template = constants.%int_39999999999999999993.2] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc15_34.2 // CHECK:STDOUT: %int_2147483648.loc21: Core.IntLiteral = int_value 2147483648 [template = constants.%int_2147483648.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_2147483648.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_2147483648.loc21) [template = constants.%int_2147483648.2] @@ -97,7 +97,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %.loc21_27.2: %i32 = converted %int_2147483648.loc21, %.loc21_27.1 [template = constants.%int_2147483648.2] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc21_27.2 // CHECK:STDOUT: %int_2147483648.loc27: Core.IntLiteral = int_value 2147483648 [template = constants.%int_2147483648.1] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_2147483648.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_2147483648.loc27) [template = constants.%int_2147483648.2] diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 110e85d0d1529..4a9a19197f06a 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -44,20 +44,20 @@ fn F() { // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_8.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_8.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_8.2: %i32 = int_value 8 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] @@ -77,7 +77,7 @@ fn F() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Float = %import_ref.229 +// CHECK:STDOUT: .Float = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -103,7 +103,7 @@ fn F() { // CHECK:STDOUT: %int_2147483647.loc19: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_2147483647.loc20: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %.loc21_3.1: %tuple.type.1 = tuple_literal (%int_8.loc15, %int_9, %int_8.loc17, %int_8.loc18, %int_2147483647.loc19, %int_2147483647.loc20) -// CHECK:STDOUT: %impl.elem0.loc21_3.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21_3.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21_3.1: = bound_method %int_8.loc15, %impl.elem0.loc21_3.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.1: = specific_function %Convert.bound.loc21_3.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc21_3.1: init %i32 = call %Convert.specific_fn.loc21_3.1(%int_8.loc15) [template = constants.%int_8.2] @@ -111,7 +111,7 @@ fn F() { // CHECK:STDOUT: %int_0.loc21: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc21_3.3: ref %i32 = array_index %ints.var, %int_0.loc21 // CHECK:STDOUT: %.loc21_3.4: init %i32 = initialize_from %.loc21_3.2 to %.loc21_3.3 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21_3.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21_3.2: = bound_method %int_9, %impl.elem0.loc21_3.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.2: = specific_function %Convert.bound.loc21_3.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21_3.2: init %i32 = call %Convert.specific_fn.loc21_3.2(%int_9) [template = constants.%int_9.2] @@ -119,7 +119,7 @@ fn F() { // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: %.loc21_3.6: ref %i32 = array_index %ints.var, %int_1.loc21 // CHECK:STDOUT: %.loc21_3.7: init %i32 = initialize_from %.loc21_3.5 to %.loc21_3.6 [template = constants.%int_9.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21_3.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21_3.3: = bound_method %int_8.loc17, %impl.elem0.loc21_3.3 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.3: = specific_function %Convert.bound.loc21_3.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc21_3.3: init %i32 = call %Convert.specific_fn.loc21_3.3(%int_8.loc17) [template = constants.%int_8.2] @@ -127,7 +127,7 @@ fn F() { // CHECK:STDOUT: %int_2.loc21: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %.loc21_3.9: ref %i32 = array_index %ints.var, %int_2.loc21 // CHECK:STDOUT: %.loc21_3.10: init %i32 = initialize_from %.loc21_3.8 to %.loc21_3.9 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.4: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21_3.4: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21_3.4: = bound_method %int_8.loc18, %impl.elem0.loc21_3.4 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.4: = specific_function %Convert.bound.loc21_3.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc21_3.4: init %i32 = call %Convert.specific_fn.loc21_3.4(%int_8.loc18) [template = constants.%int_8.2] @@ -135,7 +135,7 @@ fn F() { // CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3] // CHECK:STDOUT: %.loc21_3.12: ref %i32 = array_index %ints.var, %int_3.loc21 // CHECK:STDOUT: %.loc21_3.13: init %i32 = initialize_from %.loc21_3.11 to %.loc21_3.12 [template = constants.%int_8.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21_3.5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21_3.5: = bound_method %int_2147483647.loc19, %impl.elem0.loc21_3.5 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.5: = specific_function %Convert.bound.loc21_3.5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc21_3.5: init %i32 = call %Convert.specific_fn.loc21_3.5(%int_2147483647.loc19) [template = constants.%int_2147483647.2] @@ -143,7 +143,7 @@ fn F() { // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: %.loc21_3.15: ref %i32 = array_index %ints.var, %int_4.loc21 // CHECK:STDOUT: %.loc21_3.16: init %i32 = initialize_from %.loc21_3.14 to %.loc21_3.15 [template = constants.%int_2147483647.2] -// CHECK:STDOUT: %impl.elem0.loc21_3.6: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21_3.6: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21_3.6: = bound_method %int_2147483647.loc20, %impl.elem0.loc21_3.6 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc21_3.6: = specific_function %Convert.bound.loc21_3.6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc21_3.6: init %i32 = call %Convert.specific_fn.loc21_3.6(%int_2147483647.loc20) [template = constants.%int_2147483647.2] diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index a9fbd832629cf..2fd460c403862 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -18,14 +18,14 @@ var b: i32 = ((2)); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -55,14 +55,14 @@ var b: i32 = ((2)); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_1, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11: init %i32 = converted %int_1, %int.convert_checked.loc11 [template = constants.%int_1.2] // CHECK:STDOUT: assign file.%a.var, %.loc11 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_2, %impl.elem0.loc12 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/basics/run_i32.carbon b/toolchain/check/testdata/basics/run_i32.carbon index bfa6a608f1361..2a49535af01c0 100644 --- a/toolchain/check/testdata/basics/run_i32.carbon +++ b/toolchain/check/testdata/basics/run_i32.carbon @@ -19,10 +19,10 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -58,7 +58,7 @@ fn Run() -> i32 { return 0; } // CHECK:STDOUT: fn @Run() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 1148e06d10954..35c1ab7d97e49 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -102,7 +102,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Main//types, Float, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Int = %import_ref.229 +// CHECK:STDOUT: .Int = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -163,11 +163,11 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %int_32.1: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32.1) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32.1) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] // CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_64.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_64.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] // CHECK:STDOUT: %int_64.2: %i32 = int_value 64 [template] // CHECK:STDOUT: } @@ -176,7 +176,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Main//types, Float, loaded [template = constants.%Float] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Int = %import_ref.229 +// CHECK:STDOUT: .Int = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -205,7 +205,7 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_64, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_64) [template = constants.%int_64.2] diff --git a/toolchain/check/testdata/builtins/print/char.carbon b/toolchain/check/testdata/builtins/print/char.carbon index 79d3d4ae90951..cedbc23bc95b7 100644 --- a/toolchain/check/testdata/builtins/print/char.carbon +++ b/toolchain/check/testdata/builtins/print/char.carbon @@ -28,16 +28,16 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %PrintChar.type.2: type = fn_type @PrintChar.2 [template] // CHECK:STDOUT: %PrintChar.2: %PrintChar.type.2 = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -46,12 +46,12 @@ fn Main() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .PrintChar = %import_ref.229 +// CHECK:STDOUT: .PrintChar = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//io // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.229: %PrintChar.type.2 = import_ref Core//io, PrintChar, loaded [template = constants.%PrintChar.2] +// CHECK:STDOUT: %import_ref.232: %PrintChar.type.2 = import_ref Core//io, PrintChar, loaded [template = constants.%PrintChar.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -87,7 +87,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %PrintChar.ref.loc16: %PrintChar.type.1 = name_ref PrintChar, file.%PrintChar.decl [template = constants.%PrintChar.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_1, %impl.elem0.loc16 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_1) [template = constants.%int_1.2] @@ -95,9 +95,9 @@ fn Main() { // CHECK:STDOUT: %.loc16_13.2: %i32 = converted %int_1, %.loc16_13.1 [template = constants.%int_1.2] // CHECK:STDOUT: %print.char.loc16: init %i32 = call %PrintChar.ref.loc16(%.loc16_13.2) // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %PrintChar.ref.loc17: %PrintChar.type.2 = name_ref PrintChar, imports.%import_ref.229 [template = constants.%PrintChar.2] +// CHECK:STDOUT: %PrintChar.ref.loc17: %PrintChar.type.2 = name_ref PrintChar, imports.%import_ref.232 [template = constants.%PrintChar.2] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_2, %impl.elem0.loc17 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/builtins/print/int.carbon b/toolchain/check/testdata/builtins/print/int.carbon index d114966529d62..f82c4f6aac672 100644 --- a/toolchain/check/testdata/builtins/print/int.carbon +++ b/toolchain/check/testdata/builtins/print/int.carbon @@ -30,16 +30,16 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %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: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -48,12 +48,12 @@ fn Main() { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Print = %import_ref.229 +// CHECK:STDOUT: .Print = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//io // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.229: %Print.type.2 = import_ref Core//io, Print, loaded [template = constants.%Print.2] +// CHECK:STDOUT: %import_ref.232: %Print.type.2 = import_ref Core//io, Print, loaded [template = constants.%Print.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -83,7 +83,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Print.ref.loc16: %Print.type.1 = name_ref Print, file.%Print.decl [template = constants.%Print.1] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_1, %impl.elem0.loc16 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_1) [template = constants.%int_1.2] @@ -91,9 +91,9 @@ fn Main() { // CHECK:STDOUT: %.loc16_9.2: %i32 = converted %int_1, %.loc16_9.1 [template = constants.%int_1.2] // CHECK:STDOUT: %print.int.loc16: init %empty_tuple.type = call %Print.ref.loc16(%.loc16_9.2) // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Print.ref.loc18: %Print.type.2 = name_ref Print, imports.%import_ref.229 [template = constants.%Print.2] +// CHECK:STDOUT: %Print.ref.loc18: %Print.type.2 = name_ref Print, imports.%import_ref.232 [template = constants.%Print.2] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_2, %impl.elem0.loc18 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 8de0f6c34e8ca..f41d135cc9961 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -154,10 +154,10 @@ class A { // CHECK:STDOUT: %Circle.elem: type = unbound_element_type %Circle, %i32 [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeInternalFunction.type: type = fn_type @SomeInternalFunction [template] @@ -167,7 +167,7 @@ class A { // CHECK:STDOUT: %struct_type.radius.1: type = struct_type {.radius: %i32} [template] // CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.radius.1 [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %struct_type.radius.2: type = struct_type {.radius: Core.IntLiteral} [template] @@ -199,7 +199,7 @@ class A { // CHECK:STDOUT: class @Circle { // CHECK:STDOUT: %.loc5: %Circle.elem = field_decl radius, element0 [template] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -237,7 +237,7 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -250,7 +250,7 @@ class A { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc13_24.1: %struct_type.radius.2 = struct_literal (%int_5) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -352,10 +352,10 @@ class A { // CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.radius [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -440,7 +440,7 @@ class A { // CHECK:STDOUT: fn @SomeInternalFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -467,10 +467,10 @@ class A { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] @@ -498,7 +498,7 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -529,10 +529,10 @@ class A { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] @@ -561,7 +561,7 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %int_5.loc5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_5.loc5) [template = constants.%int_5.2] @@ -569,7 +569,7 @@ class A { // CHECK:STDOUT: %.loc5_27.2: %i32 = converted %int_5.loc5, %.loc5_27.1 [template = constants.%int_5.2] // CHECK:STDOUT: %x: %i32 = bind_name x, %.loc5_27.2 // CHECK:STDOUT: %int_5.loc6: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5.loc6) [template = constants.%int_5.2] diff --git a/toolchain/check/testdata/class/adapter/init_adapt.carbon b/toolchain/check/testdata/class/adapter/init_adapt.carbon index e0d429f014a89..781583067ca64 100644 --- a/toolchain/check/testdata/class/adapter/init_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/init_adapt.carbon @@ -105,13 +105,13 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] @@ -199,7 +199,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_27.1: = bound_method %int_1, %impl.elem0.loc13_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.1: = specific_function %Convert.bound.loc13_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %Convert.specific_fn.loc13_27.1(%int_1) [template = constants.%int_1.2] @@ -207,7 +207,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0 // CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_27.2 to %.loc13_27.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_27.2: = bound_method %int_2, %impl.elem0.loc13_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.2: = specific_function %Convert.bound.loc13_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %Convert.specific_fn.loc13_27.2(%int_2) [template = constants.%int_2.2] @@ -260,13 +260,13 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] @@ -354,7 +354,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_27.1: = bound_method %int_1, %impl.elem0.loc13_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.1: = specific_function %Convert.bound.loc13_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_27.1: init %i32 = call %Convert.specific_fn.loc13_27.1(%int_1) [template = constants.%int_1.2] @@ -362,7 +362,7 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage // CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0 // CHECK:STDOUT: %.loc13_27.5: init %i32 = initialize_from %.loc13_27.2 to %.loc13_27.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_27.2: = bound_method %int_2, %impl.elem0.loc13_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_27.2: = specific_function %Convert.bound.loc13_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_27.2: init %i32 = call %Convert.specific_fn.loc13_27.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 7bf5bd41139be..d9c53e06f5621 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -65,14 +65,14 @@ class Derived { // CHECK:STDOUT: %int_7.1: Core.IntLiteral = int_value 7 [template] // CHECK:STDOUT: %struct_type.base.d.3: type = struct_type {.base: %struct_type.b.2, .d: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %Base.val: %Base = struct_value (%int_4.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] // CHECK:STDOUT: %Derived.val: %Derived = struct_value (%Base.val, %int_7.2) [template] @@ -160,7 +160,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.1: %struct_type.b.2 = struct_literal (%int_4) // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7.1] // CHECK:STDOUT: %.loc14_35.1: %struct_type.base.d.3 = struct_literal (%.loc14_26.1, %int_7) -// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_26: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_26: = bound_method %int_4, %impl.elem0.loc14_26 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_26: = specific_function %Convert.bound.loc14_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %Convert.specific_fn.loc14_26(%int_4) [template = constants.%int_4.2] @@ -170,7 +170,7 @@ class Derived { // CHECK:STDOUT: %.loc14_26.4: init %i32 = initialize_from %.loc14_26.2 to %.loc14_26.3 [template = constants.%int_4.2] // CHECK:STDOUT: %.loc14_26.5: init %Base = class_init (%.loc14_26.4), %.loc14_35.2 [template = constants.%Base.val] // CHECK:STDOUT: %.loc14_35.3: init %Base = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%Base.val] -// CHECK:STDOUT: %impl.elem0.loc14_35: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_35: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_35: = bound_method %int_7, %impl.elem0.loc14_35 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_35: = specific_function %Convert.bound.loc14_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_35: init %i32 = call %Convert.specific_fn.loc14_35(%int_7) [template = constants.%int_7.2] diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index 969fd0117ae19..97a5baf8360e4 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -41,10 +41,10 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.a [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Derived: type = class_type @Derived [template] @@ -142,7 +142,7 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12 [template = @Base.%.loc12] // CHECK:STDOUT: %.loc18_10: ref %i32 = class_element_access %.loc18_4, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index 51ca98f26ffd7..fdf856202e0b4 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -43,10 +43,10 @@ fn Run() -> i32 { // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -161,7 +161,7 @@ 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: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index 4a5697d186fcf..ec7995a7461ee 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -79,18 +79,18 @@ fn ConvertInit() { // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.base.c.3: type = struct_type {.base: %struct_type.base.b.3, .c: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %B.val: %B = struct_value (%A.val, %int_2.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%B.val, %int_3.2) [template] @@ -302,7 +302,7 @@ fn ConvertInit() { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc38_57.1: %struct_type.base.c.3 = struct_literal (%.loc38_48.1, %int_3) // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %impl.elem0.loc38_39: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc38_39: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc38_39: = bound_method %int_1, %impl.elem0.loc38_39 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc38_39: = specific_function %Convert.bound.loc38_39, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc38_39: init %i32 = call %Convert.specific_fn.loc38_39(%int_1) [template = constants.%int_1.2] @@ -314,7 +314,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_39.4: init %i32 = initialize_from %.loc38_39.2 to %.loc38_39.3 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc38_39.5: init %A = class_init (%.loc38_39.4), %.loc38_48.2 [template = constants.%A.val] // CHECK:STDOUT: %.loc38_48.3: init %A = converted %.loc38_39.1, %.loc38_39.5 [template = constants.%A.val] -// CHECK:STDOUT: %impl.elem0.loc38_48: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc38_48: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc38_48: = bound_method %int_2, %impl.elem0.loc38_48 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc38_48: = specific_function %Convert.bound.loc38_48, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc38_48: init %i32 = call %Convert.specific_fn.loc38_48(%int_2) [template = constants.%int_2.2] @@ -323,7 +323,7 @@ fn ConvertInit() { // CHECK:STDOUT: %.loc38_48.6: init %i32 = initialize_from %.loc38_48.4 to %.loc38_48.5 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc38_48.7: init %B = class_init (%.loc38_48.3, %.loc38_48.6), %.loc38_57.3 [template = constants.%B.val] // CHECK:STDOUT: %.loc38_57.4: init %B = converted %.loc38_48.1, %.loc38_48.7 [template = constants.%B.val] -// CHECK:STDOUT: %impl.elem0.loc38_57: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc38_57: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc38_57: = bound_method %int_3, %impl.elem0.loc38_57 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc38_57: = specific_function %Convert.bound.loc38_57, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc38_57: init %i32 = call %Convert.specific_fn.loc38_57(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index 99a39a16b2f08..79d9cdbf7affc 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -43,14 +43,14 @@ class Class { // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %i32 [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.j.k: type = struct_type {.j: %i32, .k: %i32} [template] @@ -79,7 +79,7 @@ class Class { // CHECK:STDOUT: %.loc17: %Class.elem = field_decl j, element0 [template] // CHECK:STDOUT: %.loc23: %Class.elem = field_decl k, element1 [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.2] @@ -87,7 +87,7 @@ class Class { // CHECK:STDOUT: %.loc29_25.2: %i32 = converted %int_0, %.loc29_25.1 [template = constants.%int_0.2] // CHECK:STDOUT: %l: %i32 = bind_name l, %.loc29_25.2 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc34: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc34: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc34: = bound_method %int_1, %impl.elem0.loc34 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc34: = specific_function %Convert.bound.loc34, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc34: init %i32 = call %Convert.specific_fn.loc34(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index d10c76c764e82..fd3816a2a237a 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -46,10 +46,10 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.c: type = struct_type {.a: Core.IntLiteral, .c: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] @@ -100,7 +100,7 @@ fn F() { // CHECK:STDOUT: %int_2.loc26: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %.loc26_18.1: %struct_type.a.c = struct_literal (%int_1.loc26, %int_2.loc26) // CHECK:STDOUT: %Class.ref.loc26: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.loc26, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1.loc26) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 5e6b2cc9cf442..568ecb6375cd8 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -45,13 +45,13 @@ fn F() { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2, %int_2.2) [template] @@ -111,7 +111,7 @@ fn F() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc25_33.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc25_33.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc25_33.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc25_33.1: = bound_method %int_1, %impl.elem0.loc25_33.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc25_33.1: = specific_function %Convert.bound.loc25_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc25_33.1: init %i32 = call %Convert.specific_fn.loc25_33.1(%int_1) [template = constants.%int_1.2] @@ -119,7 +119,7 @@ fn F() { // CHECK:STDOUT: %.loc25_33.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc25_33.4: ref %i32 = class_element_access %.loc25_33.3, element0 // CHECK:STDOUT: %.loc25_33.5: init %i32 = initialize_from %.loc25_33.2 to %.loc25_33.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc25_33.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc25_33.2: = bound_method %int_2, %impl.elem0.loc25_33.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc25_33.2: = specific_function %Convert.bound.loc25_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc25_33.2: init %i32 = call %Convert.specific_fn.loc25_33.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index a717e0769bea4..df8bab63657ef 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -33,10 +33,10 @@ fn G() -> i32 { // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -92,7 +92,7 @@ fn G() -> i32 { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index ada7b6c1cc3a7..63797cb415407 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -34,14 +34,14 @@ fn Run() { // CHECK:STDOUT: %Run: %Run.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -86,7 +86,7 @@ fn Run() { // CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc18_4: ref %i32 = class_element_access %c.ref.loc18, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_1, %impl.elem0.loc18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_1) [template = constants.%int_1.2] @@ -96,7 +96,7 @@ fn Run() { // CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc19_4: ref %i32 = class_element_access %c.ref.loc19, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index f999f5cd77e40..f1c2e7436a938 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -35,14 +35,14 @@ fn Test() { // CHECK:STDOUT: %Test: %Test.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -87,7 +87,7 @@ fn Test() { // CHECK:STDOUT: %j.ref.loc18: %Class.elem = name_ref j, @Class.%.loc12 [template = @Class.%.loc12] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %cv.ref.loc18, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_1, %impl.elem0.loc18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_1) [template = constants.%int_1.2] @@ -97,7 +97,7 @@ fn Test() { // CHECK:STDOUT: %k.ref.loc19: %Class.elem = name_ref k, @Class.%.loc13 [template = @Class.%.loc13] // CHECK:STDOUT: %.loc19_5: ref %i32 = class_element_access %cv.ref.loc19, element1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index ee34b89a5c59b..df7d961dc7a78 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -48,22 +48,22 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %A.generic: %A.type = struct_value () [template] // CHECK:STDOUT: %A.1: type = class_type @A, @A(%N.2) [symbolic] // CHECK:STDOUT: %A.elem.1: type = unbound_element_type %A.1, %B [symbolic] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %N.2, %Convert.10 [symbolic] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.3(%int_32) [symbolic] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn.1(%N.2) [symbolic] // CHECK:STDOUT: %iN.builtin.2: type = int_type signed, %int.convert_checked [symbolic] -// CHECK:STDOUT: %require_complete.3: = require_complete_type %iN.builtin.2 [symbolic] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %iN.builtin.2 [symbolic] // CHECK:STDOUT: %A.elem.2: type = unbound_element_type %A.1, %iN.builtin.2 [symbolic] // CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: %iN.builtin.2} [symbolic] // CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.n [symbolic] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.11 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] +// CHECK:STDOUT: %interface.21: = interface_witness (%Convert.12) [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.12 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %A.2: type = class_type @A, @A(%int_0.2) [template] @@ -72,7 +72,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %B [template] // CHECK:STDOUT: %A.elem.3: type = unbound_element_type %A.2, %B [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.9 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.10 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -134,7 +134,7 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %.loc15_13: type = splice_block %ptr [template = constants.%ptr.2] { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.10 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] +// CHECK:STDOUT: %impl.elem0: %Convert.type.11 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.12] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -162,11 +162,11 @@ fn F(a: A(0)*) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A: type = class_type @A, @A(%N.loc6_9.2) [symbolic = %A (constants.%A.1)] // CHECK:STDOUT: %A.elem.loc7: type = unbound_element_type @A.%A (%A.1), %B [symbolic = %A.elem.loc7 (constants.%A.elem.1)] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_9.2, constants.%Convert.9 [symbolic = %Convert.bound (constants.%Convert.bound.1)] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_9.2, constants.%Convert.10 [symbolic = %Convert.bound (constants.%Convert.bound.1)] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn (constants.%Convert.specific_fn.1)] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.loc6_9.2) [symbolic = %int.convert_checked (constants.%int.convert_checked)] // CHECK:STDOUT: %iN.builtin: type = int_type signed, %int.convert_checked [symbolic = %iN.builtin (constants.%iN.builtin.2)] -// CHECK:STDOUT: %require_complete: = require_complete_type @A.%iN.builtin (%iN.builtin.2) [symbolic = %require_complete (constants.%require_complete.3)] +// CHECK:STDOUT: %require_complete: = require_complete_type @A.%iN.builtin (%iN.builtin.2) [symbolic = %require_complete (constants.%require_complete.5)] // CHECK:STDOUT: %A.elem.loc12: type = unbound_element_type @A.%A (%A.1), @A.%iN.builtin (%iN.builtin.2) [symbolic = %A.elem.loc12 (constants.%A.elem.2)] // CHECK:STDOUT: %struct_type.base.n: type = struct_type {.base: %B, .n: @A.%iN.builtin (%iN.builtin.2)} [symbolic = %struct_type.base.n (constants.%struct_type.base.n)] // CHECK:STDOUT: %complete_type.loc13_1.2: = complete_type_witness @A.%struct_type.base.n (%struct_type.base.n) [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.4)] diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 3e773962f29eb..b5820f361d3c1 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -103,10 +103,10 @@ class Class(U:! type) { // CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %CompleteClass.2: type = class_type @CompleteClass, @CompleteClass(%i32) [template] @@ -202,7 +202,7 @@ class Class(U:! type) { // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -249,7 +249,7 @@ class Class(U:! type) { // CHECK:STDOUT: %Class.type: type = generic_class_type @Class [template] // CHECK:STDOUT: %Class.generic: %Class.type = struct_value () [template] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic] -// CHECK:STDOUT: %require_complete.3: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %T [symbolic] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, %T [symbolic] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: %T} [symbolic] // CHECK:STDOUT: %complete_type.3: = complete_type_witness %struct_type.x [symbolic] @@ -269,11 +269,11 @@ class Class(U:! type) { // CHECK:STDOUT: %F.3: %F.type.3 = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.n.2: type = struct_type {.n: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %CompleteClass.val: %CompleteClass.2 = struct_value (%int_1.2) [template] @@ -282,15 +282,15 @@ class Class(U:! type) { // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.2: %CompleteClass.type = import_ref Main//foo, CompleteClass, loaded [template = constants.%CompleteClass.generic] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.233 -// CHECK:STDOUT: .ImplicitAs = %import_ref.234 +// CHECK:STDOUT: .Int = %import_ref.236 +// CHECK:STDOUT: .ImplicitAs = %import_ref.237 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.229: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type.4] -// CHECK:STDOUT: %import_ref.230 = import_ref Main//foo, inst37 [no loc], unloaded -// CHECK:STDOUT: %import_ref.231 = import_ref Main//foo, loc7_8, unloaded -// CHECK:STDOUT: %import_ref.232 = import_ref Main//foo, loc8_17, unloaded +// CHECK:STDOUT: %import_ref.232: = import_ref Main//foo, loc9_1, loaded [template = constants.%complete_type.4] +// CHECK:STDOUT: %import_ref.233 = import_ref Main//foo, inst37 [no loc], unloaded +// CHECK:STDOUT: %import_ref.234 = import_ref Main//foo, loc7_8, unloaded +// CHECK:STDOUT: %import_ref.235 = import_ref Main//foo, loc8_17, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -328,7 +328,7 @@ class Class(U:! type) { // CHECK:STDOUT: %T.patt.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.1 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Class.%T.1 (%T) [symbolic = %require_complete (constants.%require_complete.3)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Class.%T.1 (%T) [symbolic = %require_complete (constants.%require_complete.5)] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.1) [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %Class.elem: type = unbound_element_type @Class.%Class (%Class), @Class.%T.1 (%T) [symbolic = %Class.elem (constants.%Class.elem)] // CHECK:STDOUT: %struct_type.x: type = struct_type {.x: @Class.%T.1 (%T)} [symbolic = %struct_type.x (constants.%struct_type.x)] @@ -357,10 +357,10 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.230 -// CHECK:STDOUT: .n = imports.%import_ref.231 -// CHECK:STDOUT: .F = imports.%import_ref.232 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.229 +// CHECK:STDOUT: .Self = imports.%import_ref.233 +// CHECK:STDOUT: .n = imports.%import_ref.234 +// CHECK:STDOUT: .F = imports.%import_ref.235 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.232 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -374,7 +374,7 @@ class Class(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc9_17.1: %struct_type.n.2 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0: %Convert.type.9 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.10 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 8f4dbb12437f4..4f75e12a58261 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -380,15 +380,15 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %D.val.2: %D = struct_value (%int_3.2, %int_4.2) [template] @@ -459,7 +459,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc24_53.1: %struct_type.a.b.2 = struct_literal (%int_3, %int_4) // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %impl.elem0.loc24_53.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24_53.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24_53.1: = bound_method %int_3, %impl.elem0.loc24_53.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc24_53.1: = specific_function %Convert.bound.loc24_53.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc24_53.1: init %i32 = call %Convert.specific_fn.loc24_53.1(%int_3) [template = constants.%int_3.2] @@ -467,7 +467,7 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %.loc24_53.3: ref %D = temporary_storage // CHECK:STDOUT: %.loc24_53.4: ref %i32 = class_element_access %.loc24_53.3, element0 // CHECK:STDOUT: %.loc24_53.5: init %i32 = initialize_from %.loc24_53.2 to %.loc24_53.4 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc24_53.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24_53.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24_53.2: = bound_method %int_4, %impl.elem0.loc24_53.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc24_53.2: = specific_function %Convert.bound.loc24_53.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc24_53.2: init %i32 = call %Convert.specific_fn.loc24_53.2(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 4c9dc7b152020..ead1f457efec8 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -166,16 +166,16 @@ fn Run() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Field.val: %Field = struct_value (%int_1.2) [template] // CHECK:STDOUT: %Field.elem: type = unbound_element_type %Field, %i32 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %ForwardDeclared.1: type = class_type @ForwardDeclared.1 [template] @@ -204,14 +204,14 @@ fn Run() { // CHECK:STDOUT: %import_ref.10: = import_ref Main//a, loc9_1, loaded [template = constants.%complete_type.3] // CHECK:STDOUT: %import_ref.11 = import_ref Main//a, inst21 [no loc], unloaded // CHECK:STDOUT: %import_ref.12: %Field.elem = import_ref Main//a, loc8_8, loaded [template = %.1] -// CHECK:STDOUT: %import_ref.237: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.238 = import_ref Main//a, inst56 [no loc], unloaded -// CHECK:STDOUT: %import_ref.239: %F.type = import_ref Main//a, loc14_21, loaded [template = constants.%F] -// CHECK:STDOUT: %import_ref.240: %G.type = import_ref Main//a, loc15_27, loaded [template = constants.%G] -// CHECK:STDOUT: %import_ref.241: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.242 = import_ref Main//a, inst56 [no loc], unloaded -// CHECK:STDOUT: %import_ref.243 = import_ref Main//a, loc14_21, unloaded -// CHECK:STDOUT: %import_ref.244 = import_ref Main//a, loc15_27, unloaded +// CHECK:STDOUT: %import_ref.240: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] +// CHECK:STDOUT: %import_ref.241 = import_ref Main//a, inst56 [no loc], unloaded +// CHECK:STDOUT: %import_ref.242: %F.type = import_ref Main//a, loc14_21, loaded [template = constants.%F] +// CHECK:STDOUT: %import_ref.243: %G.type = import_ref Main//a, loc15_27, loaded [template = constants.%G] +// CHECK:STDOUT: %import_ref.244: = import_ref Main//a, loc16_1, loaded [template = constants.%complete_type.1] +// CHECK:STDOUT: %import_ref.245 = import_ref Main//a, inst56 [no loc], unloaded +// CHECK:STDOUT: %import_ref.246 = import_ref Main//a, loc14_21, unloaded +// CHECK:STDOUT: %import_ref.247 = import_ref Main//a, loc15_27, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -243,18 +243,18 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared.1 [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.238 -// CHECK:STDOUT: .F = imports.%import_ref.239 -// CHECK:STDOUT: .G = imports.%import_ref.240 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.237 +// CHECK:STDOUT: .Self = imports.%import_ref.241 +// CHECK:STDOUT: .F = imports.%import_ref.242 +// CHECK:STDOUT: .G = imports.%import_ref.243 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.240 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @ForwardDeclared.2 [from "a.carbon"] { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.242 -// CHECK:STDOUT: .F = imports.%import_ref.243 -// CHECK:STDOUT: .G = imports.%import_ref.244 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.241 +// CHECK:STDOUT: .Self = imports.%import_ref.245 +// CHECK:STDOUT: .F = imports.%import_ref.246 +// CHECK:STDOUT: .G = imports.%import_ref.247 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.244 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Incomplete [from "a.carbon"]; @@ -271,7 +271,7 @@ fn Run() { // CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc9_25.1: %struct_type.x.2 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1, %impl.elem0.loc9 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_1) [template = constants.%int_1.2] @@ -285,7 +285,7 @@ fn Run() { // CHECK:STDOUT: %x.ref: %Field.elem = name_ref x, imports.%import_ref.12 [template = imports.%.1] // CHECK:STDOUT: %.loc10_4: ref %i32 = class_element_access %b.ref, element0 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc10: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc10: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc10: = bound_method %int_2, %impl.elem0.loc10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10: = specific_function %Convert.bound.loc10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Convert.specific_fn.loc10(%int_2) [template = constants.%int_2.2] @@ -298,12 +298,12 @@ fn Run() { // CHECK:STDOUT: %.loc12_30: init %ForwardDeclared.1 = converted %.loc12_29.1, %.loc12_29.2 [template = constants.%ForwardDeclared.val] // CHECK:STDOUT: assign %c.var, %.loc12_30 // CHECK:STDOUT: %c.ref.loc13: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.239 [template = constants.%F] +// CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.242 [template = constants.%F] // CHECK:STDOUT: %F.bound: = bound_method %c.ref.loc13, %F.ref // CHECK:STDOUT: %.loc13: %ForwardDeclared.1 = bind_value %c.ref.loc13 // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.bound(%.loc13) // CHECK:STDOUT: %c.ref.loc14: ref %ForwardDeclared.1 = name_ref c, %c -// CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.240 [template = constants.%G] +// CHECK:STDOUT: %G.ref: %G.type = name_ref G, imports.%import_ref.243 [template = constants.%G] // CHECK:STDOUT: %G.bound: = bound_method %c.ref.loc14, %G.ref // CHECK:STDOUT: %addr.loc14: %ptr.3 = addr_of %c.ref.loc14 // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %G.bound(%addr.loc14) @@ -319,5 +319,5 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F[%self.param_patt: %ForwardDeclared.1]() [from "a.carbon"]; // CHECK:STDOUT: -// CHECK:STDOUT: fn @G[addr .inst990: %ptr.3]() [from "a.carbon"]; +// CHECK:STDOUT: fn @G[addr .inst1031: %ptr.3]() [from "a.carbon"]; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 5c5b923dea1ce..bbc243e00a920 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -139,20 +139,20 @@ fn Run() { // CHECK:STDOUT: %struct_type.x.unused.2: type = struct_type {.x: Core.IntLiteral, .unused: Core.IntLiteral} [template] // CHECK:STDOUT: %struct_type.base.3: type = struct_type {.base: %struct_type.x.unused.2} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Base.val: %Base = struct_value (%int_0.2, %int_1.2) [template] // CHECK:STDOUT: %Child.val: %Child = struct_value (%Base.val) [template] // CHECK:STDOUT: %Base.elem: type = unbound_element_type %Base, %i32 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -217,7 +217,7 @@ fn Run() { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc7_47.1: %struct_type.x.unused.2 = struct_literal (%int_0, %int_1) // CHECK:STDOUT: %.loc7_48.1: %struct_type.base.3 = struct_literal (%.loc7_47.1) -// CHECK:STDOUT: %impl.elem0.loc7_47.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc7_47.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc7_47.1: = bound_method %int_0, %impl.elem0.loc7_47.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc7_47.1: = specific_function %Convert.bound.loc7_47.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc7_47.1: init %i32 = call %Convert.specific_fn.loc7_47.1(%int_0) [template = constants.%int_0.2] @@ -225,7 +225,7 @@ fn Run() { // CHECK:STDOUT: %.loc7_48.2: ref %Base = class_element_access %a.var, element0 // CHECK:STDOUT: %.loc7_47.3: ref %i32 = class_element_access %.loc7_48.2, element0 // CHECK:STDOUT: %.loc7_47.4: init %i32 = initialize_from %.loc7_47.2 to %.loc7_47.3 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc7_47.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc7_47.2: = bound_method %int_1, %impl.elem0.loc7_47.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc7_47.2: = specific_function %Convert.bound.loc7_47.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc7_47.2: init %i32 = call %Convert.specific_fn.loc7_47.2(%int_1) [template = constants.%int_1.2] @@ -243,7 +243,7 @@ fn Run() { // 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: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_2, %impl.elem0.loc8 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 64b38201d71b4..c250be15c149c 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -461,10 +461,10 @@ class B { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %SomeProtectedFunction.type: type = fn_type @SomeProtectedFunction [template] @@ -503,7 +503,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -563,7 +563,7 @@ class B { // CHECK:STDOUT: fn @SomeProtectedFunction() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] @@ -927,10 +927,10 @@ class B { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] @@ -970,7 +970,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @A { // CHECK:STDOUT: %int_5.loc5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_5.loc5) [template = constants.%int_5.2] @@ -978,7 +978,7 @@ class B { // CHECK:STDOUT: %.loc5_49.2: %i32 = converted %int_5.loc5, %.loc5_49.1 [template = constants.%int_5.2] // CHECK:STDOUT: %SOME_PROTECTED_CONSTANT: %i32 = bind_name SOME_PROTECTED_CONSTANT, %.loc5_49.2 // CHECK:STDOUT: %int_5.loc6: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_5.loc6) [template = constants.%int_5.2] @@ -996,7 +996,7 @@ class B { // CHECK:STDOUT: // CHECK:STDOUT: class @Internal { // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_5) [template = constants.%int_5.2] diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index 0ef7565e3dbfa..4297edf1d941d 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -32,13 +32,13 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2, %int_2.2) [template] @@ -90,7 +90,7 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc17_26.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0.loc17_26.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17_26.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17_26.1: = bound_method %int_1, %impl.elem0.loc17_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc17_26.1: = specific_function %Convert.bound.loc17_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc17_26.1: init %i32 = call %Convert.specific_fn.loc17_26.1(%int_1) [template = constants.%int_1.2] @@ -98,7 +98,7 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc17_26.3: ref %Class = temporary_storage // CHECK:STDOUT: %.loc17_26.4: ref %i32 = class_element_access %.loc17_26.3, element0 // CHECK:STDOUT: %.loc17_26.5: init %i32 = initialize_from %.loc17_26.2 to %.loc17_26.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17_26.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17_26.2: = bound_method %int_2, %impl.elem0.loc17_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_26.2: = specific_function %Convert.bound.loc17_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_26.2: init %i32 = call %Convert.specific_fn.loc17_26.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 40164647e8b66..d3ce0695046d8 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -81,10 +81,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.k.2: type = struct_type {.k: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Class.val: %Class = struct_value (%int_1.2) [template] @@ -334,7 +334,7 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc35_18.1: %struct_type.k.2 = struct_literal (%int_1) // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/reorder.carbon b/toolchain/check/testdata/class/reorder.carbon index b9b2976748e98..97fb559730cf5 100644 --- a/toolchain/check/testdata/class/reorder.carbon +++ b/toolchain/check/testdata/class/reorder.carbon @@ -32,10 +32,10 @@ class Class { // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -99,7 +99,7 @@ class Class { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 0bef8c616ceac..8ec6a6afa77dc 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -81,28 +81,28 @@ class A { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %A.val: %A = struct_value (%int_1.2) [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.b.2: type = struct_type {.b: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %B.val: %B = struct_value (%int_2.2) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.c.2: type = struct_type {.c: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_3.2) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.d.2: type = struct_type {.d: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %D.val: %D = struct_value (%int_4.2) [template] @@ -194,7 +194,7 @@ class A { // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc29_25.1: %struct_type.a.2 = struct_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_1, %impl.elem0.loc29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_1) [template = constants.%int_1.2] @@ -208,7 +208,7 @@ class A { // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc30_25.1: %struct_type.b.2 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc30: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc30: = bound_method %int_2, %impl.elem0.loc30 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc30: = specific_function %Convert.bound.loc30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %Convert.specific_fn.loc30(%int_2) [template = constants.%int_2.2] @@ -222,7 +222,7 @@ class A { // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc31_25.1: %struct_type.c.2 = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc31: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc31: = bound_method %int_3, %impl.elem0.loc31 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc31: = specific_function %Convert.bound.loc31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc31: init %i32 = call %Convert.specific_fn.loc31(%int_3) [template = constants.%int_3.2] @@ -236,7 +236,7 @@ class A { // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc32_25.1: %struct_type.d.2 = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc32: = bound_method %int_4, %impl.elem0.loc32 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc32: = specific_function %Convert.bound.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %Convert.specific_fn.loc32(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 1f517cea69c2b..6c44969834e8b 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -41,16 +41,16 @@ fn Run() { // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %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: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Run.type: type = fn_type @Run [template] @@ -118,7 +118,7 @@ fn Run() { // CHECK:STDOUT: fn @F.1() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -139,7 +139,7 @@ fn Run() { // CHECK:STDOUT: fn @F.2() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 894b2340a5fd0..fb386fb8d2684 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -53,10 +53,10 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.base.1 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %Derived [template] @@ -194,7 +194,7 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc12 [template = @Base.%.loc12] // CHECK:STDOUT: %.loc27_10: ref %i32 = class_element_access %.loc27_4, element0 // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 881a146350352..ff673e2aeca7a 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -44,10 +44,10 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_1000.2) [template] @@ -93,7 +93,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc5_20.1: type = splice_block %C.loc5 [template = constants.%C.2] { // CHECK:STDOUT: %C.ref.loc5: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc5: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_1000.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc5: = specific_function %Convert.bound.loc5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc5: init %i32 = call %Convert.specific_fn.loc5(%int_1000.loc5) [template = constants.%int_1000.2] @@ -111,7 +111,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc6_20.1: type = splice_block %C.loc6 [template = constants.%C.2] { // CHECK:STDOUT: %C.ref.loc6: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000.loc6: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_1000.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_1000.loc6) [template = constants.%int_1000.2] @@ -182,10 +182,10 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_1000.1: Core.IntLiteral = int_value 1000 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1000.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1000.2: %i32 = int_value 1000 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_1000.2) [template] @@ -233,7 +233,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc5_19.1: type = splice_block %C [template = constants.%C.2] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1000) [template = constants.%int_1000.2] @@ -251,7 +251,7 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %.loc12_20.1: type = splice_block %C [template = constants.%C.2] { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] // CHECK:STDOUT: %int_1000: Core.IntLiteral = int_value 1000 [template = constants.%int_1000.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1000, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1000) [template = constants.%int_1000.2] diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 2e84dc9a26c1a..ee340d318f0fc 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -508,20 +508,20 @@ class Derived { // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %struct_type.m2.m1.1: type = struct_type {.m2: %i32, .m1: %i32} [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %struct_type.m2.m1.2: type = struct_type {.m2: Core.IntLiteral, .m1: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -567,7 +567,7 @@ class Derived { // CHECK:STDOUT: %i.var: ref %i32 = var i // CHECK:STDOUT: %i: ref %i32 = bind_name i, %i.var // CHECK:STDOUT: %int_3.loc12: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_3.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_3.loc12) [template = constants.%int_3.2] @@ -598,14 +598,14 @@ class Derived { // CHECK:STDOUT: %.loc15_35.2: ref %ptr.1 = class_element_access %b2.var, element0 // CHECK:STDOUT: %.loc15_35.3: ref %ptr.1 = vtable_ptr // CHECK:STDOUT: %.loc15_35.4: init %ptr.1 = initialize_from %.loc15_35.3 to %.loc15_35.2 -// CHECK:STDOUT: %impl.elem0.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_35.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15_35.1: = bound_method %int_5, %impl.elem0.loc15_35.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_35.1: = specific_function %Convert.bound.loc15_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_35.1: init %i32 = call %Convert.specific_fn.loc15_35.1(%int_5) [template = constants.%int_5.2] // CHECK:STDOUT: %.loc15_35.5: init %i32 = converted %int_5, %int.convert_checked.loc15_35.1 [template = constants.%int_5.2] // CHECK:STDOUT: %.loc15_35.6: ref %i32 = class_element_access %b2.var, element2 // CHECK:STDOUT: %.loc15_35.7: init %i32 = initialize_from %.loc15_35.5 to %.loc15_35.6 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc15_35.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_35.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15_35.2: = bound_method %int_3.loc15, %impl.elem0.loc15_35.2 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15_35.2: = specific_function %Convert.bound.loc15_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15_35.2: init %i32 = call %Convert.specific_fn.loc15_35.2(%int_3.loc15) [template = constants.%int_3.2] @@ -619,7 +619,7 @@ class Derived { // CHECK:STDOUT: %m2.ref: %Base.elem = name_ref m2, @Base.%.loc6 [template = @Base.%.loc6] // CHECK:STDOUT: %.loc18_5: ref %i32 = class_element_access %b1.ref, element2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_4, %impl.elem0.loc18 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 1465c11285a34..fa43e2afbd971 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -115,10 +115,10 @@ fn G() -> C { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -205,7 +205,7 @@ fn G() -> C { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -277,10 +277,10 @@ fn G() -> C { // CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.10 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -335,7 +335,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_23: type = splice_block %array_type [template = ] { // 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.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_22.1: = bound_method %N.ref.loc10_22, %impl.elem0 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.1(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] @@ -368,7 +368,7 @@ 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.2)] // CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] -// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.10 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.2(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: @@ -430,10 +430,10 @@ fn G() -> C { // CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 1 [symbolic] // CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 1 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.10 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -491,7 +491,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_33: type = splice_block %array_type [template = ] { // 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.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_32.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc10_32.1: = specific_function %Convert.bound.loc10_32.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_32.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_32.1(%N.ref) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] @@ -526,7 +526,7 @@ 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.2)] // CHECK:STDOUT: %N.patt.loc10_16.2: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc10_16.2 (constants.%N.patt.2)] -// CHECK:STDOUT: %Convert.bound.loc10_32.2: = bound_method %N.loc10_16.2, constants.%Convert.9 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.bound.loc10_32.2: = bound_method %N.loc10_16.2, constants.%Convert.10 [symbolic = %Convert.bound.loc10_32.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc10_32.2: = specific_function %Convert.bound.loc10_32.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_32.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_32.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_32.2(%N.loc10_16.2) [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] // CHECK:STDOUT: @@ -589,10 +589,10 @@ fn G() -> C { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] @@ -680,7 +680,7 @@ fn G() -> C { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -753,10 +753,10 @@ fn G() -> C { // CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.10 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -813,7 +813,7 @@ fn G() -> C { // CHECK:STDOUT: %.loc10_23: type = splice_block %array_type [template = ] { // 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.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc10_22.1: = bound_method %N.ref.loc10_22, %impl.elem0 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc10_22.1: = specific_function %Convert.bound.loc10_22.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.1: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.1(%N.ref.loc10_22) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] @@ -854,7 +854,7 @@ 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.2)] // CHECK:STDOUT: %N.patt.loc10_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_6.2 (constants.%N.patt.2)] -// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.bound.loc10_22.2: = bound_method %N.loc10_6.2, constants.%Convert.10 [symbolic = %Convert.bound.loc10_22.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc10_22.2: = specific_function %Convert.bound.loc10_22.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc10_22.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc10_22.2: init Core.IntLiteral = call %Convert.specific_fn.loc10_22.2(%N.loc10_6.2) [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 450517531a512..c3471583de317 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -750,10 +750,10 @@ fn G() -> i32 { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %WithNontype.2: type = class_type @WithNontype, @WithNontype(%int_0.2) [template] @@ -862,7 +862,7 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 3a6772554d808..dc8c80f4bb8b1 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -246,13 +246,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple.2: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -346,13 +346,13 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc8_22.1: %tuple.type.3 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc8_22.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc8_22.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc8_22.1: = bound_method %int_1, %impl.elem0.loc8_22.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc8_22.1: = specific_function %Convert.bound.loc8_22.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc8_22.1: init %i32 = call %Convert.specific_fn.loc8_22.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_22.2: %i32 = value_of_initializer %int.convert_checked.loc8_22.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc8_22.3: %i32 = converted %int_1, %.loc8_22.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc8_22.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc8_22.2: = bound_method %int_2, %impl.elem0.loc8_22.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc8_22.2: = specific_function %Convert.bound.loc8_22.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc8_22.2: init %i32 = call %Convert.specific_fn.loc8_22.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index 70a434c411803..119665b263675 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -27,13 +27,13 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -41,7 +41,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [template] // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %struct.1: %struct_type.b.a.c = struct_value (%int_2.2, %int_1.2, %int_3.2) [template] @@ -54,7 +54,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_9: 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 (%int_5, %int_7, %int_1.1, %int_9) [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.2) [template] @@ -101,13 +101,13 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %i32.loc11_46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.1 = tuple_literal (%i32.loc11_41, %i32.loc11_46) // CHECK:STDOUT: %.loc11_49.2: type = converted %.loc11_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %impl.elem0.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_35.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_35.1: = bound_method %int_1.loc11, %impl.elem0.loc11_35.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_35.1: = specific_function %Convert.bound.loc11_35.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_35.1: init %i32 = call %Convert.specific_fn.loc11_35.1(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_35.2: %i32 = value_of_initializer %int.convert_checked.loc11_35.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_35.3: %i32 = converted %int_1.loc11, %.loc11_35.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_35.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_35.2: = bound_method %int_2.loc11, %impl.elem0.loc11_35.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_35.2: = specific_function %Convert.bound.loc11_35.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_35.2: init %i32 = call %Convert.specific_fn.loc11_35.2(%int_2.loc11) [template = constants.%int_2.2] @@ -135,19 +135,19 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %int_32.loc13_99: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_99: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [template = constants.%struct_type.b.a.c] -// CHECK:STDOUT: %impl.elem0.loc13_71.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_71.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_71.1: = bound_method %int_2.loc13, %impl.elem0.loc13_71.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_71.1: = specific_function %Convert.bound.loc13_71.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_71.1: init %i32 = call %Convert.specific_fn.loc13_71.1(%int_2.loc13) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_71.2: %i32 = value_of_initializer %int.convert_checked.loc13_71.1 [template = constants.%int_2.2] // CHECK:STDOUT: %.loc13_71.3: %i32 = converted %int_2.loc13, %.loc13_71.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_71.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_71.2: = bound_method %int_1.loc13, %impl.elem0.loc13_71.2 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_71.2: = specific_function %Convert.bound.loc13_71.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_71.2: init %i32 = call %Convert.specific_fn.loc13_71.2(%int_1.loc13) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_71.4: %i32 = value_of_initializer %int.convert_checked.loc13_71.2 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc13_71.5: %i32 = converted %int_1.loc13, %.loc13_71.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_71.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_71.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_71.3: = bound_method %int_3.loc13, %impl.elem0.loc13_71.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_71.3: = specific_function %Convert.bound.loc13_71.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_71.3: init %i32 = call %Convert.specific_fn.loc13_71.3(%int_3.loc13) [template = constants.%int_3.2] @@ -181,7 +181,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc15_54.2: %tuple.type.5 = converted %.loc15_54.1, %tuple.loc15 [template = constants.%tuple.2] // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc15_54.2, element2 [template = constants.%int_1.1] // CHECK:STDOUT: %array_type.loc15: type = array_type %tuple.elem2, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_0.loc15_30, %impl.elem0.loc15 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_0.loc15_30) [template = constants.%int_0.2] @@ -204,7 +204,7 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: %.loc17_60.2: %struct_type.a.b = converted %.loc17_60.1, %struct.loc17 [template = constants.%struct.3] // CHECK:STDOUT: %.loc17_61: Core.IntLiteral = struct_access %.loc17_60.2, element1 [template = constants.%int_1.1] // CHECK:STDOUT: %array_type.loc17: type = array_type %.loc17_61, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_0.loc17_32, %impl.elem0.loc17 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17_32) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 7e338948cb126..25d17d1c1cf74 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -31,25 +31,25 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %array_type.2: type = array_type %int_4, %i32 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_7.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_7.2: %i32 = int_value 7 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_9.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_9.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %array: %array_type.2 = tuple_value (%int_5.2, %int_7.2, %int_1.2, %int_9.2) [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -88,7 +88,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %i32.loc16_61: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: %array_type: type = array_type %int_4, %i32 [template = constants.%array_type.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_55.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_55.1: = bound_method %int_5, %impl.elem0.loc16_55.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.1: = specific_function %Convert.bound.loc16_55.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc16_55.1: init %i32 = call %Convert.specific_fn.loc16_55.1(%int_5) [template = constants.%int_5.2] @@ -97,7 +97,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_0.loc16_55: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc16_55.4: ref %i32 = array_index %.loc16_55.3, %int_0.loc16_55 // CHECK:STDOUT: %.loc16_55.5: init %i32 = initialize_from %.loc16_55.2 to %.loc16_55.4 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_55.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_55.2: = bound_method %int_7, %impl.elem0.loc16_55.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.2: = specific_function %Convert.bound.loc16_55.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16_55.2: init %i32 = call %Convert.specific_fn.loc16_55.2(%int_7) [template = constants.%int_7.2] @@ -105,7 +105,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_1.loc16_55: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc16_55.7: ref %i32 = array_index %.loc16_55.3, %int_1.loc16_55 // CHECK:STDOUT: %.loc16_55.8: init %i32 = initialize_from %.loc16_55.6 to %.loc16_55.7 [template = constants.%int_7.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_55.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_55.3: = bound_method %int_1.loc16_51, %impl.elem0.loc16_55.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.3: = specific_function %Convert.bound.loc16_55.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc16_55.3: init %i32 = call %Convert.specific_fn.loc16_55.3(%int_1.loc16_51) [template = constants.%int_1.2] @@ -113,7 +113,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %int_2.loc16_55: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc16_55.10: ref %i32 = array_index %.loc16_55.3, %int_2.loc16_55 // CHECK:STDOUT: %.loc16_55.11: init %i32 = initialize_from %.loc16_55.9 to %.loc16_55.10 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc16_55.4: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_55.4: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_55.4: = bound_method %int_9, %impl.elem0.loc16_55.4 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc16_55.4: = specific_function %Convert.bound.loc16_55.4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc16_55.4: init %i32 = call %Convert.specific_fn.loc16_55.4(%int_9) [template = constants.%int_9.2] @@ -127,7 +127,7 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: %.loc16_57.2: ref %array_type.2 = temporary %.loc16_55.3, %.loc16_57.1 // CHECK:STDOUT: %int_32.loc16_71: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc16_71: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc16_70: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16_70: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16_70: = bound_method %int_2.loc16_70, %impl.elem0.loc16_70 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc16_70: = specific_function %Convert.bound.loc16_70, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc16_70: init %i32 = call %Convert.specific_fn.loc16_70(%int_2.loc16_70) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 651a420ab0b00..22a57033d6e69 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -25,9 +25,9 @@ fn G(N:! i32) { // CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.10 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: } @@ -65,7 +65,7 @@ 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.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc12_6.2, constants.%Convert.9 [symbolic = %Convert.bound (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc12_6.2, constants.%Convert.10 [symbolic = %Convert.bound (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.loc12_6.2) [symbolic = %int.convert_checked (constants.%int.convert_checked)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 837849b12aade..88419370b914b 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -42,7 +42,7 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .As = %import_ref.5 -// CHECK:STDOUT: .ImplicitAs = %import_ref.229 +// CHECK:STDOUT: .ImplicitAs = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index 875c108d45cd1..880c9deeb21f9 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -27,10 +27,10 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -83,7 +83,7 @@ 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index 6d9db96b7fff7..23e8732a1d143 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -30,16 +30,16 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: } @@ -93,7 +93,7 @@ fn Main() { // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_22.1: %tuple.type.3 = tuple_literal (%int_1) -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1, %impl.elem0.loc14 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1) [template = constants.%int_1.2] @@ -107,7 +107,7 @@ fn Main() { // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %x.ref, element0 // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc16_8: %i32 = bind_value %tuple.elem0 -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_6, %impl.elem0.loc16 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 06ff140bb7962..643deeafd689c 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -26,10 +26,10 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -73,7 +73,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 52f00c4fa41b7..f7e67d8d40192 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -27,10 +27,10 @@ fn Main() { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -74,7 +74,7 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1.loc14) [template = constants.%int_1.2] @@ -83,7 +83,7 @@ fn Main() { // CHECK:STDOUT: %Foo.call.loc14: init %empty_tuple.type = call %Foo.ref.loc14(%.loc14_7.2) // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 8d60586684cdf..5d7f25a4f151c 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -27,13 +27,13 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -86,13 +86,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_7: = bound_method %int_1, %impl.elem0.loc14_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_7: = specific_function %Convert.bound.loc14_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %Convert.specific_fn.loc14_7(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1, %.loc14_7.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_10: = bound_method %int_2, %impl.elem0.loc14_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_10: = specific_function %Convert.bound.loc14_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %Convert.specific_fn.loc14_10(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 7e5416fda5116..aed4bcfe1b4a8 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -28,13 +28,13 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -87,13 +87,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_7: = bound_method %int_1.loc14, %impl.elem0.loc14_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_7: = specific_function %Convert.bound.loc14_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_7: init %i32 = call %Convert.specific_fn.loc14_7(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.1: %i32 = value_of_initializer %int.convert_checked.loc14_7 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_7.2: %i32 = converted %int_1.loc14, %.loc14_7.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_10: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_10: = bound_method %int_2.loc14, %impl.elem0.loc14_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_10: = specific_function %Convert.bound.loc14_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_10: init %i32 = call %Convert.specific_fn.loc14_10(%int_2.loc14) [template = constants.%int_2.2] @@ -103,13 +103,13 @@ fn Main() { // CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc15_7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15_7: = bound_method %int_1.loc15, %impl.elem0.loc15_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc15_7: = specific_function %Convert.bound.loc15_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc15_7: init %i32 = call %Convert.specific_fn.loc15_7(%int_1.loc15) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_7.1: %i32 = value_of_initializer %int.convert_checked.loc15_7 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_7.2: %i32 = converted %int_1.loc15, %.loc15_7.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc15_10: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_10: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15_10: = bound_method %int_2.loc15, %impl.elem0.loc15_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15_10: = specific_function %Convert.bound.loc15_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15_10: init %i32 = call %Convert.specific_fn.loc15_10(%int_2.loc15) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon index d6d0457d52af7..adfad81f3f86f 100644 --- a/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon +++ b/toolchain/check/testdata/function/call/prefer_unqualified_lookup.carbon @@ -43,10 +43,10 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %F.specific_fn: = specific_function %F.2, @F(%F.1) [symbolic] @@ -147,7 +147,7 @@ fn Class(F:! type).Inner.G() -> i32 { return F(); } // CHECK:STDOUT: fn() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index d275a48cb7d61..39c5b15316c37 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -453,10 +453,10 @@ import library "extern_api"; // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -534,7 +534,7 @@ 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: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc7: = bound_method %int_1.loc7, %impl.elem0.loc7 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc7: = specific_function %Convert.bound.loc7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %Convert.specific_fn.loc7(%int_1.loc7) [template = constants.%int_1.2] @@ -545,7 +545,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%int_1.loc8) -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] @@ -586,10 +586,10 @@ import library "extern_api"; // CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -684,7 +684,7 @@ 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: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] @@ -695,7 +695,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.3 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc54: = bound_method %int_1.loc54, %impl.elem0.loc54 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc54: = specific_function %Convert.bound.loc54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %Convert.specific_fn.loc54(%int_1.loc54) [template = constants.%int_1.2] @@ -736,10 +736,10 @@ import library "extern_api"; // CHECK:STDOUT: %E: %E.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -834,7 +834,7 @@ 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: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_1.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_1.loc13) [template = constants.%int_1.2] @@ -845,7 +845,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_25.1: %tuple.type.3 = tuple_literal (%int_1.loc14) -// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14: = bound_method %int_1.loc14, %impl.elem0.loc14 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc14: = specific_function %Convert.bound.loc14, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %Convert.specific_fn.loc14(%int_1.loc14) [template = constants.%int_1.2] @@ -877,10 +877,10 @@ import library "extern_api"; // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -958,7 +958,7 @@ 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: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] @@ -969,7 +969,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc54: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc54_25.1: %tuple.type.2 = tuple_literal (%int_1.loc54) -// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc54: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc54: = bound_method %int_1.loc54, %impl.elem0.loc54 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc54: = specific_function %Convert.bound.loc54, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc54: init %i32 = call %Convert.specific_fn.loc54(%int_1.loc54) [template = constants.%int_1.2] @@ -1001,10 +1001,10 @@ import library "extern_api"; // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -1082,7 +1082,7 @@ 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: %int_1.loc52: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc52: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc52: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc52: = bound_method %int_1.loc52, %impl.elem0.loc52 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc52: = specific_function %Convert.bound.loc52, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc52: init %i32 = call %Convert.specific_fn.loc52(%int_1.loc52) [template = constants.%int_1.2] @@ -1093,7 +1093,7 @@ import library "extern_api"; // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc53: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc53_25.1: %tuple.type.2 = tuple_literal (%int_1.loc53) -// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc53: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc53: = bound_method %int_1.loc53, %impl.elem0.loc53 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc53: = specific_function %Convert.bound.loc53, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc53: init %i32 = call %Convert.specific_fn.loc53(%int_1.loc53) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index c2b1054fb71bb..bcc74f628abe3 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -247,10 +247,10 @@ fn D() {} // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template] @@ -308,7 +308,7 @@ 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: %int_1.loc7: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc7: = bound_method %int_1.loc7, %impl.elem0.loc7 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc7: = specific_function %Convert.bound.loc7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc7: init %i32 = call %Convert.specific_fn.loc7(%int_1.loc7) [template = constants.%int_1.2] @@ -319,7 +319,7 @@ fn D() {} // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc8_25.1: %tuple.type.2 = tuple_literal (%int_1.loc8) -// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc8: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc8: = bound_method %int_1.loc8, %impl.elem0.loc8 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc8: = specific_function %Convert.bound.loc8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %Convert.specific_fn.loc8(%int_1.loc8) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 835b05a327f25..f83f4058cc502 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -785,10 +785,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %tuple.type.4: type = tuple_type (Core.IntLiteral, %i32) [template] // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam, @TupleParam(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple: %tuple.type.4 = tuple_value (%int_1, %int_2.2) [template] @@ -853,7 +853,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc7_19.1: %tuple.type.3 = tuple_literal (%int_1, %int_2) // CHECK:STDOUT: %TupleParam.specific_fn: = specific_function %TupleParam.ref, @TupleParam(Core.IntLiteral) [template = constants.%TupleParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] @@ -900,10 +900,10 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %struct_type.a.b.3: type = struct_type {.a: Core.IntLiteral, .b: %i32} [template] // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam, @StructParam(Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.3 = struct_value (%int_1, %int_2.2) [template] @@ -967,7 +967,7 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc7_30.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %StructParam.specific_fn: = specific_function %StructParam.ref, @StructParam(Core.IntLiteral) [template = constants.%StructParam.specific_fn] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] 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 bc7f9411918ce..9f70343cf6ade 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 @@ -21,10 +21,10 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %N.2: %i32 = bind_symbolic_name N, 0 [symbolic] // CHECK:STDOUT: %N.patt.2: %i32 = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.9: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.9: %Convert.type.9 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.9) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [symbolic] +// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.10) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.10 [symbolic] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.3(%int_32) [symbolic] // CHECK:STDOUT: %int.convert_checked: init Core.IntLiteral = call %Convert.specific_fn(%N.2) [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -63,7 +63,7 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %int_32.loc14_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc14_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc14_6.1 [symbolic = %N.loc14_6.2 (constants.%N.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.9] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc14_24.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc14_24.1: = specific_function %Convert.bound.loc14_24.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc14_24.1: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.1(%N.ref) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] @@ -79,7 +79,7 @@ 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.2)] // CHECK:STDOUT: %N.patt.loc14_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc14_6.2 (constants.%N.patt.2)] -// CHECK:STDOUT: %Convert.bound.loc14_24.2: = bound_method %N.loc14_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] +// CHECK:STDOUT: %Convert.bound.loc14_24.2: = bound_method %N.loc14_6.2, constants.%Convert.10 [symbolic = %Convert.bound.loc14_24.2 (constants.%Convert.bound)] // CHECK:STDOUT: %Convert.specific_fn.loc14_24.2: = specific_function %Convert.bound.loc14_24.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc14_24.2 (constants.%Convert.specific_fn)] // CHECK:STDOUT: %int.convert_checked.loc14_24.2: init Core.IntLiteral = call %Convert.specific_fn.loc14_24.2(%N.loc14_6.2) [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 1f767fe2abaf4..15e32480c912f 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -66,10 +66,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [template] @@ -139,7 +139,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -180,14 +180,14 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %complete_type.2: = complete_type_witness %i32.builtin [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Defined.specific_fn: = specific_function %Defined, @Defined(%i32) [template] -// CHECK:STDOUT: %require_complete.3: = require_complete_type %T [symbolic] +// CHECK:STDOUT: %require_complete.5: = require_complete_type %T [symbolic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -256,7 +256,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %T.patt.loc4: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc4 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %require_complete: = require_complete_type @Defined.%T.loc4_12.2 (%T) [symbolic = %require_complete (constants.%require_complete.3)] +// CHECK:STDOUT: %require_complete: = require_complete_type @Defined.%T.loc4_12.2 (%T) [symbolic = %require_complete (constants.%require_complete.5)] // CHECK:STDOUT: // CHECK:STDOUT: fn[%T.param_patt: type](%x.param_patt: %T) -> %T { // CHECK:STDOUT: !entry: @@ -271,7 +271,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc7: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -310,10 +310,10 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %CallUndefined: %CallUndefined.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.5, @impl.3(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Undefined.specific_fn: = specific_function %Undefined, @Undefined(%i32) [template] @@ -376,7 +376,7 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index b5746a1114b98..d81af3ba5c3a8 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -16,10 +16,10 @@ var a: i32 = 0; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -46,7 +46,7 @@ var a: i32 = 0; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index 46ee685e4a70a..0061a2f65950c 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -23,10 +23,10 @@ var a: i32 = test_a(); // CHECK:STDOUT: %test_a: %test_a.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -63,7 +63,7 @@ var a: i32 = test_a(); // CHECK:STDOUT: fn @test_a() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index 3626ea1436035..f33a8b2e8351d 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -50,16 +50,16 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %If1: %If1.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %If2.type: type = fn_type @If2 [template] // CHECK:STDOUT: %If2: %If2.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %If3.type: type = fn_type @If3 [template] @@ -147,7 +147,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -171,7 +171,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] @@ -189,7 +189,7 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index d7e75f91ce375..2af3bc36d4130 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -30,10 +30,10 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %VarScope: %VarScope.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -83,7 +83,7 @@ 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: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index 50bfbc4f745c7..5286fe1110405 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -28,14 +28,14 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %If: %If.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -83,7 +83,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_1, %impl.elem0.loc13 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_1) [template = constants.%int_1.2] @@ -93,7 +93,7 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_2, %impl.elem0.loc15 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index 9d1025d371488..0a136f676fd91 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -27,10 +27,10 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.2) [template] @@ -94,7 +94,7 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %x: ref %array_type = bind_name x, %x.var // CHECK:STDOUT: %int_0.loc12_22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_24.1: %tuple.type = tuple_literal (%int_0.loc12_22) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.loc12_22, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0.loc12_22) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 35f6efb91d91b..cddc0e16ab1ac 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -40,16 +40,16 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -148,7 +148,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -160,7 +160,7 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] @@ -222,7 +222,7 @@ 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -245,7 +245,7 @@ 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 704a40a6f9f22..0542b160b55f5 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -24,16 +24,16 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] // CHECK:STDOUT: %B: %B.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -46,7 +46,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Bool = %import_ref.229 +// CHECK:STDOUT: .Bool = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -101,7 +101,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -113,7 +113,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @B() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] 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 6d2dcd0d36892..a848f105d86e3 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -67,7 +67,7 @@ class C { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Float = %import_ref.229 +// CHECK:STDOUT: .Float = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index 94d51d7d02f0b..cc2b158165b96 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -23,22 +23,22 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -110,7 +110,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc12_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12_25: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_25: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_25: = bound_method %int_1, %impl.elem0.loc12_25 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_25: = specific_function %Convert.bound.loc12_25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_25: init %i32 = call %Convert.specific_fn.loc12_25(%int_1) [template = constants.%int_1.2] @@ -120,7 +120,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_20: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_32: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_32: = bound_method %int_2, %impl.elem0.loc12_32 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_32: = specific_function %Convert.bound.loc12_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %Convert.specific_fn.loc12_32(%int_2) [template = constants.%int_2.2] @@ -140,7 +140,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %int_32.loc12_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc12_49: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_49: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_49: = bound_method %int_3, %impl.elem0.loc12_49 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_49: = specific_function %Convert.bound.loc12_49, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_49: init %i32 = call %Convert.specific_fn.loc12_49(%int_3) [template = constants.%int_3.2] @@ -150,7 +150,7 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc12_44: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc12_56: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_56: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_56: = bound_method %int_4, %impl.elem0.loc12_56 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc12_56: = specific_function %Convert.bound.loc12_56, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc12_56: init %i32 = call %Convert.specific_fn.loc12_56(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index a0a4364b89a5d..2eb09549b1b64 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -32,13 +32,13 @@ fn F(cond: bool) { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] @@ -98,14 +98,14 @@ fn F(cond: bool) { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc14_46.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc14_46.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_46.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_46.1: = bound_method %int_1, %impl.elem0.loc14_46.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_46.1: = specific_function %Convert.bound.loc14_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_46.1: init %i32 = call %Convert.specific_fn.loc14_46.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_46.2: init %i32 = converted %int_1, %int.convert_checked.loc14_46.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_46.3: ref %i32 = struct_access %a.var, element0 // CHECK:STDOUT: %.loc14_46.4: init %i32 = initialize_from %.loc14_46.2 to %.loc14_46.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_46.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_46.2: = bound_method %int_2, %impl.elem0.loc14_46.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_46.2: = specific_function %Convert.bound.loc14_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_46.2: init %i32 = call %Convert.specific_fn.loc14_46.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index 4a3303e736552..9dc68cef1dfd1 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -81,10 +81,10 @@ class X(U:! type) { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.x.2: type = struct_type {.x: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.21: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %Param.val: %Param = struct_value (%int_2.2) [template] @@ -211,7 +211,7 @@ class X(U:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc15_21.1: %struct_type.x.2 = struct_literal (%int_2) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index 96f952a471d1b..9a749b6f11c45 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -25,21 +25,21 @@ var d: i32 = a[b]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_24.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_24.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_24.2: %i32 = int_value 24 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2, %int_24.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -77,7 +77,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_24: Core.IntLiteral = int_value 24 [template = constants.%int_24.1] // CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%int_12, %int_24) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_12, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_12) [template = constants.%int_12.2] @@ -85,7 +85,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc11: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc11_26.3: ref %i32 = array_index file.%a.var, %int_0.loc11 // CHECK:STDOUT: %.loc11_26.4: init %i32 = initialize_from %.loc11_26.2 to %.loc11_26.3 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_24, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_24) [template = constants.%int_24.2] @@ -97,7 +97,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %.loc11_27: init %array_type = converted %.loc11_26.1, %.loc11_26.8 [template = constants.%array] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1.loc12, %impl.elem0.loc12 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_1.loc12) [template = constants.%int_1.2] @@ -107,7 +107,7 @@ var d: i32 = a[b]; // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index dabeb14730914..0e9576b4ee07c 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -44,25 +44,25 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %ValueBinding.type: type = fn_type @ValueBinding [template] @@ -135,7 +135,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_2.loc14_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc14: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc14_29.1: %tuple.type = tuple_literal (%int_1.loc14_22, %int_2.loc14_25, %int_3.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_29.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_29.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_29.1: = bound_method %int_1.loc14_22, %impl.elem0.loc14_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_29.1: = specific_function %Convert.bound.loc14_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_29.1: init %i32 = call %Convert.specific_fn.loc14_29.1(%int_1.loc14_22) [template = constants.%int_1.2] @@ -143,7 +143,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc14: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc14_29.3: ref %i32 = array_index %a.var, %int_0.loc14 // CHECK:STDOUT: %.loc14_29.4: init %i32 = initialize_from %.loc14_29.2 to %.loc14_29.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_29.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_29.2: = bound_method %int_2.loc14_25, %impl.elem0.loc14_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_29.2: = specific_function %Convert.bound.loc14_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_29.2: init %i32 = call %Convert.specific_fn.loc14_29.2(%int_2.loc14_25) [template = constants.%int_2.2] @@ -151,7 +151,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_1.loc14_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc14_29.6: ref %i32 = array_index %a.var, %int_1.loc14_29 // CHECK:STDOUT: %.loc14_29.7: init %i32 = initialize_from %.loc14_29.5 to %.loc14_29.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc14_29.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_29.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_29.3: = bound_method %int_3.loc14, %impl.elem0.loc14_29.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc14_29.3: = specific_function %Convert.bound.loc14_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc14_29.3: init %i32 = call %Convert.specific_fn.loc14_29.3(%int_3.loc14) [template = constants.%int_3.2] @@ -168,7 +168,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_0.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_0.loc17) [template = constants.%int_0.2] @@ -181,7 +181,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc18_5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_5: = bound_method %int_0.loc18, %impl.elem0.loc18_5 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc18_5: = specific_function %Convert.bound.loc18_5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc18_5: init %i32 = call %Convert.specific_fn.loc18_5(%int_0.loc18) [template = constants.%int_0.2] @@ -189,7 +189,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc18_5.2: %i32 = converted %int_0.loc18, %.loc18_5.1 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc18_6: ref %i32 = array_index %a.ref.loc18, %.loc18_5.2 // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc18_8: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_8: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_8: = bound_method %int_4, %impl.elem0.loc18_8 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc18_8: = specific_function %Convert.bound.loc18_8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc18_8: init %i32 = call %Convert.specific_fn.loc18_8(%int_4) [template = constants.%int_4.2] @@ -206,7 +206,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_2.loc22_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3.loc22: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc22_29.1: %tuple.type = tuple_literal (%int_1.loc22_22, %int_2.loc22_25, %int_3.loc22) -// CHECK:STDOUT: %impl.elem0.loc22_29.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc22_29.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc22_29.1: = bound_method %int_1.loc22_22, %impl.elem0.loc22_29.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc22_29.1: = specific_function %Convert.bound.loc22_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc22_29.1: init %i32 = call %Convert.specific_fn.loc22_29.1(%int_1.loc22_22) [template = constants.%int_1.2] @@ -214,7 +214,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc22_29.3: ref %i32 = array_index %a.var, %int_0.loc22 // CHECK:STDOUT: %.loc22_29.4: init %i32 = initialize_from %.loc22_29.2 to %.loc22_29.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc22_29.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc22_29.2: = bound_method %int_2.loc22_25, %impl.elem0.loc22_29.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc22_29.2: = specific_function %Convert.bound.loc22_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc22_29.2: init %i32 = call %Convert.specific_fn.loc22_29.2(%int_2.loc22_25) [template = constants.%int_2.2] @@ -222,7 +222,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_1.loc22_29: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc22_29.6: ref %i32 = array_index %a.var, %int_1.loc22_29 // CHECK:STDOUT: %.loc22_29.7: init %i32 = initialize_from %.loc22_29.5 to %.loc22_29.6 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc22_29.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc22_29.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc22_29.3: = bound_method %int_3.loc22, %impl.elem0.loc22_29.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc22_29.3: = specific_function %Convert.bound.loc22_29.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc22_29.3: init %i32 = call %Convert.specific_fn.loc22_29.3(%int_3.loc22) [template = constants.%int_3.2] @@ -237,7 +237,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc26: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_0.loc26, %impl.elem0.loc26 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_0.loc26) [template = constants.%int_0.2] @@ -248,7 +248,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_0.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_0.loc27) [template = constants.%int_0.2] @@ -264,7 +264,7 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc28_5.2: ref %array_type = temporary %.loc28_5.1, %F.call // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc28: = bound_method %int_0.loc28, %impl.elem0.loc28 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc28: = specific_function %Convert.bound.loc28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %Convert.specific_fn.loc28(%int_0.loc28) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 206024057f0fc..8d8e8ac682891 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -32,18 +32,18 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2147483647.1: Core.IntLiteral = int_value 2147483647 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2147483647.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: } @@ -77,7 +77,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_12, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_12) [template = constants.%int_12.2] @@ -92,7 +92,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_1, %impl.elem0.loc17 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_1) [template = constants.%int_1.2] @@ -105,7 +105,7 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [template = constants.%int_2147483647.1] // CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc22: = bound_method %int_2147483647, %impl.elem0.loc22 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc22: = specific_function %Convert.bound.loc22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %Convert.specific_fn.loc22(%int_2147483647) [template = constants.%int_2147483647.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 61c08a7077c25..abd3e164509c7 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -28,10 +28,10 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] @@ -64,7 +64,7 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_12) [template = constants.%int_12.2] 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 87556322401a1..bd7c7a6639e89 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 @@ -25,14 +25,14 @@ var b: i32 = a[1]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_12.2) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -63,7 +63,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_23.1: %tuple.type = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_12, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_12) [template = constants.%int_12.2] @@ -78,7 +78,7 @@ var b: i32 = a[1]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1, %impl.elem0.loc15 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 711664ad1cce0..0c61c6701d7e2 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -50,14 +50,14 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: } @@ -114,7 +114,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc19: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_0.loc19, %impl.elem0.loc19 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_0.loc19) [template = constants.%int_0.2] @@ -129,7 +129,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %int_0.loc24: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc24_5: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24_5: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24_5: = bound_method %int_0.loc24, %impl.elem0.loc24_5 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc24_5: = specific_function %Convert.bound.loc24_5, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc24_5: init %i32 = call %Convert.specific_fn.loc24_5(%int_0.loc24) [template = constants.%int_0.2] @@ -139,7 +139,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc24_6.2: ref %i32 = array_index %.loc24_6.1, %.loc24_5.2 // CHECK:STDOUT: %.loc24_6.3: %i32 = bind_value %.loc24_6.2 // CHECK:STDOUT: %int_4.loc24: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc24_8: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24_8: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24_8: = bound_method %int_4.loc24, %impl.elem0.loc24_8 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc24_8: = specific_function %Convert.bound.loc24_8, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %Convert.specific_fn.loc24_8(%int_4.loc24) [template = constants.%int_4.2] @@ -154,7 +154,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc32_21.2: ref %array_type = temporary %.loc32_21.1, %F.call.loc32 // CHECK:STDOUT: %int_32.loc32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc32: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc32: = bound_method %int_0.loc32, %impl.elem0.loc32 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc32: = specific_function %Convert.bound.loc32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %Convert.specific_fn.loc32(%int_0.loc32) [template = constants.%int_0.2] @@ -171,7 +171,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc36_5.2: ref %array_type = temporary %.loc36_5.1, %F.call.loc36 // CHECK:STDOUT: %int_32.loc36: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc36_7: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc36_7: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc36_7: = bound_method %int_0.loc36, %impl.elem0.loc36_7 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc36_7: = specific_function %Convert.bound.loc36_7, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %Convert.specific_fn.loc36_7(%int_0.loc36) [template = constants.%int_0.2] @@ -180,7 +180,7 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %.loc36_8.1: ref %i32 = array_index %.loc36_5.2, %.loc36_7.2 // CHECK:STDOUT: %.loc36_8.2: %i32 = bind_value %.loc36_8.1 // CHECK:STDOUT: %int_4.loc36: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc36_10: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc36_10: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc36_10: = bound_method %int_4.loc36, %impl.elem0.loc36_10 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc36_10: = specific_function %Convert.bound.loc36_10, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc36_10: init %i32 = call %Convert.specific_fn.loc36_10(%int_4.loc36) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index b6dcd848bb138..02856b935e83f 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -26,10 +26,10 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_42.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_42.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -38,10 +38,10 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %Op.type.13: type = fn_type @Op.13 [template] // CHECK:STDOUT: %Op.type.14: type = fn_type @Op.14 [template] // CHECK:STDOUT: %Op.14: %Op.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.20: = interface_witness (%Op.14) [template] +// CHECK:STDOUT: %interface.21: = interface_witness (%Op.14) [template] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.14 [template] // CHECK:STDOUT: %int_-10.1: Core.IntLiteral = int_value -10 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-10.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_-10.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_-10.2: %i32 = int_value -10 [template] // CHECK:STDOUT: } @@ -50,7 +50,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Negate = %import_ref.229 +// CHECK:STDOUT: .Negate = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -74,7 +74,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_42.loc11_20: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] // CHECK:STDOUT: %int_42.loc11_24: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] // CHECK:STDOUT: %.loc11_26.1: %tuple.type = tuple_literal (%int_42.loc11_20, %int_42.loc11_24) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_42.loc11_20, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_42.loc11_20) [template = constants.%int_42.2] @@ -82,7 +82,7 @@ var d: i32 = c[-10]; // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc11_26.3: ref %i32 = array_index file.%c.var, %int_0 // CHECK:STDOUT: %.loc11_26.4: init %i32 = initialize_from %.loc11_26.2 to %.loc11_26.3 [template = constants.%int_42.2] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_42.loc11_24, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_42.loc11_24) [template = constants.%int_42.2] @@ -95,12 +95,12 @@ var d: i32 = c[-10]; // CHECK:STDOUT: assign file.%c.var, %.loc11_27 // CHECK:STDOUT: %c.ref: ref %array_type = name_ref c, file.%c // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10] -// CHECK:STDOUT: %impl.elem0.loc15_16.1: %Op.type.13 = interface_witness_access constants.%interface.20, element0 [template = constants.%Op.14] +// CHECK:STDOUT: %impl.elem0.loc15_16.1: %Op.type.13 = interface_witness_access constants.%interface.21, element0 [template = constants.%Op.14] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %impl.elem0.loc15_16.1 [template = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %Op.bound(%int_10) [template = constants.%int_-10.1] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc15_16.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_16.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int.snegate, %impl.elem0.loc15_16.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %.loc15_16.1: Core.IntLiteral = value_of_initializer %int.snegate [template = constants.%int_-10.1] 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 ce907e890d968..2e3160a6b0630 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -33,10 +33,10 @@ interface I { // CHECK:STDOUT: %assoc0.1: %assoc_type.1 = assoc_entity element0, @I.%T [template] // CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] @@ -72,7 +72,7 @@ interface I { // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0.1] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_42) [template = constants.%int_42.2] diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index aadc253803730..66adf3ff48d34 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -40,10 +40,10 @@ interface I { // CHECK:STDOUT: %assoc2: %assoc_type.1 = assoc_entity element2, @I.%T [template] // CHECK:STDOUT: %int_42.1: Core.IntLiteral = int_value 42 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_42.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_42.2: %i32 = int_value 42 [template] // CHECK:STDOUT: %assoc_type.2: type = assoc_entity_type %I.type, %i32 [template] @@ -107,7 +107,7 @@ interface I { // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc2: %assoc_type.1 = assoc_entity element2, %T [template = constants.%assoc2] // CHECK:STDOUT: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_42) [template = constants.%int_42.2] diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index b3f0993e818ec..990fa860bb58d 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -20,14 +20,14 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -59,7 +59,7 @@ 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc11_36: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_36: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_36: = bound_method %int_1, %impl.elem0.loc11_36 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_36: = specific_function %Convert.bound.loc11_36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_36: init %i32 = call %Convert.specific_fn.loc11_36(%int_1) [template = constants.%int_1.2] @@ -75,7 +75,7 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // 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: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc11_66: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_66: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_66: = bound_method %int_2, %impl.elem0.loc11_66 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_66: = specific_function %Convert.bound.loc11_66, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_66: init %i32 = call %Convert.specific_fn.loc11_66(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 57bee077d95c3..c831eff4360ee 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -501,10 +501,10 @@ impl i32 as Empty { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] @@ -539,7 +539,7 @@ impl i32 as Empty { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -560,15 +560,15 @@ impl i32 as Empty { // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Zero: %i32 = bind_symbolic_name Zero, 0 [symbolic] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -606,7 +606,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !if.then: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_0, %impl.elem0.loc6 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6: = specific_function %Convert.bound.loc6, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %Convert.specific_fn.loc6(%int_0) [template = constants.%int_0.2] @@ -618,7 +618,7 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_1, %impl.elem0.loc9 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9: = specific_function %Convert.bound.loc9, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %Convert.specific_fn.loc9(%int_1) [template = constants.%int_1.2] @@ -796,13 +796,13 @@ impl i32 as Empty { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %interface.20: = interface_witness () [template] +// CHECK:STDOUT: %interface.21: = interface_witness () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -838,14 +838,14 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %i32 as %Empty.ref { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc10_21.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: %.loc10_21.2: %i32 = converted %int_0, %.loc10_21.1 [template = constants.%int_0.2] // CHECK:STDOUT: %Zero: %i32 = bind_name Zero, %.loc10_21.2 -// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.20] +// CHECK:STDOUT: %interface: = interface_witness () [template = constants.%interface.21] // 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 69dc672ca15be..82a6e0b9140f7 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -28,16 +28,16 @@ fn F() -> i32 { // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] @@ -77,21 +77,21 @@ fn F() -> i32 { // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc12_36.1: %tuple.type.3 = tuple_literal (%int_1.loc12, %int_2, %int_3) -// CHECK:STDOUT: %impl.elem0.loc12_36.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_36.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_36.1: = bound_method %int_1.loc12, %impl.elem0.loc12_36.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_36.1: = specific_function %Convert.bound.loc12_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_36.1: init %i32 = call %Convert.specific_fn.loc12_36.1(%int_1.loc12) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_36.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_36.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc12: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc12_36.3: init %i32 = initialize_from %.loc12_36.2 to %tuple.elem0.loc12 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_36.2: = bound_method %int_2, %impl.elem0.loc12_36.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_36.2: = specific_function %Convert.bound.loc12_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_36.2: init %i32 = call %Convert.specific_fn.loc12_36.2(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc12_36.4: init %i32 = converted %int_2, %int.convert_checked.loc12_36.2 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem1.loc12: ref %i32 = tuple_access %v.var, element1 // CHECK:STDOUT: %.loc12_36.5: init %i32 = initialize_from %.loc12_36.4 to %tuple.elem1.loc12 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc12_36.3: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_36.3: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_36.3: = bound_method %int_3, %impl.elem0.loc12_36.3 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12_36.3: = specific_function %Convert.bound.loc12_36.3, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12_36.3: init %i32 = call %Convert.specific_fn.loc12_36.3(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 2e58b1f03331e..73c9411549382 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -28,14 +28,14 @@ fn F() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -61,7 +61,7 @@ fn F() { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1, %impl.elem0.loc12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_1) [template = constants.%int_1.2] @@ -69,7 +69,7 @@ fn F() { // CHECK:STDOUT: %.loc12_17.2: %i32 = converted %int_1, %.loc12_17.1 [template = constants.%int_1.2] // CHECK:STDOUT: %a.loc12: %i32 = bind_name a, %.loc12_17.2 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc19: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc19: = specific_function %Convert.bound.loc19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 6fde88e5ab55c..74906ec1a1562 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -90,10 +90,10 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -125,7 +125,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15: = bound_method %int_1.loc15, %impl.elem0.loc15 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc15: = specific_function %Convert.bound.loc15, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %Convert.specific_fn.loc15(%int_1.loc15) [template = constants.%int_1.2] @@ -133,7 +133,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc15_25.2: %i32 = converted %int_1.loc15, %.loc15_25.1 [template = constants.%int_1.2] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc15_25.2 // CHECK:STDOUT: %int_1.loc21: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_1.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_1.loc21) [template = constants.%int_1.2] @@ -141,7 +141,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc21_23.2: %i32 = converted %int_1.loc21, %.loc21_23.1 [template = constants.%int_1.2] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc21_23.2 // CHECK:STDOUT: %int_1.loc27: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_1.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_1.loc27) [template = constants.%int_1.2] @@ -149,7 +149,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc27_21.2: %i32 = converted %int_1.loc27, %.loc27_21.1 [template = constants.%int_1.2] // CHECK:STDOUT: %d: %i32 = bind_name d, %.loc27_21.2 // CHECK:STDOUT: %int_1.loc33: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc33: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc33: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc33: = bound_method %int_1.loc33, %impl.elem0.loc33 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc33: = specific_function %Convert.bound.loc33, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc33: init %i32 = call %Convert.specific_fn.loc33(%int_1.loc33) [template = constants.%int_1.2] @@ -157,7 +157,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc33_23.2: %i32 = converted %int_1.loc33, %.loc33_23.1 [template = constants.%int_1.2] // CHECK:STDOUT: %e: %i32 = bind_name e, %.loc33_23.2 // CHECK:STDOUT: %int_1.loc46: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc46: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc46: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc46: = bound_method %int_1.loc46, %impl.elem0.loc46 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc46: = specific_function %Convert.bound.loc46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc46: init %i32 = call %Convert.specific_fn.loc46(%int_1.loc46) [template = constants.%int_1.2] @@ -165,7 +165,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc46_29.2: %i32 = converted %int_1.loc46, %.loc46_29.1 [template = constants.%int_1.2] // CHECK:STDOUT: %f: %i32 = bind_name f, %.loc46_29.2 // CHECK:STDOUT: %int_1.loc59: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc59: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc59: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc59: = bound_method %int_1.loc59, %impl.elem0.loc59 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc59: = specific_function %Convert.bound.loc59, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc59: init %i32 = call %Convert.specific_fn.loc59(%int_1.loc59) [template = constants.%int_1.2] @@ -173,7 +173,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc59_31.2: %i32 = converted %int_1.loc59, %.loc59_31.1 [template = constants.%int_1.2] // CHECK:STDOUT: %g: %i32 = bind_name g, %.loc59_31.2 // CHECK:STDOUT: %int_1.loc72: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc72: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc72: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc72: = bound_method %int_1.loc72, %impl.elem0.loc72 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc72: = specific_function %Convert.bound.loc72, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc72: init %i32 = call %Convert.specific_fn.loc72(%int_1.loc72) [template = constants.%int_1.2] @@ -181,7 +181,7 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: %.loc72_33.2: %i32 = converted %int_1.loc72, %.loc72_33.1 [template = constants.%int_1.2] // CHECK:STDOUT: %h: %i32 = bind_name h, %.loc72_33.2 // CHECK:STDOUT: %int_1.loc84: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc84: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc84: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc84: = bound_method %int_1.loc84, %impl.elem0.loc84 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc84: = specific_function %Convert.bound.loc84, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc84: init %i32 = call %Convert.specific_fn.loc84(%int_1.loc84) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index 2df28f3743dd6..905bef035d2f0 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -19,10 +19,10 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] @@ -65,7 +65,7 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index a11c286dae19a..9c58296ee5743 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -23,10 +23,10 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -68,7 +68,7 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index 1b43f5b5ee990..f1fc9856adf0c 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -49,10 +49,10 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -95,7 +95,7 @@ var a: i32 = NS.A(); // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 47b736a8ce0ed..2e33be0e223d7 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.carbon @@ -29,10 +29,10 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %A: %A.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %B.type: type = fn_type @B [template] @@ -100,7 +100,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: fn @A() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index 85debd7fb3153..5443c22c017e7 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -30,10 +30,10 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: %.1: %.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -71,7 +71,7 @@ fn ns.A() -> i32 { return 0; } // CHECK:STDOUT: fn @.1() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 4d72708f44cbc..5d610a2351b90 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -42,10 +42,10 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -101,7 +101,7 @@ 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: %int_0.loc22: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc22: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc22: = bound_method %int_0.loc22, %impl.elem0.loc22 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc22: = specific_function %Convert.bound.loc22, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %Convert.specific_fn.loc22(%int_0.loc22) [template = constants.%int_0.2] @@ -113,7 +113,7 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc27: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc27: = bound_method %int_0.loc27, %impl.elem0.loc27 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc27: = specific_function %Convert.bound.loc27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %Convert.specific_fn.loc27(%int_0.loc27) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index dcfdbe6d13d47..6959a8f886fe8 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -35,34 +35,34 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %int_9.1: Core.IntLiteral = int_value 9 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_9.2: %i32 = int_value 9 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.6: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.6: = specific_function %Convert.bound.6, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] @@ -70,12 +70,12 @@ fn Main() { // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %ptr.3: type = ptr_type %i32 [template] // CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.7: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.7: = specific_function %Convert.bound.7, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_10.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.8: = bound_method %int_10.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.8: = specific_function %Convert.bound.8, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: } @@ -103,7 +103,7 @@ fn Main() { // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_12, %impl.elem0.loc12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_12) [template = constants.%int_12.2] @@ -111,7 +111,7 @@ fn Main() { // CHECK:STDOUT: assign %a.var, %.loc12 // CHECK:STDOUT: %a.ref.loc13: ref %i32 = name_ref a, %a // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_9, %impl.elem0.loc13 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_9) [template = constants.%int_9.2] @@ -122,14 +122,14 @@ fn Main() { // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc15_28.1: %tuple.type.3 = tuple_literal (%int_1.loc15, %int_2.loc15) -// CHECK:STDOUT: %impl.elem0.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_28.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15_28.1: = bound_method %int_1.loc15, %impl.elem0.loc15_28.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc15_28.1: = specific_function %Convert.bound.loc15_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc15_28.1: init %i32 = call %Convert.specific_fn.loc15_28.1(%int_1.loc15) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc15_28.2: init %i32 = converted %int_1.loc15, %int.convert_checked.loc15_28.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc15: ref %i32 = tuple_access %b.var, element0 // CHECK:STDOUT: %.loc15_28.3: init %i32 = initialize_from %.loc15_28.2 to %tuple.elem0.loc15 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc15_28.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc15_28.2: = bound_method %int_2.loc15, %impl.elem0.loc15_28.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc15_28.2: = specific_function %Convert.bound.loc15_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc15_28.2: init %i32 = call %Convert.specific_fn.loc15_28.2(%int_2.loc15) [template = constants.%int_2.2] @@ -143,7 +143,7 @@ fn Main() { // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %tuple.elem0.loc16: ref %i32 = tuple_access %b.ref.loc16, element0 // CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_3.loc16, %impl.elem0.loc16 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_3.loc16) [template = constants.%int_3.2] @@ -153,7 +153,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %tuple.elem1.loc17: ref %i32 = tuple_access %b.ref.loc17, element1 // CHECK:STDOUT: %int_4.loc17: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17: = bound_method %int_4.loc17, %impl.elem0.loc17 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc17: = specific_function %Convert.bound.loc17, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_4.loc17) [template = constants.%int_4.2] @@ -164,14 +164,14 @@ fn Main() { // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc19: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc19_46.1: %struct_type.a.b.2 = struct_literal (%int_1.loc19, %int_2.loc19) -// CHECK:STDOUT: %impl.elem0.loc19_46.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc19_46.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc19_46.1: = bound_method %int_1.loc19, %impl.elem0.loc19_46.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc19_46.1: = specific_function %Convert.bound.loc19_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc19_46.1: init %i32 = call %Convert.specific_fn.loc19_46.1(%int_1.loc19) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_46.2: init %i32 = converted %int_1.loc19, %int.convert_checked.loc19_46.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc19_46.3: ref %i32 = struct_access %c.var, element0 // CHECK:STDOUT: %.loc19_46.4: init %i32 = initialize_from %.loc19_46.2 to %.loc19_46.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc19_46.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc19_46.2: = bound_method %int_2.loc19, %impl.elem0.loc19_46.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc19_46.2: = specific_function %Convert.bound.loc19_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc19_46.2: init %i32 = call %Convert.specific_fn.loc19_46.2(%int_2.loc19) [template = constants.%int_2.2] @@ -184,7 +184,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc20: ref %struct_type.a.b.1 = name_ref c, %c // CHECK:STDOUT: %.loc20_4: ref %i32 = struct_access %c.ref.loc20, element0 // CHECK:STDOUT: %int_3.loc20: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc20: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc20: = bound_method %int_3.loc20, %impl.elem0.loc20 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc20: = specific_function %Convert.bound.loc20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc20: init %i32 = call %Convert.specific_fn.loc20(%int_3.loc20) [template = constants.%int_3.2] @@ -193,7 +193,7 @@ fn Main() { // CHECK:STDOUT: %c.ref.loc21: ref %struct_type.a.b.1 = name_ref c, %c // CHECK:STDOUT: %.loc21_4: ref %i32 = struct_access %c.ref.loc21, element1 // CHECK:STDOUT: %int_4.loc21: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_4.loc21, %impl.elem0.loc21 [template = constants.%Convert.bound.6] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.6] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_4.loc21) [template = constants.%int_4.2] @@ -208,7 +208,7 @@ fn Main() { // CHECK:STDOUT: %.loc24_4: %ptr.3 = bind_value %p.ref.loc24 // CHECK:STDOUT: %.loc24_3: ref %i32 = deref %.loc24_4 // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc24: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc24: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc24: = bound_method %int_5, %impl.elem0.loc24 [template = constants.%Convert.bound.7] // CHECK:STDOUT: %Convert.specific_fn.loc24: = specific_function %Convert.bound.loc24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.7] // CHECK:STDOUT: %int.convert_checked.loc24: init %i32 = call %Convert.specific_fn.loc24(%int_5) [template = constants.%int_5.2] @@ -231,7 +231,7 @@ fn Main() { // CHECK:STDOUT: %.loc26_5: %ptr.3 = block_arg !if.expr.result // CHECK:STDOUT: %.loc26_3: ref %i32 = deref %.loc26_5 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_10, %impl.elem0.loc26 [template = constants.%Convert.bound.8] // CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.8] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_10) [template = constants.%int_10.2] 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 5b36957eee41b..593d58980eb4a 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 @@ -68,10 +68,10 @@ fn Main() { // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.type.1: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] @@ -80,11 +80,11 @@ fn Main() { // CHECK:STDOUT: %tuple.1: %tuple.type.1 = tuple_value (%int_3.1, %int_4) [template] // CHECK:STDOUT: %tuple.2: %tuple.type.1 = tuple_value (%int_1.1, %int_2.1) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple.3: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -93,11 +93,11 @@ fn Main() { // CHECK:STDOUT: %struct.1: %struct_type.x.y = struct_value (%int_3.1, %int_4) [template] // CHECK:STDOUT: %struct.2: %struct_type.x.y = struct_value (%int_1.1, %int_2.1) [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_10.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_10.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] // CHECK:STDOUT: } @@ -140,7 +140,7 @@ 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: %int_1.loc23: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_1.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_1.loc23) [template = constants.%int_1.2] @@ -164,7 +164,7 @@ fn Main() { // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc29: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc29: = specific_function %Convert.bound.loc29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc29: init %i32 = call %Convert.specific_fn.loc29(%int_0) [template = constants.%int_0.2] @@ -176,14 +176,14 @@ fn Main() { // CHECK:STDOUT: %int_1.loc34: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc34: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc34_17.1: %tuple.type.1 = tuple_literal (%int_1.loc34, %int_2.loc34) -// CHECK:STDOUT: %impl.elem0.loc34_17.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc34_17.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc34_17.1: = bound_method %int_1.loc34, %impl.elem0.loc34_17.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc34_17.1: = specific_function %Convert.bound.loc34_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc34_17.1: init %i32 = call %Convert.specific_fn.loc34_17.1(%int_1.loc34) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc34_17.2: init %i32 = converted %int_1.loc34, %int.convert_checked.loc34_17.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc34: %i32 = tuple_access %.loc34_8.1, element0 // CHECK:STDOUT: %.loc34_17.3: init %i32 = initialize_from %.loc34_17.2 to %tuple.elem0.loc34 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc34_17.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc34_17.2: = bound_method %int_2.loc34, %impl.elem0.loc34_17.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc34_17.2: = specific_function %Convert.bound.loc34_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc34_17.2: init %i32 = call %Convert.specific_fn.loc34_17.2(%int_2.loc34) [template = constants.%int_2.2] @@ -225,7 +225,7 @@ fn Main() { // CHECK:STDOUT: %int_1.loc49: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc49: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc49_12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc49_12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc49_12: = bound_method %int_1.loc49, %impl.elem0.loc49_12 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc49_12: = specific_function %Convert.bound.loc49_12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc49_12: init %i32 = call %Convert.specific_fn.loc49_12(%int_1.loc49) [template = constants.%int_1.2] @@ -235,7 +235,7 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else.loc49: // CHECK:STDOUT: %int_2.loc49: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc49_19: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc49_19: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc49_19: = bound_method %int_2.loc49, %impl.elem0.loc49_19 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc49_19: = specific_function %Convert.bound.loc49_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc49_19: init %i32 = call %Convert.specific_fn.loc49_19(%int_2.loc49) [template = constants.%int_2.2] @@ -246,7 +246,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc49: // CHECK:STDOUT: %.loc49_4: %i32 = block_arg !if.expr.result.loc49 [template = constants.%int_1.2] // CHECK:STDOUT: %int_3.loc49: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc49_27: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc49_27: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc49_27: = bound_method %int_3.loc49, %impl.elem0.loc49_27 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc49_27: = specific_function %Convert.bound.loc49_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %Convert.specific_fn.loc49_27(%int_3.loc49) [template = constants.%int_3.2] @@ -270,7 +270,7 @@ fn Main() { // CHECK:STDOUT: !if.expr.result.loc56: // CHECK:STDOUT: %.loc56_4: %i32 = block_arg !if.expr.result.loc56 // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc56: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc56: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc56: = bound_method %int_10, %impl.elem0.loc56 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc56: = specific_function %Convert.bound.loc56, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc56: init %i32 = call %Convert.specific_fn.loc56(%int_10) [template = constants.%int_10.2] 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 3f195420be5c2..a20bb9db113d2 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -32,16 +32,16 @@ fn Main() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: } @@ -77,7 +77,7 @@ fn Main() { // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -91,7 +91,7 @@ fn Main() { // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] 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 210415f238c79..fc5b2a652b6fb 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -28,10 +28,10 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %float: f64 = float_literal 5.6000000000000005 [template] @@ -60,7 +60,7 @@ fn Main() { // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon b/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon index 7caf31184ebc3..7dab9c85454b5 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_error_recovery.carbon @@ -37,9 +37,9 @@ fn G(n: i32) { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %Op.type.14: type = fn_type @Op.2, @impl.13(%int_32) [template] +// CHECK:STDOUT: %Op.type.14: type = fn_type @Op.2, @impl.14(%int_32) [template] // CHECK:STDOUT: %Op.14: %Op.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Op.14) [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Op.14) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -85,7 +85,7 @@ fn G(n: i32) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %undeclared.ref: = name_ref undeclared, [template = ] -// CHECK:STDOUT: %impl.elem0: %Op.type.1 = interface_witness_access constants.%interface.19, element0 [template = constants.%Op.14] +// CHECK:STDOUT: %impl.elem0: %Op.type.1 = interface_witness_access constants.%interface.20, element0 [template = constants.%Op.14] // CHECK:STDOUT: %Op.bound: = bound_method %n.ref, %impl.elem0 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index b78c3dbacb296..c93e6941e4758 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -234,17 +234,17 @@ let x: i32 = c[0]; // CHECK:STDOUT: %int_5.1: 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.10: type = fn_type @Convert.2, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.21: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_5.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -327,13 +327,13 @@ let x: i32 = c[0]; // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc10_26.1: %tuple.type.3 = tuple_literal (%int_1, %int_5) -// CHECK:STDOUT: %impl.elem0.loc10_26.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc10_26.1: %Convert.type.2 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc10_26.1: = bound_method %int_1, %impl.elem0.loc10_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc10_26.1: = specific_function %Convert.bound.loc10_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc10_26.1: init %i32 = call %Convert.specific_fn.loc10_26.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_26.2: %i32 = value_of_initializer %int.convert_checked.loc10_26.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc10_26.3: %i32 = converted %int_1, %.loc10_26.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc10_26.2: %Convert.type.2 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc10_26.2: = bound_method %int_5, %impl.elem0.loc10_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc10_26.2: = specific_function %Convert.bound.loc10_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc10_26.2: init %i32 = call %Convert.specific_fn.loc10_26.2(%int_5) [template = constants.%int_5.2] @@ -344,7 +344,7 @@ let x: i32 = c[0]; // CHECK:STDOUT: %s: %tuple.type.2 = bind_name s, %.loc10_27 // CHECK:STDOUT: %s.ref: %tuple.type.2 = name_ref s, %s // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_17.1: %Convert.type.2 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_0, %impl.elem0.loc11_17.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 4e1f4d57f902f..836db0d7ee44c 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -48,10 +48,10 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -81,7 +81,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -101,16 +101,16 @@ fn Main() { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: } @@ -141,7 +141,7 @@ fn Main() { // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] @@ -159,7 +159,7 @@ fn Main() { // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index 1b170c1d4c4ca..6938a1f657b57 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -29,10 +29,10 @@ var b: i32 = a; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -59,7 +59,7 @@ var b: i32 = a; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -78,7 +78,7 @@ var b: i32 = a; // CHECK:STDOUT: imports { // CHECK:STDOUT: %import_ref.1: ref %i32 = import_ref Main//lib, a, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.227 +// CHECK:STDOUT: .Int = %import_ref.230 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index ea1e0122d59af..a851668814471 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -22,10 +22,10 @@ fn F() -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] @@ -62,7 +62,7 @@ fn F() -> i32 { // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index e49a1151c2ae9..4ed81a6253896 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -33,13 +33,13 @@ fn F() { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] @@ -75,14 +75,14 @@ fn F() { // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc12_46.1: %struct_type.a.b.2 = struct_literal (%int_1.loc12, %int_2.loc12) -// CHECK:STDOUT: %impl.elem0.loc12_46.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_46.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_46.1: = bound_method %int_1.loc12, %impl.elem0.loc12_46.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc12_46.1: = specific_function %Convert.bound.loc12_46.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %Convert.specific_fn.loc12_46.1(%int_1.loc12) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_46.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_46.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc12_46.3: ref %i32 = struct_access %s.var, element0 // CHECK:STDOUT: %.loc12_46.4: init %i32 = initialize_from %.loc12_46.2 to %.loc12_46.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_46.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_46.2: = bound_method %int_2.loc12, %impl.elem0.loc12_46.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc12_46.2: = specific_function %Convert.bound.loc12_46.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %Convert.specific_fn.loc12_46.2(%int_2.loc12) [template = constants.%int_2.2] @@ -114,14 +114,14 @@ fn F() { // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc18_28.1: %tuple.type.3 = tuple_literal (%int_1.loc18, %int_2.loc18) -// CHECK:STDOUT: %impl.elem0.loc18_28.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_28.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_28.1: = bound_method %int_1.loc18, %impl.elem0.loc18_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18_28.1: = specific_function %Convert.bound.loc18_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %Convert.specific_fn.loc18_28.1(%int_1.loc18) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_28.2: init %i32 = converted %int_1.loc18, %int.convert_checked.loc18_28.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0.loc18: ref %i32 = tuple_access %t.var, element0 // CHECK:STDOUT: %.loc18_28.3: init %i32 = initialize_from %.loc18_28.2 to %tuple.elem0.loc18 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_28.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_28.2: = bound_method %int_2.loc18, %impl.elem0.loc18_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc18_28.2: = specific_function %Convert.bound.loc18_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %Convert.specific_fn.loc18_28.2(%int_2.loc18) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index 197a07f38f879..123709b3dba66 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -24,10 +24,10 @@ fn F() -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] @@ -64,7 +64,7 @@ fn F() -> i32 { // CHECK:STDOUT: %n.var: ref %i32 = var n // CHECK:STDOUT: %n: ref %i32 = bind_name n, %n.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 6818ae8c6d3cb..3b3b28e9fb037 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -28,10 +28,10 @@ var a: i32* = a_ref; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] @@ -62,7 +62,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -86,7 +86,7 @@ var a: i32* = a_ref; // CHECK:STDOUT: %import_ref.1 = import_ref Implicit//default, a_orig, unloaded // CHECK:STDOUT: %import_ref.2: ref %ptr = import_ref Implicit//default, a_ref, loaded // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.228 +// CHECK:STDOUT: .Int = %import_ref.231 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index c0f43675d5c3c..6af42aa761cbd 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -31,10 +31,10 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -78,7 +78,7 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] 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 e0f594d83f422..2fcb55407d981 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -41,10 +41,10 @@ fn G() -> C { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -56,10 +56,10 @@ fn G() -> C { // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] @@ -119,7 +119,7 @@ fn G() -> C { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] @@ -135,14 +135,14 @@ fn G() -> C { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc25_38.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc25_38.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc25_38.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc25_38.1: = bound_method %int_1, %impl.elem0.loc25_38.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc25_38.1: = specific_function %Convert.bound.loc25_38.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc25_38.1: init %i32 = call %Convert.specific_fn.loc25_38.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_38.2: init %i32 = converted %int_1, %int.convert_checked.loc25_38.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc25_38.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc25_38.4: init %i32 = initialize_from %.loc25_38.2 to %.loc25_38.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc25_38.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc25_38.2: = bound_method %int_2, %impl.elem0.loc25_38.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc25_38.2: = specific_function %Convert.bound.loc25_38.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc25_38.2: init %i32 = call %Convert.specific_fn.loc25_38.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index a0ee4366af09f..3d9dbfa8b1eb2 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -49,14 +49,14 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %DifferentScopes.type: type = fn_type @DifferentScopes [template] @@ -108,7 +108,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] @@ -117,7 +117,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc21: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc21: = bound_method %int_1, %impl.elem0.loc21 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc21: = specific_function %Convert.bound.loc21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_1) [template = constants.%int_1.2] @@ -127,7 +127,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else: // CHECK:STDOUT: %int_0.loc23: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_0.loc23, %impl.elem0.loc23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_0.loc23) [template = constants.%int_0.2] @@ -145,7 +145,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %v.var: ref %i32 = var v // CHECK:STDOUT: %v: ref %i32 = bind_name v, %v.var // CHECK:STDOUT: %int_0.loc28: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc28: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc28: = bound_method %int_0.loc28, %impl.elem0.loc28 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc28: = specific_function %Convert.bound.loc28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %Convert.specific_fn.loc28(%int_0.loc28) [template = constants.%int_0.2] @@ -158,7 +158,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc36: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc36: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc36: = bound_method %int_1, %impl.elem0.loc36 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc36: = specific_function %Convert.bound.loc36, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc36: init %i32 = call %Convert.specific_fn.loc36(%int_1) [template = constants.%int_1.2] @@ -171,7 +171,7 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc27: // CHECK:STDOUT: %int_0.loc39: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc39: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc39: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc39: = bound_method %int_0.loc39, %impl.elem0.loc39 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc39: = specific_function %Convert.bound.loc39, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc39: init %i32 = call %Convert.specific_fn.loc39(%int_0.loc39) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 6c1a6dd2f0799..eaf514a13a85c 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -38,20 +38,20 @@ fn G() -> i32 { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %C.val: %C = struct_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -111,14 +111,14 @@ fn G() -> i32 { // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc17_43.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc17_43.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17_43.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17_43.1: = bound_method %int_1, %impl.elem0.loc17_43.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc17_43.1: = specific_function %Convert.bound.loc17_43.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc17_43.1: init %i32 = call %Convert.specific_fn.loc17_43.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_43.2: init %i32 = converted %int_1, %int.convert_checked.loc17_43.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc17_43.3: ref %i32 = class_element_access %return, element0 // CHECK:STDOUT: %.loc17_43.4: init %i32 = initialize_from %.loc17_43.2 to %.loc17_43.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc17_43.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc17_43.2: = bound_method %int_2, %impl.elem0.loc17_43.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc17_43.2: = specific_function %Convert.bound.loc17_43.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc17_43.2: init %i32 = call %Convert.specific_fn.loc17_43.2(%int_2) [template = constants.%int_2.2] @@ -136,7 +136,7 @@ fn G() -> i32 { // CHECK:STDOUT: %result.var: ref %i32 = var result // CHECK:STDOUT: %result: ref %i32 = bind_name result, %result.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 1595999ccc5fc..b270d5fb729c7 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -37,14 +37,14 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] @@ -57,7 +57,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Bool = %import_ref.229 +// CHECK:STDOUT: .Bool = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -108,7 +108,7 @@ 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: %int_0.loc13: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13: = bound_method %int_0.loc13, %impl.elem0.loc13 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13: = specific_function %Convert.bound.loc13, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] @@ -124,7 +124,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc16: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc16: = bound_method %int_1, %impl.elem0.loc16 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc16: = specific_function %Convert.bound.loc16, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc16: init %i32 = call %Convert.specific_fn.loc16(%int_1) [template = constants.%int_1.2] @@ -134,7 +134,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !if.else.loc15: // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18: = bound_method %int_0.loc18, %impl.elem0.loc18 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18: = specific_function %Convert.bound.loc18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18: init %i32 = call %Convert.specific_fn.loc18(%int_0.loc18) [template = constants.%int_0.2] @@ -152,7 +152,7 @@ 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: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc23: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc23: = bound_method %int_0, %impl.elem0.loc23 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc23: = specific_function %Convert.bound.loc23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc23: init %i32 = call %Convert.specific_fn.loc23(%int_0) [template = constants.%int_0.2] @@ -165,7 +165,7 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %w.var: ref %i32 = var w // CHECK:STDOUT: %w: ref %i32 = bind_name w, %w.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc26: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc26: = bound_method %int_1, %impl.elem0.loc26 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc26: = specific_function %Convert.bound.loc26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc26: init %i32 = call %Convert.specific_fn.loc26(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/return/struct.carbon b/toolchain/check/testdata/return/struct.carbon index cabf00e7e1383..5a99f578623bc 100644 --- a/toolchain/check/testdata/return/struct.carbon +++ b/toolchain/check/testdata/return/struct.carbon @@ -23,10 +23,10 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_3.2) [template] @@ -63,7 +63,7 @@ fn Main() -> {.a: i32} { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc12_17.1: %struct_type.a.2 = struct_literal (%int_3) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_3, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_3) [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/return/tuple.carbon b/toolchain/check/testdata/return/tuple.carbon index 440d4e879487e..5462e27ae0365 100644 --- a/toolchain/check/testdata/return/tuple.carbon +++ b/toolchain/check/testdata/return/tuple.carbon @@ -26,13 +26,13 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %int_35.1: Core.IntLiteral = int_value 35 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_15.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_15.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_15.2: %i32 = int_value 15 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_35.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_35.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_35.2: %i32 = int_value 35 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_15.2, %int_35.2) [template] @@ -73,14 +73,14 @@ fn Main() -> (i32, i32) { // CHECK:STDOUT: %int_15: Core.IntLiteral = int_value 15 [template = constants.%int_15.1] // CHECK:STDOUT: %int_35: Core.IntLiteral = int_value 35 [template = constants.%int_35.1] // CHECK:STDOUT: %.loc13_17.1: %tuple.type.3 = tuple_literal (%int_15, %int_35) -// CHECK:STDOUT: %impl.elem0.loc13_17.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_17.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_17.1: = bound_method %int_15, %impl.elem0.loc13_17.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc13_17.1: = specific_function %Convert.bound.loc13_17.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc13_17.1: init %i32 = call %Convert.specific_fn.loc13_17.1(%int_15) [template = constants.%int_15.2] // CHECK:STDOUT: %.loc13_17.2: init %i32 = converted %int_15, %int.convert_checked.loc13_17.1 [template = constants.%int_15.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %return, element0 // CHECK:STDOUT: %.loc13_17.3: init %i32 = initialize_from %.loc13_17.2 to %tuple.elem0 [template = constants.%int_15.2] -// CHECK:STDOUT: %impl.elem0.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc13_17.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc13_17.2: = bound_method %int_35, %impl.elem0.loc13_17.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_17.2: = specific_function %Convert.bound.loc13_17.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_17.2: init %i32 = call %Convert.specific_fn.loc13_17.2(%int_35) [template = constants.%int_35.2] diff --git a/toolchain/check/testdata/return/value.carbon b/toolchain/check/testdata/return/value.carbon index 4d36bb990a57c..4ffe545c01803 100644 --- a/toolchain/check/testdata/return/value.carbon +++ b/toolchain/check/testdata/return/value.carbon @@ -21,10 +21,10 @@ fn Main() -> i32 { // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -58,7 +58,7 @@ fn Main() -> i32 { // CHECK:STDOUT: fn @Main() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index ef018b5ccd37e..e33f69b7c4033 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -23,10 +23,10 @@ var y: i32 = x.b; // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_4.2) [template] @@ -58,7 +58,7 @@ var y: i32 = x.b; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_27.1: %struct_type.a.2 = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index c65e6c5380aed..69df71e32b0a6 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -60,10 +60,10 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %struct.1: %struct_type.a.1 = struct_value (%int_0.2) [template] @@ -87,10 +87,10 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct.4: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] @@ -143,13 +143,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc9_28.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_28.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9_28.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9_28.1: = bound_method %int_1, %impl.elem0.loc9_28.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_28.1: = specific_function %Convert.bound.loc9_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_28.1: init %i32 = call %Convert.specific_fn.loc9_28.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_28.2: %i32 = value_of_initializer %int.convert_checked.loc9_28.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_28.3: %i32 = converted %int_1, %.loc9_28.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9_28.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9_28.2: = bound_method %int_2, %impl.elem0.loc9_28.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc9_28.2: = specific_function %Convert.bound.loc9_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc9_28.2: init %i32 = call %Convert.specific_fn.loc9_28.2(%int_2) [template = constants.%int_2.2] @@ -184,7 +184,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc4_31.1: %struct_type.a.2 = struct_literal (%int_0.loc4) -// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2] @@ -198,7 +198,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.1: %struct_type.b.c.2 = struct_literal (%int_0.loc6_17, %.loc6_28.1) // CHECK:STDOUT: %int_0.loc6_37: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc6_38.1: %struct_type.a.d.3 = struct_literal (%.loc6_29.1, %int_0.loc6_37) -// CHECK:STDOUT: %impl.elem0.loc6_29: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6_29: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6_29: = bound_method %int_0.loc6_17, %impl.elem0.loc6_29 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_29: = specific_function %Convert.bound.loc6_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_29: init %i32 = call %Convert.specific_fn.loc6_29(%int_0.loc6_17) [template = constants.%int_0.2] @@ -206,7 +206,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_38.2: ref %struct_type.b.c.1 = struct_access file.%b_ref.var, element0 // CHECK:STDOUT: %.loc6_29.3: ref %i32 = struct_access %.loc6_38.2, element0 // CHECK:STDOUT: %.loc6_29.4: init %i32 = initialize_from %.loc6_29.2 to %.loc6_29.3 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc6_28: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6_28: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6_28: = bound_method %int_0.loc6_26, %impl.elem0.loc6_28 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_28: = specific_function %Convert.bound.loc6_28, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %Convert.specific_fn.loc6_28(%int_0.loc6_26) [template = constants.%int_0.2] @@ -217,7 +217,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_29.7: init %tuple.type.2 = initialize_from %.loc6_29.6 to %.loc6_29.5 [template = constants.%tuple] // CHECK:STDOUT: %.loc6_29.8: init %struct_type.b.c.1 = struct_init (%.loc6_29.4, %.loc6_29.7) to %.loc6_38.2 [template = constants.%struct.2] // CHECK:STDOUT: %.loc6_38.3: init %struct_type.b.c.1 = converted %.loc6_29.1, %.loc6_29.8 [template = constants.%struct.2] -// CHECK:STDOUT: %impl.elem0.loc6_38: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc6_38: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc6_38: = bound_method %int_0.loc6_37, %impl.elem0.loc6_38 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc6_38: = specific_function %Convert.bound.loc6_38, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Convert.specific_fn.loc6_38(%int_0.loc6_37) [template = constants.%int_0.2] @@ -270,13 +270,13 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.230 -// CHECK:STDOUT: .ImplicitAs = %import_ref.233 +// CHECK:STDOUT: .Int = %import_ref.233 +// CHECK:STDOUT: .ImplicitAs = %import_ref.236 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.231: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.232 = import_ref Implicit//default, inst988 [no loc], unloaded +// CHECK:STDOUT: %import_ref.234: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.235 = import_ref Implicit//default, inst1029 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -309,8 +309,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.232 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.231 +// CHECK:STDOUT: .Self = imports.%import_ref.235 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.234 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -395,8 +395,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.230: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.231 = import_ref Implicit//default, inst988 [no loc], unloaded +// CHECK:STDOUT: %import_ref.233: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.234 = import_ref Implicit//default, inst1029 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -423,8 +423,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.231 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.230 +// CHECK:STDOUT: .Self = imports.%import_ref.234 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.233 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -481,12 +481,12 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.232 +// CHECK:STDOUT: .ImplicitAs = %import_ref.235 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.230: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.231 = import_ref Implicit//default, inst988 [no loc], unloaded +// CHECK:STDOUT: %import_ref.233: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.234 = import_ref Implicit//default, inst1029 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -513,8 +513,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.231 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.230 +// CHECK:STDOUT: .Self = imports.%import_ref.234 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.233 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index e189791d733b7..6712575903951 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -22,10 +22,10 @@ var z: i32 = y; // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: f64, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%float, %int_1.2) [template] @@ -64,7 +64,7 @@ var z: i32 = y; // CHECK:STDOUT: %.loc11_46.1: %struct_type.a.b.2 = struct_literal (%float, %int_1) // CHECK:STDOUT: %.loc11_46.2: ref f64 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_46.3: init f64 = initialize_from %float to %.loc11_46.2 [template = constants.%float] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 4c912e57e1c8e..5c1951e83a742 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -20,10 +20,10 @@ var y: {.a: i32} = x; // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %struct_type.a.2: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %struct: %struct_type.a.1 = struct_value (%int_4.2) [template] @@ -55,7 +55,7 @@ var y: {.a: i32} = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_27.1: %struct_type.a.2 = struct_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/struct/partially_const.carbon b/toolchain/check/testdata/struct/partially_const.carbon index d6f2bc87fb4ec..a28f7a6550b27 100644 --- a/toolchain/check/testdata/struct/partially_const.carbon +++ b/toolchain/check/testdata/struct/partially_const.carbon @@ -23,10 +23,10 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %struct_type.a.b.c.2: type = struct_type {.a: Core.IntLiteral, .b: %i32, .c: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -76,7 +76,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n // CHECK:STDOUT: %int_0.loc12_32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc12_33.1: %struct_type.a.b.c.2 = struct_literal (%int_0.loc12_16, %n.ref, %int_0.loc12_32) -// CHECK:STDOUT: %impl.elem0.loc12_33.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_33.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_33.1: = bound_method %int_0.loc12_16, %impl.elem0.loc12_33.1 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc12_33.1: = specific_function %Convert.bound.loc12_33.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc12_33.1: init %i32 = call %Convert.specific_fn.loc12_33.1(%int_0.loc12_16) [template = constants.%int_0.2] @@ -85,7 +85,7 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %.loc12_33.4: init %i32 = initialize_from %.loc12_33.2 to %.loc12_33.3 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc12_33.5: ref %i32 = struct_access %return, element1 // CHECK:STDOUT: %.loc12_33.6: init %i32 = initialize_from %n.ref to %.loc12_33.5 -// CHECK:STDOUT: %impl.elem0.loc12_33.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12_33.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12_33.2: = bound_method %int_0.loc12_32, %impl.elem0.loc12_33.2 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc12_33.2: = specific_function %Convert.bound.loc12_33.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc12_33.2: init %i32 = call %Convert.specific_fn.loc12_33.2(%int_0.loc12_32) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index aafdf62c83dc2..47bf968b9d9c2 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -23,13 +23,13 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: %tuple.type.3} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_2.2) [template] @@ -64,14 +64,14 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_49.1: %tuple.type.3 = tuple_literal (%int_2) // CHECK:STDOUT: %.loc11_50.1: %struct_type.a.b.2 = struct_literal (%int_1, %.loc11_49.1) -// CHECK:STDOUT: %impl.elem0.loc11_50: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_50: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_50: = bound_method %int_1, %impl.elem0.loc11_50 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_50: = specific_function %Convert.bound.loc11_50, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_50: init %i32 = call %Convert.specific_fn.loc11_50(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_50.2: init %i32 = converted %int_1, %int.convert_checked.loc11_50 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_50.3: ref %i32 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc11_50.4: init %i32 = initialize_from %.loc11_50.2 to %.loc11_50.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_49: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_49: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_49: = bound_method %int_2, %impl.elem0.loc11_49 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_49: = specific_function %Convert.bound.loc11_49, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_49: init %i32 = call %Convert.specific_fn.loc11_49(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index ccac7fa9a6e39..5ecb57ee00e00 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -24,13 +24,13 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%int_1.2, %int_2.2) [template] @@ -65,13 +65,13 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc11: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc11_44.1: %struct_type.a.b.2 = struct_literal (%int_1.loc11, %int_2.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_44.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_44.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_44.1: = bound_method %int_1.loc11, %impl.elem0.loc11_44.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_44.1: = specific_function %Convert.bound.loc11_44.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_44.1: init %i32 = call %Convert.specific_fn.loc11_44.1(%int_1.loc11) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_44.2: %i32 = value_of_initializer %int.convert_checked.loc11_44.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc11_44.3: %i32 = converted %int_1.loc11, %.loc11_44.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_44.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_44.2: = bound_method %int_2.loc11, %impl.elem0.loc11_44.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_44.2: = specific_function %Convert.bound.loc11_44.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_44.2: init %i32 = call %Convert.specific_fn.loc11_44.2(%int_2.loc11) [template = constants.%int_2.2] @@ -85,14 +85,14 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc14: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc14_44.1: %struct_type.a.b.2 = struct_literal (%int_1.loc14, %int_2.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_44.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_44.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_44.1: = bound_method %int_1.loc14, %impl.elem0.loc14_44.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_44.1: = specific_function %Convert.bound.loc14_44.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_44.1: init %i32 = call %Convert.specific_fn.loc14_44.1(%int_1.loc14) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_44.2: init %i32 = converted %int_1.loc14, %int.convert_checked.loc14_44.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc14_44.3: ref %i32 = struct_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_44.4: init %i32 = initialize_from %.loc14_44.2 to %.loc14_44.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_44.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_44.2: = bound_method %int_2.loc14, %impl.elem0.loc14_44.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_44.2: = specific_function %Convert.bound.loc14_44.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_44.2: init %i32 = call %Convert.specific_fn.loc14_44.2(%int_2.loc14) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index 4335eb8ebbcc7..a9f36621e4cf1 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -21,10 +21,10 @@ var c: i32 = b.0; // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2) [template] @@ -60,7 +60,7 @@ var c: i32 = b.0; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_12) [template = constants.%int_12.2] diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index 0648dc4812712..33f1db515a102 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -24,13 +24,13 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -63,14 +63,14 @@ var b: i32 = a.(oops); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index bec5ed2e097b6..7cdf749211695 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -29,10 +29,10 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2) [template] @@ -72,7 +72,7 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %.loc11_21.1: %tuple.type.3 = tuple_literal (%int_12) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_12, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_12) [template = constants.%int_12.2] diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index 2f507ee2ec84e..25a373646ec2d 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -24,13 +24,13 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -38,7 +38,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %Op.type.13: type = fn_type @Op.13 [template] // CHECK:STDOUT: %Op.type.14: type = fn_type @Op.14 [template] // CHECK:STDOUT: %Op.14: %Op.type.14 = struct_value () [template] -// CHECK:STDOUT: %interface.20: = interface_witness (%Op.14) [template] +// CHECK:STDOUT: %interface.21: = interface_witness (%Op.14) [template] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %Op.14 [template] // CHECK:STDOUT: %int_-10: Core.IntLiteral = int_value -10 [template] // CHECK:STDOUT: } @@ -47,7 +47,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { // CHECK:STDOUT: .Int = %import_ref.1 // CHECK:STDOUT: .ImplicitAs = %import_ref.5 -// CHECK:STDOUT: .Negate = %import_ref.229 +// CHECK:STDOUT: .Negate = %import_ref.232 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -71,14 +71,14 @@ var b: i32 = a.(-10); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] @@ -90,7 +90,7 @@ var b: i32 = a.(-10); // CHECK:STDOUT: assign file.%a.var, %.loc11_28 // CHECK:STDOUT: %a.ref: ref %tuple.type.2 = name_ref a, file.%a // CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10] -// CHECK:STDOUT: %impl.elem0.loc15: %Op.type.13 = interface_witness_access constants.%interface.20, element0 [template = constants.%Op.14] +// CHECK:STDOUT: %impl.elem0.loc15: %Op.type.13 = interface_witness_access constants.%interface.21, element0 [template = constants.%Op.14] // CHECK:STDOUT: %Op.bound: = bound_method %int_10, %impl.elem0.loc15 [template = constants.%Op.bound] // CHECK:STDOUT: %int.snegate: init Core.IntLiteral = call %Op.bound(%int_10) [template = constants.%int_-10] // CHECK:STDOUT: %.loc15_17.1: Core.IntLiteral = value_of_initializer %int.snegate [template = constants.%int_-10] 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 9c3e7763ae82a..91e2f2484b251 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -25,18 +25,18 @@ var c: i32 = a.(b); // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_2.2, %int_3.2) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: } @@ -71,14 +71,14 @@ var c: i32 = a.(b); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc11_26.1: %tuple.type.3 = tuple_literal (%int_2, %int_3) -// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_26.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_26.1: = bound_method %int_2, %impl.elem0.loc11_26.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.1: = specific_function %Convert.bound.loc11_26.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_26.1: init %i32 = call %Convert.specific_fn.loc11_26.1(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc11_26.2: init %i32 = converted %int_2, %int.convert_checked.loc11_26.1 [template = constants.%int_2.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_26.3: init %i32 = initialize_from %.loc11_26.2 to %tuple.elem0 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_26.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_26.2: = bound_method %int_3, %impl.elem0.loc11_26.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_26.2: = specific_function %Convert.bound.loc11_26.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_26.2: init %i32 = call %Convert.specific_fn.loc11_26.2(%int_3) [template = constants.%int_3.2] @@ -89,7 +89,7 @@ var c: i32 = a.(b); // CHECK:STDOUT: %.loc11_27: init %tuple.type.2 = converted %.loc11_26.1, %.loc11_26.6 [template = constants.%tuple] // CHECK:STDOUT: assign file.%a.var, %.loc11_27 // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc12: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_0, %impl.elem0.loc12 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc12: = specific_function %Convert.bound.loc12, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_0) [template = constants.%int_0.2] 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 14b601137f361..ef40aa2c79f4b 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -27,13 +27,13 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -67,14 +67,14 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] 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 ac08b37b15431..c223475409349 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -36,10 +36,10 @@ fn Main() { // CHECK:STDOUT: %int_5.1: 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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_5.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_5.2: %i32 = int_value 5 [template] // CHECK:STDOUT: %array: %array_type = tuple_value (%int_5.2, %int_5.2) [template] @@ -73,7 +73,7 @@ fn Main() { // CHECK:STDOUT: %int_5.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %int_5.loc18_33: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %.loc18_34.1: %tuple.type = tuple_literal (%int_5.loc18_30, %int_5.loc18_33) -// CHECK:STDOUT: %impl.elem0.loc18_34.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_34.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_34.1: = bound_method %int_5.loc18_30, %impl.elem0.loc18_34.1 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc18_34.1: = specific_function %Convert.bound.loc18_34.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc18_34.1: init %i32 = call %Convert.specific_fn.loc18_34.1(%int_5.loc18_30) [template = constants.%int_5.2] @@ -81,7 +81,7 @@ fn Main() { // CHECK:STDOUT: %int_0.loc18: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %.loc18_34.3: ref %i32 = array_index %non_tuple.var, %int_0.loc18 // CHECK:STDOUT: %.loc18_34.4: init %i32 = initialize_from %.loc18_34.2 to %.loc18_34.3 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_34.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_34.2: = bound_method %int_5.loc18_33, %impl.elem0.loc18_34.2 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn.loc18_34.2: = specific_function %Convert.bound.loc18_34.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked.loc18_34.2: init %i32 = call %Convert.specific_fn.loc18_34.2(%int_5.loc18_33) [template = constants.%int_5.2] 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 ba8263fd0906d..e585b5e896e47 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 @@ -24,13 +24,13 @@ var b: i32 = a.2; // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_6.2) [template] @@ -64,14 +64,14 @@ var b: i32 = a.2; // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_27.1: %tuple.type.3 = tuple_literal (%int_12, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.1: = bound_method %int_12, %impl.elem0.loc11_27.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.1: = specific_function %Convert.bound.loc11_27.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_27.1: init %i32 = call %Convert.specific_fn.loc11_27.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_27.2: init %i32 = converted %int_12, %int.convert_checked.loc11_27.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_27.3: init %i32 = initialize_from %.loc11_27.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_27.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_27.2: = bound_method %int_6, %impl.elem0.loc11_27.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_27.2: = specific_function %Convert.bound.loc11_27.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_27.2: init %i32 = call %Convert.specific_fn.loc11_27.2(%int_6) [template = constants.%int_6.2] 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 c935b54f7dfd3..010a0a75abb47 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 @@ -24,13 +24,13 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_34.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_34.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_34.2: %i32 = int_value 34 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_12.2, %int_34.2) [template] @@ -66,14 +66,14 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] // CHECK:STDOUT: %int_34: Core.IntLiteral = int_value 34 [template = constants.%int_34.1] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_12, %int_34) -// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_12, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_12) [template = constants.%int_12.2] // CHECK:STDOUT: %.loc11_28.2: init %i32 = converted %int_12, %int.convert_checked.loc11_28.1 [template = constants.%int_12.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_28.3: init %i32 = initialize_from %.loc11_28.2 to %tuple.elem0 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_34, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_34) [template = constants.%int_34.2] diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index 9069ce6973bac..51558f801028f 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -24,10 +24,10 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %tuple.type.3: type = tuple_type (bool, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] // CHECK:STDOUT: %Convert.type.5: type = fn_type @Convert.1, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_34.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_34.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_34.2: %i32 = int_value 34 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%true, %int_34.2) [template] @@ -35,24 +35,24 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %struct_type.index.1: type = struct_type {.index: Core.IntLiteral} [template] // CHECK:STDOUT: %struct.1: %struct_type.index.1 = struct_value (%int_1.1) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.4, @As(%i32) [template] -// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.5, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.12) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.12 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.5(%int_32) [template] -// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.4, @As(%i32) [template] +// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.5, @impl.3(%int_32) [template] // CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] // CHECK:STDOUT: %interface.21: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.13 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_0.1, %Convert.13 [template] +// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.5(%int_32) [template] +// CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] +// CHECK:STDOUT: %Convert.type.14: type = fn_type @Convert.3, @impl.2(%int_32) [template] +// CHECK:STDOUT: %Convert.14: %Convert.type.14 = struct_value () [template] +// CHECK:STDOUT: %interface.22: = interface_witness (%Convert.14) [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_0.2, %Convert.14 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_1.1, %Convert.12 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_1.1, %Convert.13 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.5(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %struct_type.index.2: type = struct_type {.index: %i32} [template] // CHECK:STDOUT: %struct.2: %struct_type.index.2 = struct_value (%int_1.2) [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1.2, %Convert.13 [template] +// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_1.2, %Convert.14 [template] // CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.3(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -61,7 +61,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: .Bool = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 // CHECK:STDOUT: .ImplicitAs = %import_ref.6 -// CHECK:STDOUT: .As = %import_ref.230 +// CHECK:STDOUT: .As = %import_ref.233 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } @@ -93,7 +93,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %.loc11_31.1: %tuple.type.3 = tuple_literal (%true, %int_34) // CHECK:STDOUT: %tuple.elem0.loc11: ref bool = tuple_access file.%a.var, element0 // CHECK:STDOUT: %.loc11_31.2: init bool = initialize_from %true to %tuple.elem0.loc11 [template = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11: = bound_method %int_34, %impl.elem0.loc11 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11: = specific_function %Convert.bound.loc11, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %Convert.specific_fn.loc11(%int_34) [template = constants.%int_34.2] @@ -116,13 +116,13 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc13_20.1: %Convert.type.11 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.12] +// CHECK:STDOUT: %impl.elem0.loc13_20.1: %Convert.type.12 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.13] // CHECK:STDOUT: %Convert.bound.loc13_20.1: = bound_method %int_0, %impl.elem0.loc13_20.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc13_20.1: = specific_function %Convert.bound.loc13_20.1, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc13_20.1: init %i32 = call %Convert.specific_fn.loc13_20.1(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20.1 [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_0, %.loc13_20.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %impl.elem0.loc13_20.2: %Convert.type.5 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %impl.elem0.loc13_20.2: %Convert.type.5 = interface_witness_access constants.%interface.22, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %Convert.bound.loc13_20.2: = bound_method %.loc13_20.2, %impl.elem0.loc13_20.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc13_20.2: = specific_function %Convert.bound.loc13_20.2, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc13_20.2: init Core.IntLiteral = call %Convert.specific_fn.loc13_20.2(%.loc13_20.2) [template = constants.%int_0.1] @@ -135,7 +135,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc14_29: %Convert.type.11 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.12] +// CHECK:STDOUT: %impl.elem0.loc14_29: %Convert.type.12 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.13] // CHECK:STDOUT: %Convert.bound.loc14_29: = bound_method %int_1.loc14, %impl.elem0.loc14_29 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc14_29: = specific_function %Convert.bound.loc14_29, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc14_29: init %i32 = call %Convert.specific_fn.loc14_29(%int_1.loc14) [template = constants.%int_1.2] @@ -145,7 +145,7 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: %struct.loc14: %struct_type.index.2 = struct_value (%.loc14_29.2) [template = constants.%struct.2] // CHECK:STDOUT: %.loc14_35.2: %struct_type.index.2 = converted %.loc14_35.1, %struct.loc14 [template = constants.%struct.2] // CHECK:STDOUT: %.loc14_36.1: %i32 = struct_access %.loc14_35.2, element0 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_36: %Convert.type.5 = interface_witness_access constants.%interface.21, element0 [template = constants.%Convert.13] +// CHECK:STDOUT: %impl.elem0.loc14_36: %Convert.type.5 = interface_witness_access constants.%interface.22, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %Convert.bound.loc14_36: = bound_method %.loc14_36.1, %impl.elem0.loc14_36 [template = constants.%Convert.bound.5] // CHECK:STDOUT: %Convert.specific_fn.loc14_36: = specific_function %Convert.bound.loc14_36, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.5] // CHECK:STDOUT: %int.convert_checked.loc14_36: init Core.IntLiteral = call %Convert.specific_fn.loc14_36(%.loc14_36.1) [template = constants.%int_1.1] diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index 7c14bf088c14c..32e231a28c251 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -26,10 +26,10 @@ fn Run() -> i32 { // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_0.2) [template] @@ -81,7 +81,7 @@ fn Run() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc11_30.1: %tuple.type.3 = tuple_literal (%int_0) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index 6a706f17546c4..60247960e0c0f 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -26,10 +26,10 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, f64) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -58,7 +58,7 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template = constants.%float] // CHECK:STDOUT: %.loc17_30.1: %tuple.type.3 = tuple_literal (%int_2, %float) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_2, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 08bdb0906afad..cefe2aa425b09 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -62,10 +62,10 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_0.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_0.2: %i32 = int_value 0 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.2 = tuple_value (%int_0.2) [template] @@ -79,14 +79,14 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3.1: 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: %Convert.bound.2: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] // CHECK:STDOUT: %tuple.2: %tuple.type.7 = tuple_value (%tuple.1, %int_1.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.4: = specific_function %Convert.bound.4, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_3.2: %i32 = int_value 3 [template] // CHECK:STDOUT: %tuple.3: %tuple.type.8 = tuple_value (%int_2.2, %int_3.2) [template] @@ -149,13 +149,13 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc9_18.1: %tuple.type.12 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc9_18.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9_18.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9_18.1: = bound_method %int_1, %impl.elem0.loc9_18.1 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc9_18.1: = specific_function %Convert.bound.loc9_18.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc9_18.1: init %i32 = call %Convert.specific_fn.loc9_18.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_18.2: %i32 = value_of_initializer %int.convert_checked.loc9_18.1 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc9_18.3: %i32 = converted %int_1, %.loc9_18.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc9_18.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc9_18.2: = bound_method %int_2, %impl.elem0.loc9_18.2 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc9_18.2: = specific_function %Convert.bound.loc9_18.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc9_18.2: init %i32 = call %Convert.specific_fn.loc9_18.2(%int_2) [template = constants.%int_2.2] @@ -190,7 +190,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc4: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc4_24.1: %tuple.type.3 = tuple_literal (%int_0.loc4) -// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc4: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc4: = bound_method %int_0.loc4, %impl.elem0.loc4 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc4: = specific_function %Convert.bound.loc4, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %Convert.specific_fn.loc4(%int_0.loc4) [template = constants.%int_0.2] @@ -206,7 +206,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] // CHECK:STDOUT: %.loc5_59.1: %tuple.type.12 = tuple_literal (%int_2, %int_3) // CHECK:STDOUT: %.loc5_60.1: %tuple.type.13 = tuple_literal (%.loc5_51.1, %.loc5_59.1) -// CHECK:STDOUT: %impl.elem0.loc5_47: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5_47: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5_47: = bound_method %int_0.loc5, %impl.elem0.loc5_47 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc5_47: = specific_function %Convert.bound.loc5_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc5_47: init %i32 = call %Convert.specific_fn.loc5_47(%int_0.loc5) [template = constants.%int_0.2] @@ -216,7 +216,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_47.3: init %tuple.type.2 = tuple_init (%.loc5_47.2) to %tuple.elem0.loc5_51 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.2: init %tuple.type.2 = converted %.loc5_47.1, %.loc5_47.3 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc5_51.3: init %tuple.type.2 = initialize_from %.loc5_51.2 to %tuple.elem0.loc5_51 [template = constants.%tuple.1] -// CHECK:STDOUT: %impl.elem0.loc5_51: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5_51: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5_51: = bound_method %int_1, %impl.elem0.loc5_51 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc5_51: = specific_function %Convert.bound.loc5_51, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc5_51: init %i32 = call %Convert.specific_fn.loc5_51(%int_1) [template = constants.%int_1.2] @@ -225,7 +225,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc5_51.5: init %i32 = initialize_from %.loc5_51.4 to %tuple.elem1.loc5_51 [template = constants.%int_1.2] // CHECK:STDOUT: %.loc5_51.6: init %tuple.type.7 = tuple_init (%.loc5_51.3, %.loc5_51.5) to %tuple.elem0.loc5_60 [template = constants.%tuple.2] // CHECK:STDOUT: %.loc5_60.2: init %tuple.type.7 = converted %.loc5_51.1, %.loc5_51.6 [template = constants.%tuple.2] -// CHECK:STDOUT: %impl.elem0.loc5_59.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5_59.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5_59.1: = bound_method %int_2, %impl.elem0.loc5_59.1 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc5_59.1: = specific_function %Convert.bound.loc5_59.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc5_59.1: init %i32 = call %Convert.specific_fn.loc5_59.1(%int_2) [template = constants.%int_2.2] @@ -233,7 +233,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.elem1.loc5_60: ref %tuple.type.8 = tuple_access file.%b_ref.var, element1 // CHECK:STDOUT: %tuple.elem0.loc5_59: ref %i32 = tuple_access %tuple.elem1.loc5_60, element0 // CHECK:STDOUT: %.loc5_59.3: init %i32 = initialize_from %.loc5_59.2 to %tuple.elem0.loc5_59 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc5_59.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc5_59.2: = bound_method %int_3, %impl.elem0.loc5_59.2 [template = constants.%Convert.bound.4] // CHECK:STDOUT: %Convert.specific_fn.loc5_59.2: = specific_function %Convert.bound.loc5_59.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] // CHECK:STDOUT: %int.convert_checked.loc5_59.2: init %i32 = call %Convert.specific_fn.loc5_59.2(%int_3) [template = constants.%int_3.2] @@ -287,13 +287,13 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int = %import_ref.230 -// CHECK:STDOUT: .ImplicitAs = %import_ref.233 +// CHECK:STDOUT: .Int = %import_ref.233 +// CHECK:STDOUT: .ImplicitAs = %import_ref.236 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.231: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.232 = import_ref Implicit//default, inst1023 [no loc], unloaded +// CHECK:STDOUT: %import_ref.234: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.235 = import_ref Implicit//default, inst1064 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -326,8 +326,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.232 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.231 +// CHECK:STDOUT: .Self = imports.%import_ref.235 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.234 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -420,8 +420,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.230: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.231 = import_ref Implicit//default, inst1023 [no loc], unloaded +// CHECK:STDOUT: %import_ref.233: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.234 = import_ref Implicit//default, inst1064 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -448,8 +448,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.231 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.230 +// CHECK:STDOUT: .Self = imports.%import_ref.234 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.233 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -506,12 +506,12 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %import_ref.3: %C.type = import_ref Implicit//default, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.4: %F.type = import_ref Implicit//default, F, loaded [template = constants.%F] // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .ImplicitAs = %import_ref.232 +// CHECK:STDOUT: .ImplicitAs = %import_ref.235 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.230: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.231 = import_ref Implicit//default, inst1023 [no loc], unloaded +// CHECK:STDOUT: %import_ref.233: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] +// CHECK:STDOUT: %import_ref.234 = import_ref Implicit//default, inst1064 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -538,8 +538,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: !members: -// CHECK:STDOUT: .Self = imports.%import_ref.231 -// CHECK:STDOUT: complete_type_witness = imports.%import_ref.230 +// CHECK:STDOUT: .Self = imports.%import_ref.234 +// CHECK:STDOUT: complete_type_witness = imports.%import_ref.233 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index 967f492937712..afcaa19dbe21b 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -23,17 +23,17 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.6, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_12.2: %i32 = int_value 12 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_76.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_76.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_76.2: %i32 = int_value 76 [template] // CHECK:STDOUT: %tuple.1: %tuple.type.3 = tuple_value (%int_12.2, %int_76.2) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_6.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_6.2: %i32 = int_value 6 [template] // CHECK:STDOUT: %tuple.2: %tuple.type.4 = tuple_value (%tuple.1, %int_6.2) [template] @@ -65,7 +65,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.1: %tuple.type.6 = tuple_literal (%int_12, %int_76) // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.1] // CHECK:STDOUT: %.loc11_40.1: %tuple.type.7 = tuple_literal (%.loc11_36.1, %int_6) -// CHECK:STDOUT: %impl.elem0.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_36.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_36.1: = bound_method %int_12, %impl.elem0.loc11_36.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_36.1: = specific_function %Convert.bound.loc11_36.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_36.1: init %i32 = call %Convert.specific_fn.loc11_36.1(%int_12) [template = constants.%int_12.2] @@ -73,7 +73,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %tuple.elem0.loc11_40: ref %tuple.type.3 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %tuple.elem0.loc11_36: ref %i32 = tuple_access %tuple.elem0.loc11_40, element0 // CHECK:STDOUT: %.loc11_36.3: init %i32 = initialize_from %.loc11_36.2 to %tuple.elem0.loc11_36 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_36.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_36.2: = bound_method %int_76, %impl.elem0.loc11_36.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_36.2: = specific_function %Convert.bound.loc11_36.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_36.2: init %i32 = call %Convert.specific_fn.loc11_36.2(%int_76) [template = constants.%int_76.2] @@ -82,7 +82,7 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: %.loc11_36.5: init %i32 = initialize_from %.loc11_36.4 to %tuple.elem1.loc11_36 [template = constants.%int_76.2] // CHECK:STDOUT: %.loc11_36.6: init %tuple.type.3 = tuple_init (%.loc11_36.3, %.loc11_36.5) to %tuple.elem0.loc11_40 [template = constants.%tuple.1] // CHECK:STDOUT: %.loc11_40.2: init %tuple.type.3 = converted %.loc11_36.1, %.loc11_36.6 [template = constants.%tuple.1] -// CHECK:STDOUT: %impl.elem0.loc11_40: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_40: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_40: = bound_method %int_6, %impl.elem0.loc11_40 [template = constants.%Convert.bound.3] // CHECK:STDOUT: %Convert.specific_fn.loc11_40: = specific_function %Convert.bound.loc11_40, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] // CHECK:STDOUT: %int.convert_checked.loc11_40: init %i32 = call %Convert.specific_fn.loc11_40(%int_6) [template = constants.%int_6.2] diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 3ab706e3ac193..3f2076ca1524c 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -37,13 +37,13 @@ fn H() { // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.9: type = tuple_type (Core.IntLiteral, %tuple.type.2, Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] // CHECK:STDOUT: } @@ -113,14 +113,14 @@ fn H() { // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() to %tuple.elem1 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc18_50.1: %tuple.type.9 = tuple_literal (%int_1, %F.call, %int_2) -// CHECK:STDOUT: %impl.elem0.loc18_50.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_50.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_50.1: = bound_method %int_1, %impl.elem0.loc18_50.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc18_50.1: = specific_function %Convert.bound.loc18_50.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc18_50.1: init %i32 = call %Convert.specific_fn.loc18_50.1(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc18_50.2: init %i32 = converted %int_1, %int.convert_checked.loc18_50.1 [template = constants.%int_1.2] // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access %v.var, element0 // CHECK:STDOUT: %.loc18_50.3: init %i32 = initialize_from %.loc18_50.2 to %tuple.elem0 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc18_50.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc18_50.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc18_50.2: = bound_method %int_2, %impl.elem0.loc18_50.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc18_50.2: = specific_function %Convert.bound.loc18_50.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc18_50.2: init %i32 = call %Convert.specific_fn.loc18_50.2(%int_2) [template = constants.%int_2.2] diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index 252016c7bbbfc..213ad5d796fa2 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -20,10 +20,10 @@ var y: (i32,) = x; // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: %Convert.type.2: type = fn_type @Convert.1, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_4.2) [template] @@ -55,7 +55,7 @@ var y: (i32,) = x; // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%int_4) -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound: = bound_method %int_4, %impl.elem0 [template = constants.%Convert.bound] // CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn] // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_4) [template = constants.%int_4.2] diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index 038319041f6d4..4c06b06bfe329 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -24,13 +24,13 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %int_102.1: Core.IntLiteral = int_value 102 [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.10: type = fn_type @Convert.2, @impl.1(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.19: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @impl.1(%int_32) [template] +// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] +// CHECK:STDOUT: %interface.20: = interface_witness (%Convert.11) [template] +// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_4.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_4.2: %i32 = int_value 4 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_102.1, %Convert.10 [template] +// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_102.1, %Convert.11 [template] // CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_102.2: %i32 = int_value 102 [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_4.2, %int_102.2) [template] @@ -65,13 +65,13 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %int_4.loc11: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_102.loc11: Core.IntLiteral = int_value 102 [template = constants.%int_102.1] // CHECK:STDOUT: %.loc11_28.1: %tuple.type.3 = tuple_literal (%int_4.loc11, %int_102.loc11) -// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_28.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_28.1: = bound_method %int_4.loc11, %impl.elem0.loc11_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.1: = specific_function %Convert.bound.loc11_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc11_28.1: init %i32 = call %Convert.specific_fn.loc11_28.1(%int_4.loc11) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc11_28.2: %i32 = value_of_initializer %int.convert_checked.loc11_28.1 [template = constants.%int_4.2] // CHECK:STDOUT: %.loc11_28.3: %i32 = converted %int_4.loc11, %.loc11_28.2 [template = constants.%int_4.2] -// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc11_28.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc11_28.2: = bound_method %int_102.loc11, %impl.elem0.loc11_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc11_28.2: = specific_function %Convert.bound.loc11_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc11_28.2: init %i32 = call %Convert.specific_fn.loc11_28.2(%int_102.loc11) [template = constants.%int_102.2] @@ -85,14 +85,14 @@ var y: (i32, i32) = x; // CHECK:STDOUT: %int_4.loc14: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] // CHECK:STDOUT: %int_102.loc14: Core.IntLiteral = int_value 102 [template = constants.%int_102.1] // CHECK:STDOUT: %.loc14_28.1: %tuple.type.3 = tuple_literal (%int_4.loc14, %int_102.loc14) -// CHECK:STDOUT: %impl.elem0.loc14_28.1: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_28.1: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_28.1: = bound_method %int_4.loc14, %impl.elem0.loc14_28.1 [template = constants.%Convert.bound.1] // CHECK:STDOUT: %Convert.specific_fn.loc14_28.1: = specific_function %Convert.bound.loc14_28.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] // CHECK:STDOUT: %int.convert_checked.loc14_28.1: init %i32 = call %Convert.specific_fn.loc14_28.1(%int_4.loc14) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc14_28.2: init %i32 = converted %int_4.loc14, %int.convert_checked.loc14_28.1 [template = constants.%int_4.2] // CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access file.%x.var, element0 // CHECK:STDOUT: %.loc14_28.3: init %i32 = initialize_from %.loc14_28.2 to %tuple.elem0.loc14 [template = constants.%int_4.2] -// CHECK:STDOUT: %impl.elem0.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%interface.19, element0 [template = constants.%Convert.10] +// CHECK:STDOUT: %impl.elem0.loc14_28.2: %Convert.type.2 = interface_witness_access constants.%interface.20, element0 [template = constants.%Convert.11] // CHECK:STDOUT: %Convert.bound.loc14_28.2: = bound_method %int_102.loc14, %impl.elem0.loc14_28.2 [template = constants.%Convert.bound.2] // CHECK:STDOUT: %Convert.specific_fn.loc14_28.2: = specific_function %Convert.bound.loc14_28.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] // CHECK:STDOUT: %int.convert_checked.loc14_28.2: init %i32 = call %Convert.specific_fn.loc14_28.2(%int_102.loc14) [template = constants.%int_102.2] diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index 46b827f525474..bf5008f2d6a30 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -44,11 +44,11 @@ fn G() { // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %d.var, ptr align 1 @D.val.loc19_16, i64 0, i1 false), !dbg !9 // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %n.var), !dbg !7 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !10 -// CHECK:STDOUT: call void @_CF.Main.118(ptr %c.var), !dbg !11 -// CHECK:STDOUT: call void @_CF.Main.119(ptr %d.var), !dbg !12 +// CHECK:STDOUT: call void @_CF.Main.129(ptr %c.var), !dbg !11 +// CHECK:STDOUT: call void @_CF.Main.130(ptr %d.var), !dbg !12 // CHECK:STDOUT: %.loc24 = load i32, ptr %n.var, align 4, !dbg !13 -// CHECK:STDOUT: call void @_CF.Main.120(i32 %.loc24), !dbg !14 -// CHECK:STDOUT: call void @_CF.Main.121(%type zeroinitializer), !dbg !15 +// CHECK:STDOUT: call void @_CF.Main.131(i32 %.loc24), !dbg !14 +// CHECK:STDOUT: call void @_CF.Main.132(%type zeroinitializer), !dbg !15 // CHECK:STDOUT: ret void, !dbg !16 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,13 +58,13 @@ fn G() { // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1 // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.118(ptr) +// CHECK:STDOUT: declare void @_CF.Main.129(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.119(ptr) +// CHECK:STDOUT: declare void @_CF.Main.130(ptr) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.120(i32) +// CHECK:STDOUT: declare void @_CF.Main.131(i32) // CHECK:STDOUT: -// CHECK:STDOUT: declare void @_CF.Main.121(%type) +// CHECK:STDOUT: declare void @_CF.Main.132(%type) // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 2, 1, 0 } diff --git a/toolchain/lower/testdata/function/generic/call_method.carbon b/toolchain/lower/testdata/function/generic/call_method.carbon index 9dcd371b8628e..ff116d7003117 100644 --- a/toolchain/lower/testdata/function/generic/call_method.carbon +++ b/toolchain/lower/testdata/function/generic/call_method.carbon @@ -34,7 +34,7 @@ fn CallF() -> i32 { // CHECK:STDOUT: call void @llvm.lifetime.start.p0(i64 4, ptr %n.var), !dbg !7 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !9 // CHECK:STDOUT: %.loc20_14 = load i32, ptr %n.var, align 4, !dbg !10 -// CHECK:STDOUT: %F.call = call i32 @_CF.C.Main.118(ptr %c.var, i32 %.loc20_14), !dbg !11 +// CHECK:STDOUT: %F.call = call i32 @_CF.C.Main.129(ptr %c.var, i32 %.loc20_14), !dbg !11 // CHECK:STDOUT: ret i32 %F.call, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -44,7 +44,7 @@ fn CallF() -> i32 { // CHECK:STDOUT: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) // CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1 // CHECK:STDOUT: -// CHECK:STDOUT: declare i32 @_CF.C.Main.118(ptr, i32) +// CHECK:STDOUT: declare i32 @_CF.C.Main.129(ptr, i32) // CHECK:STDOUT: // CHECK:STDOUT: ; uselistorder directives // CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 1, 0 } From 4ddda4bd17801b57ef520eed4366dab83b983dcd Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 3 Jan 2025 00:54:32 +0000 Subject: [PATCH 3/4] Add test for compile-time conversion. --- .../testdata/builtins/int/convert.carbon | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 toolchain/check/testdata/builtins/int/convert.carbon diff --git a/toolchain/check/testdata/builtins/int/convert.carbon b/toolchain/check/testdata/builtins/int/convert.carbon new file mode 100644 index 0000000000000..91970fadfaeee --- /dev/null +++ b/toolchain/check/testdata/builtins/int/convert.carbon @@ -0,0 +1,226 @@ +// 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 +// +// EXTRA-ARGS: --no-dump-sem-ir +// +// AUTOUPDATE +// TIP: To test this file alone, run: +// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/builtins/int/convert.carbon +// TIP: To dump output, run: +// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/builtins/int/convert.carbon + +// --- int_ops.carbon + +library "[[@TEST_NAME]]"; + +// Size preserving +fn Int32ToInt32(a: i32) -> i32 = "int.convert"; +fn Int32ToUint32(a: i32) -> u32 = "int.convert"; +fn Uint32ToInt32(a: u32) -> i32 = "int.convert"; +fn Uint32ToUint32(a: u32) -> u32 = "int.convert"; +fn IntLiteralToIntLiteral(a: Core.IntLiteral()) -> Core.IntLiteral() = "int.convert"; + +// Narrowing +fn Int32ToInt16(a: i32) -> i16 = "int.convert"; +fn Int32ToUint16(a: i32) -> u16 = "int.convert"; +fn Uint32ToInt16(a: u32) -> i16 = "int.convert"; +fn Uint32ToUint16(a: u32) -> u16 = "int.convert"; +fn IntLiteralToInt16(a: Core.IntLiteral()) -> i16 = "int.convert"; +fn IntLiteralToUint16(a: Core.IntLiteral()) -> u16 = "int.convert"; + +// Widening +fn Int32ToInt64(a: i32) -> i64 = "int.convert"; +fn Int32ToUint64(a: i32) -> u64 = "int.convert"; +fn Uint32ToInt64(a: u32) -> i64 = "int.convert"; +fn Uint32ToUint64(a: u32) -> u64 = "int.convert"; +fn Int32ToIntLiteral(a: i32) -> Core.IntLiteral() = "int.convert"; +fn Uint32ToIntLiteral(a: u32) -> Core.IntLiteral() = "int.convert"; + +class Expect[T:! type](N:! T) {} +fn Test[T:! type](N:! T) -> Expect(N) { return {}; } + +// --- fail_self_test.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +fn F() { + // Ensure our testing machinery works. + // CHECK:STDERR: fail_self_test.carbon:[[@LINE+7]]:3: error: cannot convert from `Expect(0)` to `Expect(1)` with `as` [ExplicitAsConversionFailure] + // CHECK:STDERR: Test(Int32ToInt32(0)) as Expect(1 as i32); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: fail_self_test.carbon:[[@LINE+4]]:3: note: type `Expect(0)` does not implement interface `Core.As(Expect(1))` [MissingImplInMemberAccessNote] + // CHECK:STDERR: Test(Int32ToInt32(0)) as Expect(1 as i32); + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: + Test(Int32ToInt32(0)) as Expect(1 as i32); +} + +// --- identity.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +fn F() { + Test(Int32ToInt32(-0x8000_0000)) as Expect(-0x8000_0000 as i32); + Test(Int32ToInt32(-1)) as Expect(-1 as i32); + Test(Int32ToInt32(0)) as Expect(0 as i32); + Test(Int32ToInt32(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as i32); + + Test(Uint32ToUint32(0)) as Expect(0 as u32); + Test(Uint32ToUint32(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as u32); + Test(Uint32ToUint32(0x8000_0000)) as Expect(0x8000_0000 as u32); + Test(Uint32ToUint32(0xFFFF_FFFF)) as Expect(0xFFFF_FFFF as u32); + + Test(IntLiteralToIntLiteral(0x1_0000_0000_0000_0000)) as + Expect(0x1_0000_0000_0000_0000); + Test(IntLiteralToIntLiteral(-1)) as Expect(-1); +} + +// --- same_size.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +fn F() { + Test(Int32ToUint32(-0x8000_0000)) as Expect(0x8000_0000 as u32); + Test(Int32ToUint32(-1)) as Expect(0xFFFF_FFFF as u32); + Test(Int32ToUint32(0)) as Expect(0 as u32); + Test(Int32ToUint32(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as u32); + + Test(Uint32ToInt32(0)) as Expect(0 as i32); + Test(Uint32ToInt32(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as i32); + Test(Uint32ToInt32(0x8000_0000)) as Expect(-0x8000_0000 as i32); + Test(Uint32ToInt32(0xFFFF_FFFF)) as Expect(-1 as i32); +} + +// --- truncate.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +fn F() { + Test(Int32ToInt16(-0x8000_0000)) as Expect(0 as i16); + Test(Int32ToInt16(-0x7FFF_EDCC)) as Expect(0x1234 as i16); + Test(Int32ToInt16(-0x7FFF_1234)) as Expect(-0x1234 as i16); + Test(Int32ToInt16(-0x8000)) as Expect(-0x8000 as i16); + Test(Int32ToInt16(-1)) as Expect(-1 as i16); + Test(Int32ToInt16(0)) as Expect(0 as i16); + Test(Int32ToInt16(0x7FFF)) as Expect(0x7FFF as i16); + Test(Int32ToInt16(0xFFFF)) as Expect(-1 as i16); + Test(Int32ToInt16(0x7FFF_1234)) as Expect(0x1234 as i16); + Test(Int32ToInt16(0x7FFF_EDCC)) as Expect(-0x1234 as i16); + Test(Int32ToInt16(0x7FFF_FFFF)) as Expect(-1 as i16); + + Test(Int32ToUint16(-0x8000_0000)) as Expect(0 as u16); + Test(Int32ToUint16(-0x7FFF_EDCC)) as Expect(0x1234 as u16); + Test(Int32ToUint16(-0x7FFF_1234)) as Expect(0xEDCC as u16); + Test(Int32ToUint16(-0x8000)) as Expect(0x8000 as u16); + Test(Int32ToUint16(-1)) as Expect(0xFFFF as u16); + Test(Int32ToUint16(0)) as Expect(0 as u16); + Test(Int32ToUint16(0x7FFF)) as Expect(0x7FFF as u16); + Test(Int32ToUint16(0xFFFF)) as Expect(0xFFFF as u16); + Test(Int32ToUint16(0x7FFF_1234)) as Expect(0x1234 as u16); + Test(Int32ToUint16(0x7FFF_EDCC)) as Expect(0xEDCC as u16); + Test(Int32ToUint16(0x7FFF_FFFF)) as Expect(0xFFFF as u16); + + Test(Uint32ToInt16(0x8000_0000)) as Expect(0 as i16); + Test(Uint32ToInt16(0xFFFF_1234)) as Expect(0x1234 as i16); + Test(Uint32ToInt16(0xFFFF_EDCC)) as Expect(-0x1234 as i16); + Test(Uint32ToInt16(0xFFFF_8000)) as Expect(-0x8000 as i16); + Test(Uint32ToInt16(0xFFFF_FFFF)) as Expect(-1 as i16); + Test(Uint32ToInt16(0)) as Expect(0 as i16); + Test(Uint32ToInt16(0x7FFF)) as Expect(0x7FFF as i16); + Test(Uint32ToInt16(0xFFFF)) as Expect(-1 as i16); + Test(Uint32ToInt16(0x7FFF_1234)) as Expect(0x1234 as i16); + Test(Uint32ToInt16(0x7FFF_EDCC)) as Expect(-0x1234 as i16); + Test(Uint32ToInt16(0x7FFF_FFFF)) as Expect(-1 as i16); + + Test(Uint32ToUint16(0x8000_0000)) as Expect(0 as u16); + Test(Uint32ToUint16(0xFFFF_1234)) as Expect(0x1234 as u16); + Test(Uint32ToUint16(0xFFFF_EDCC)) as Expect(0xEDCC as u16); + Test(Uint32ToUint16(0xFFFF_8000)) as Expect(0x8000 as u16); + Test(Uint32ToUint16(0xFFFF_FFFF)) as Expect(0xFFFF as u16); + Test(Uint32ToUint16(0)) as Expect(0 as u16); + Test(Uint32ToUint16(0x7FFF)) as Expect(0x7FFF as u16); + Test(Uint32ToUint16(0xFFFF)) as Expect(0xFFFF as u16); + Test(Uint32ToUint16(0x7FFF_1234)) as Expect(0x1234 as u16); + Test(Uint32ToUint16(0x7FFF_EDCC)) as Expect(0xEDCC as u16); + Test(Uint32ToUint16(0x7FFF_FFFF)) as Expect(0xFFFF as u16); + + Test(IntLiteralToInt16(0)) as Expect(0 as i16); + Test(IntLiteralToInt16(0x7FFF)) as Expect(0x7FFF as i16); + Test(IntLiteralToInt16(0x8000)) as Expect(-0x8000 as i16); + Test(IntLiteralToInt16(0xFFFF)) as Expect(-1 as i16); + Test(IntLiteralToInt16(0x1_2345)) as Expect(0x2345 as i16); + Test(IntLiteralToInt16(-1)) as Expect(-1 as i16); + + Test(IntLiteralToUint16(0)) as Expect(0 as u16); + Test(IntLiteralToUint16(0x7FFF)) as Expect(0x7FFF as u16); + Test(IntLiteralToUint16(0x8000)) as Expect(0x8000 as u16); + Test(IntLiteralToUint16(0xFFFF)) as Expect(0xFFFF as u16); + Test(IntLiteralToUint16(0x1_2345)) as Expect(0x2345 as u16); + Test(IntLiteralToUint16(-1)) as Expect(0xFFFF as u16); +} + +// --- zero_extend.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +fn F() { + Test(Uint32ToInt64(0)) as Expect(0 as i64); + Test(Uint32ToInt64(0x1234_5678)) as Expect(0x1234_5678 as i64); + Test(Uint32ToInt64(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as i64); + Test(Uint32ToInt64(0x8000_0000)) as Expect(0x8000_0000 as i64); + Test(Uint32ToInt64(0xFFFF_FFFF)) as Expect(0xFFFF_FFFF as i64); + + Test(Uint32ToUint64(0)) as Expect(0 as u64); + Test(Uint32ToUint64(0x1234_5678)) as Expect(0x1234_5678 as u64); + Test(Uint32ToUint64(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as u64); + Test(Uint32ToUint64(0x8000_0000)) as Expect(0x8000_0000 as u64); + Test(Uint32ToUint64(0xFFFF_FFFF)) as Expect(0xFFFF_FFFF as u64); + + Test(Uint32ToIntLiteral(0x1234_5678)) as Expect(0x1234_5678); + Test(Uint32ToIntLiteral(0x8765_4321)) as Expect(0x8765_4321); + Test(Uint32ToIntLiteral(0xFFFF_FFFF)) as Expect(0xFFFF_FFFF); +} + +// --- sign_extend.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +fn F() { + Test(Int32ToInt64(0)) as Expect(0 as i64); + Test(Int32ToInt64(0x1234_5678)) as Expect(0x1234_5678 as i64); + Test(Int32ToInt64(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as i64); + Test(Int32ToInt64(-1)) as Expect(-1 as i64); + + Test(Int32ToUint64(0)) as Expect(0 as u64); + Test(Int32ToUint64(0x1234_5678)) as Expect(0x1234_5678 as u64); + Test(Int32ToUint64(0x7FFF_FFFF)) as Expect(0x7FFF_FFFF as u64); + Test(Int32ToUint64(-1)) as Expect(0xFFFF_FFFF_FFFF_FFFF as u64); + Test(Int32ToUint64(-0x8000_0000)) as Expect(0xFFFF_FFFF_8000_0000 as u64); + + Test(Int32ToIntLiteral(0x1234_5678)) as Expect(0x1234_5678); + Test(Int32ToIntLiteral(-0x1234_5678)) as Expect(-0x1234_5678); + Test(Int32ToIntLiteral(-1)) as Expect(-1); +} + +// --- fail_not_constant.carbon + +library "[[@TEST_NAME]]"; +import library "int_ops"; + +let not_constant: Core.IntLiteral() = 0; + +// CHECK:STDERR: fail_not_constant.carbon:[[@LINE+7]]:33: error: non-constant call to compile-time-only function [NonConstantCallToCompTimeOnlyFunction] +// CHECK:STDERR: let convert_not_constant: i16 = IntLiteralToInt16(not_constant); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: fail_not_constant.carbon:[[@LINE-7]]:1: in import [InImport] +// CHECK:STDERR: int_ops.carbon:16:1: note: compile-time-only function declared here [CompTimeOnlyFunctionHere] +// CHECK:STDERR: fn IntLiteralToInt16(a: Core.IntLiteral()) -> i16 = "int.convert"; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +let convert_not_constant: i16 = IntLiteralToInt16(not_constant); From b59c307af7709b17bd39577224fc24e159d89b11 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 3 Jan 2025 01:04:12 +0000 Subject: [PATCH 4/4] Add lowering tests and fix a bug. --- toolchain/lower/handle_call.cpp | 21 +- toolchain/lower/testdata/builtins/int.carbon | 211 ++++++++++++++++--- 2 files changed, 196 insertions(+), 36 deletions(-) diff --git a/toolchain/lower/handle_call.cpp b/toolchain/lower/handle_call.cpp index 74ea0c3b3f4cb..bff3b6a170534 100644 --- a/toolchain/lower/handle_call.cpp +++ b/toolchain/lower/handle_call.cpp @@ -67,13 +67,22 @@ static auto IsSignedInt(FunctionContext& context, SemIR::InstId int_id) // Creates a zext or sext instruction depending on the signedness of the // operand. -static auto CreateZExtOrSExt(FunctionContext& context, llvm::Value* value, - llvm::Type* type, bool is_signed, - const llvm::Twine& name = "") -> llvm::Value* { +static auto CreateExt(FunctionContext& context, llvm::Value* value, + llvm::Type* type, bool is_signed, + const llvm::Twine& name = "") -> llvm::Value* { return is_signed ? context.builder().CreateSExt(value, type, name) : context.builder().CreateZExt(value, type, name); } +// Creates a zext, sext, or trunc instruction depending on the signedness of the +// operand. +static auto CreateExtOrTrunc(FunctionContext& context, llvm::Value* value, + llvm::Type* type, bool is_signed, + const llvm::Twine& name = "") -> llvm::Value* { + return is_signed ? context.builder().CreateSExtOrTrunc(value, type, name) + : context.builder().CreateZExtOrTrunc(value, type, name); +} + // Handles a call to a builtin integer bit shift operator. static auto HandleIntShift(FunctionContext& context, SemIR::InstId inst_id, llvm::Instruction::BinaryOps bin_op, @@ -129,8 +138,8 @@ static auto HandleIntComparison(FunctionContext& context, SemIR::InstId inst_id, auto* cmp_type = llvm::IntegerType::get(context.llvm_context(), cmp_width); // Widen the operands as needed. - lhs = CreateZExtOrSExt(context, lhs, cmp_type, lhs_signed, "lhs"); - rhs = CreateZExtOrSExt(context, rhs, cmp_type, rhs_signed, "rhs"); + lhs = CreateExt(context, lhs, cmp_type, lhs_signed, "lhs"); + rhs = CreateExt(context, rhs, cmp_type, rhs_signed, "rhs"); context.SetLocal( inst_id, @@ -207,7 +216,7 @@ static auto HandleBuiltinCall(FunctionContext& context, SemIR::InstId inst_id, case SemIR::BuiltinFunctionKind::IntConvert: { context.SetLocal( inst_id, - CreateZExtOrSExt( + CreateExtOrTrunc( context, context.GetValue(arg_ids[0]), context.GetType(context.sem_ir().insts().Get(inst_id).type_id()), IsSignedInt(context, arg_ids[0]))); diff --git a/toolchain/lower/testdata/builtins/int.carbon b/toolchain/lower/testdata/builtins/int.carbon index d9273ef196cef..015d3e5ab45a3 100644 --- a/toolchain/lower/testdata/builtins/int.carbon +++ b/toolchain/lower/testdata/builtins/int.carbon @@ -105,6 +105,8 @@ fn TestRightShiftLargerUU(a: u16, b: u32) -> u16 { return RightShiftLargerUU(a, // --- mixed_compare.carbon +library "[[@TEST_NAME]]"; + fn Eq_u16_u32(a: u16, b: u32) -> bool = "int.eq"; fn Eq_i16_u32(a: i16, b: u32) -> bool = "int.eq"; fn Eq_u16_i32(a: u16, b: i32) -> bool = "int.eq"; @@ -129,6 +131,43 @@ fn TestLess_u16_i32(a: u16, b: i32) -> bool { return Less_u16_i32(a, b); } fn TestLess_i16_i32(a: i16, b: i32) -> bool { return Less_i16_i32(a, b); } fn TestLess_i32_u32(a: i32, b: u32) -> bool { return Less_i32_u32(a, b); } +// --- convert.carbon + +library "[[@TEST_NAME]]"; + +// Size preserving +fn Int32ToInt32(a: i32) -> i32 = "int.convert"; +fn Int32ToUint32(a: i32) -> u32 = "int.convert"; +fn Uint32ToInt32(a: u32) -> i32 = "int.convert"; +fn Uint32ToUint32(a: u32) -> u32 = "int.convert"; + +fn TestInt32ToInt32(a: i32) -> i32 { return Int32ToInt32(a); } +fn TestInt32ToUint32(a: i32) -> u32 { return Int32ToUint32(a); } +fn TestUint32ToInt32(a: u32) -> i32 { return Uint32ToInt32(a); } +fn TestUint32ToUint32(a: u32) -> u32 { return Uint32ToUint32(a); } + +// Narrowing +fn Int32ToInt16(a: i32) -> i16 = "int.convert"; +fn Int32ToUint16(a: i32) -> u16 = "int.convert"; +fn Uint32ToInt16(a: u32) -> i16 = "int.convert"; +fn Uint32ToUint16(a: u32) -> u16 = "int.convert"; + +fn TestInt32ToInt16(a: i32) -> i16 { return Int32ToInt16(a); } +fn TestInt32ToUint16(a: i32) -> u16 { return Int32ToUint16(a); } +fn TestUint32ToInt16(a: u32) -> i16 { return Uint32ToInt16(a); } +fn TestUint32ToUint16(a: u32) -> u16 { return Uint32ToUint16(a); } + +// Widening +fn Int32ToInt64(a: i32) -> i64 = "int.convert"; +fn Int32ToUint64(a: i32) -> u64 = "int.convert"; +fn Uint32ToInt64(a: u32) -> i64 = "int.convert"; +fn Uint32ToUint64(a: u32) -> u64 = "int.convert"; + +fn TestInt32ToInt64(a: i32) -> i64 { return Int32ToInt64(a); } +fn TestInt32ToUint64(a: i32) -> u64 { return Int32ToUint64(a); } +fn TestUint32ToInt64(a: u32) -> i64 { return Uint32ToInt64(a); } +fn TestUint32ToUint64(a: u32) -> u64 { return Uint32ToUint64(a); } + // CHECK:STDOUT: ; ModuleID = 'basic.carbon' // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: @@ -508,35 +547,147 @@ fn TestLess_i32_u32(a: i32, b: u32) -> bool { return Less_i32_u32(a, b); } // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) // CHECK:STDOUT: !3 = !DIFile(filename: "mixed_compare.carbon", directory: "") -// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestEq_u16_u32", linkageName: "_CTestEq_u16_u32.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestEq_u16_u32", linkageName: "_CTestEq_u16_u32.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !5 = !DISubroutineType(types: !6) +// CHECK:STDOUT: !6 = !{} +// CHECK:STDOUT: !7 = !DILocation(line: 10, column: 52, scope: !4) +// CHECK:STDOUT: !8 = !DILocation(line: 10, column: 45, scope: !4) +// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TestEq_i16_u32", linkageName: "_CTestEq_i16_u32.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !10 = !DILocation(line: 11, column: 52, scope: !9) +// CHECK:STDOUT: !11 = !DILocation(line: 11, column: 45, scope: !9) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestEq_u16_i32", linkageName: "_CTestEq_u16_i32.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = !DILocation(line: 12, column: 52, scope: !12) +// CHECK:STDOUT: !14 = !DILocation(line: 12, column: 45, scope: !12) +// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestEq_i16_i32", linkageName: "_CTestEq_i16_i32.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !16 = !DILocation(line: 13, column: 52, scope: !15) +// CHECK:STDOUT: !17 = !DILocation(line: 13, column: 45, scope: !15) +// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TestEq_i32_u32", linkageName: "_CTestEq_i32_u32.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !19 = !DILocation(line: 14, column: 52, scope: !18) +// CHECK:STDOUT: !20 = !DILocation(line: 14, column: 45, scope: !18) +// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestLess_u16_u32", linkageName: "_CTestLess_u16_u32.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !22 = !DILocation(line: 22, column: 54, scope: !21) +// CHECK:STDOUT: !23 = !DILocation(line: 22, column: 47, scope: !21) +// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestLess_i16_u32", linkageName: "_CTestLess_i16_u32.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !25 = !DILocation(line: 23, column: 54, scope: !24) +// CHECK:STDOUT: !26 = !DILocation(line: 23, column: 47, scope: !24) +// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "TestLess_u16_i32", linkageName: "_CTestLess_u16_i32.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !28 = !DILocation(line: 24, column: 54, scope: !27) +// CHECK:STDOUT: !29 = !DILocation(line: 24, column: 47, scope: !27) +// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "TestLess_i16_i32", linkageName: "_CTestLess_i16_i32.Main", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !31 = !DILocation(line: 25, column: 54, scope: !30) +// CHECK:STDOUT: !32 = !DILocation(line: 25, column: 47, scope: !30) +// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "TestLess_i32_u32", linkageName: "_CTestLess_i32_u32.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !34 = !DILocation(line: 26, column: 54, scope: !33) +// CHECK:STDOUT: !35 = !DILocation(line: 26, column: 47, scope: !33) +// CHECK:STDOUT: ; ModuleID = 'convert.carbon' +// CHECK:STDOUT: source_filename = "convert.carbon" +// CHECK:STDOUT: +// CHECK:STDOUT: define i32 @_CTestInt32ToInt32.Main(i32 %a) !dbg !4 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 %a, !dbg !7 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i32 @_CTestInt32ToUint32.Main(i32 %a) !dbg !8 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 %a, !dbg !9 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i32 @_CTestUint32ToInt32.Main(i32 %a) !dbg !10 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 %a, !dbg !11 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i32 @_CTestUint32ToUint32.Main(i32 %a) !dbg !12 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: ret i32 %a, !dbg !13 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i16 @_CTestInt32ToInt16.Main(i32 %a) !dbg !14 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = trunc i32 %a to i16, !dbg !15 +// CHECK:STDOUT: ret i16 %int.convert, !dbg !16 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i16 @_CTestInt32ToUint16.Main(i32 %a) !dbg !17 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = trunc i32 %a to i16, !dbg !18 +// CHECK:STDOUT: ret i16 %int.convert, !dbg !19 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i16 @_CTestUint32ToInt16.Main(i32 %a) !dbg !20 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = trunc i32 %a to i16, !dbg !21 +// CHECK:STDOUT: ret i16 %int.convert, !dbg !22 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i16 @_CTestUint32ToUint16.Main(i32 %a) !dbg !23 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = trunc i32 %a to i16, !dbg !24 +// CHECK:STDOUT: ret i16 %int.convert, !dbg !25 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i64 @_CTestInt32ToInt64.Main(i32 %a) !dbg !26 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = sext i32 %a to i64, !dbg !27 +// CHECK:STDOUT: ret i64 %int.convert, !dbg !28 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i64 @_CTestInt32ToUint64.Main(i32 %a) !dbg !29 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = sext i32 %a to i64, !dbg !30 +// CHECK:STDOUT: ret i64 %int.convert, !dbg !31 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i64 @_CTestUint32ToInt64.Main(i32 %a) !dbg !32 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = zext i32 %a to i64, !dbg !33 +// CHECK:STDOUT: ret i64 %int.convert, !dbg !34 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: define i64 @_CTestUint32ToUint64.Main(i32 %a) !dbg !35 { +// CHECK:STDOUT: entry: +// CHECK:STDOUT: %int.convert = zext i32 %a to i64, !dbg !36 +// CHECK:STDOUT: ret i64 %int.convert, !dbg !37 +// CHECK:STDOUT: } +// CHECK:STDOUT: +// CHECK:STDOUT: !llvm.module.flags = !{!0, !1} +// CHECK:STDOUT: !llvm.dbg.cu = !{!2} +// CHECK:STDOUT: +// CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5} +// CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3} +// CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug) +// CHECK:STDOUT: !3 = !DIFile(filename: "convert.carbon", directory: "") +// CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestInt32ToInt32", linkageName: "_CTestInt32ToInt32.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) // CHECK:STDOUT: !5 = !DISubroutineType(types: !6) // CHECK:STDOUT: !6 = !{} -// CHECK:STDOUT: !7 = !DILocation(line: 8, column: 52, scope: !4) -// CHECK:STDOUT: !8 = !DILocation(line: 8, column: 45, scope: !4) -// CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TestEq_i16_u32", linkageName: "_CTestEq_i16_u32.Main", scope: null, file: !3, line: 9, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !10 = !DILocation(line: 9, column: 52, scope: !9) -// CHECK:STDOUT: !11 = !DILocation(line: 9, column: 45, scope: !9) -// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestEq_u16_i32", linkageName: "_CTestEq_u16_i32.Main", scope: null, file: !3, line: 10, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !13 = !DILocation(line: 10, column: 52, scope: !12) -// CHECK:STDOUT: !14 = !DILocation(line: 10, column: 45, scope: !12) -// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestEq_i16_i32", linkageName: "_CTestEq_i16_i32.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !16 = !DILocation(line: 11, column: 52, scope: !15) -// CHECK:STDOUT: !17 = !DILocation(line: 11, column: 45, scope: !15) -// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TestEq_i32_u32", linkageName: "_CTestEq_i32_u32.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !19 = !DILocation(line: 12, column: 52, scope: !18) -// CHECK:STDOUT: !20 = !DILocation(line: 12, column: 45, scope: !18) -// CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestLess_u16_u32", linkageName: "_CTestLess_u16_u32.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !22 = !DILocation(line: 20, column: 54, scope: !21) -// CHECK:STDOUT: !23 = !DILocation(line: 20, column: 47, scope: !21) -// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestLess_i16_u32", linkageName: "_CTestLess_i16_u32.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !25 = !DILocation(line: 21, column: 54, scope: !24) -// CHECK:STDOUT: !26 = !DILocation(line: 21, column: 47, scope: !24) -// CHECK:STDOUT: !27 = distinct !DISubprogram(name: "TestLess_u16_i32", linkageName: "_CTestLess_u16_i32.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !28 = !DILocation(line: 22, column: 54, scope: !27) -// CHECK:STDOUT: !29 = !DILocation(line: 22, column: 47, scope: !27) -// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "TestLess_i16_i32", linkageName: "_CTestLess_i16_i32.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !31 = !DILocation(line: 23, column: 54, scope: !30) -// CHECK:STDOUT: !32 = !DILocation(line: 23, column: 47, scope: !30) -// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "TestLess_i32_u32", linkageName: "_CTestLess_i32_u32.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) -// CHECK:STDOUT: !34 = !DILocation(line: 24, column: 54, scope: !33) -// CHECK:STDOUT: !35 = !DILocation(line: 24, column: 47, scope: !33) +// CHECK:STDOUT: !7 = !DILocation(line: 10, column: 38, scope: !4) +// CHECK:STDOUT: !8 = distinct !DISubprogram(name: "TestInt32ToUint32", linkageName: "_CTestInt32ToUint32.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !9 = !DILocation(line: 11, column: 39, scope: !8) +// CHECK:STDOUT: !10 = distinct !DISubprogram(name: "TestUint32ToInt32", linkageName: "_CTestUint32ToInt32.Main", scope: null, file: !3, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !11 = !DILocation(line: 12, column: 39, scope: !10) +// CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestUint32ToUint32", linkageName: "_CTestUint32ToUint32.Main", scope: null, file: !3, line: 13, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !13 = !DILocation(line: 13, column: 40, scope: !12) +// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "TestInt32ToInt16", linkageName: "_CTestInt32ToInt16.Main", scope: null, file: !3, line: 21, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !15 = !DILocation(line: 21, column: 45, scope: !14) +// CHECK:STDOUT: !16 = !DILocation(line: 21, column: 38, scope: !14) +// CHECK:STDOUT: !17 = distinct !DISubprogram(name: "TestInt32ToUint16", linkageName: "_CTestInt32ToUint16.Main", scope: null, file: !3, line: 22, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !18 = !DILocation(line: 22, column: 46, scope: !17) +// CHECK:STDOUT: !19 = !DILocation(line: 22, column: 39, scope: !17) +// CHECK:STDOUT: !20 = distinct !DISubprogram(name: "TestUint32ToInt16", linkageName: "_CTestUint32ToInt16.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !21 = !DILocation(line: 23, column: 46, scope: !20) +// CHECK:STDOUT: !22 = !DILocation(line: 23, column: 39, scope: !20) +// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "TestUint32ToUint16", linkageName: "_CTestUint32ToUint16.Main", scope: null, file: !3, line: 24, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !24 = !DILocation(line: 24, column: 47, scope: !23) +// CHECK:STDOUT: !25 = !DILocation(line: 24, column: 40, scope: !23) +// CHECK:STDOUT: !26 = distinct !DISubprogram(name: "TestInt32ToInt64", linkageName: "_CTestInt32ToInt64.Main", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !27 = !DILocation(line: 32, column: 45, scope: !26) +// CHECK:STDOUT: !28 = !DILocation(line: 32, column: 38, scope: !26) +// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "TestInt32ToUint64", linkageName: "_CTestInt32ToUint64.Main", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !30 = !DILocation(line: 33, column: 46, scope: !29) +// CHECK:STDOUT: !31 = !DILocation(line: 33, column: 39, scope: !29) +// CHECK:STDOUT: !32 = distinct !DISubprogram(name: "TestUint32ToInt64", linkageName: "_CTestUint32ToInt64.Main", scope: null, file: !3, line: 34, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !33 = !DILocation(line: 34, column: 46, scope: !32) +// CHECK:STDOUT: !34 = !DILocation(line: 34, column: 39, scope: !32) +// CHECK:STDOUT: !35 = distinct !DISubprogram(name: "TestUint32ToUint64", linkageName: "_CTestUint32ToUint64.Main", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2) +// CHECK:STDOUT: !36 = !DILocation(line: 35, column: 47, scope: !35) +// CHECK:STDOUT: !37 = !DILocation(line: 35, column: 40, scope: !35)